diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-11-03 16:14:38 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-11-05 17:05:54 +0100 |
commit | f231af498c29f3acbd4436f67a8c7de8a428fb0f (patch) | |
tree | edb27954aa4bf4888d2e99d6aa4ba5c922cafdc9 /include/drm/drm_fb_helper.h | |
parent | afb0ff78c13c5193be046b912bf6cbae85cdb7c7 (diff) | |
download | linux-stable-f231af498c29f3acbd4436f67a8c7de8a428fb0f.tar.gz linux-stable-f231af498c29f3acbd4436f67a8c7de8a428fb0f.tar.bz2 linux-stable-f231af498c29f3acbd4436f67a8c7de8a428fb0f.zip |
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
Diffstat (limited to 'include/drm/drm_fb_helper.h')
-rw-r--r-- | include/drm/drm_fb_helper.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index edc697a2fde2..3d7a3d68dab8 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h @@ -30,6 +30,7 @@ #ifndef DRM_FB_HELPER_H #define DRM_FB_HELPER_H +struct drm_clip_rect; struct drm_fb_helper; #include <linux/fb.h> @@ -89,6 +90,20 @@ struct drm_fb_helper_funcs { */ int (*fb_probe)(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes); + + /** + * @fb_dirty: + * + * Driver callback to update the framebuffer memory. If set, fbdev + * emulation will invoke this callback in regular intervals after + * the framebuffer has been written. + * + * This callback is optional. + * + * Returns: + * 0 on success, or an error code otherwise. + */ + int (*fb_dirty)(struct drm_fb_helper *helper, struct drm_clip_rect *clip); }; /** |