drm/gem: Share code between drm_gem_fb_{begin,end}_cpu_access()
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 17 May 2022 11:33:23 +0000 (13:33 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 19 May 2022 17:24:51 +0000 (19:24 +0200)
commitf159b1b22c8a2d3d7c1fa877fafc8aacff0deeba
treea21e15c347be4ef6f82e1fe611fcfa34ad8887f5
parentc193a003dc46ae601f46908b41d6f485b87db1ad
drm/gem: Share code between drm_gem_fb_{begin,end}_cpu_access()

The error-recovery code in drm_gem_fb_begin() is of the same pattern
as drm_gem_fb_end(). Implement both of them using an internal helper.
No functional changes.

v2:
* print additional information in error message (Javier)
* fix commit description (Javier)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220517113327.26919-2-tzimmermann@suse.de
drivers/gpu/drm/drm_gem_framebuffer_helper.c