drm/fb-helper: Disconnect damage worker from update logic
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 3 Nov 2022 15:14:38 +0000 (16:14 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Sat, 5 Nov 2022 16:05:54 +0000 (17:05 +0100)
commitf231af498c29f3acbd4436f67a8c7de8a428fb0f
treeedb27954aa4bf4888d2e99d6aa4ba5c922cafdc9
parentafb0ff78c13c5193be046b912bf6cbae85cdb7c7
drm/fb-helper: Disconnect damage worker from update logic

The fbdev helpers implement a damage worker that forwards fbdev
updates to the DRM driver. The worker's update logic depends on
the generic fbdev emulation. Separate the two via function pointer.

The generic fbdev emulation sets struct drm_fb_helper_funcs.fb_dirty,
a new callback that hides the update logic from the damage worker.
It's not possible to use the generic logic with other fbdev emulation,
because it contains additional code for the shadow buffering that
the generic emulation employs.

DRM drivers with internal fbdev emulation can set fb_dirty to their
own implementation if they require damage handling; although no such
drivers currently exist.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-16-tzimmermann@suse.de
drivers/gpu/drm/drm_fb_helper.c
include/drm/drm_fb_helper.h