diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-12-12 18:08:47 +0100 |
|---|---|---|
| committer | Maarten Lankhorst <dev@lankhorst.se> | 2025-03-05 21:48:49 +0100 |
| commit | a1c008b987d0f0fc5a9d746dd7782350ba48ce57 (patch) | |
| tree | 82d7b28ba7036dade2ca2b44810a23fd8e3e2128 /include/drm | |
| parent | 2ef5754c9649151ce438c9b30ec720840762d2a2 (diff) | |
drm/i915/display: fbdev: Move custom suspend code to new callback
If the fbdev buffer is backed by stolen memory, it has to be cleared
upon resume from hibernation. Move the code into the new callback
fb_set_suspend, so that it can run from DRM's generic fbdev client.
No functional change. Other drivers are not affected.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241212170913.185939-7-tzimmermann@suse.de
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Diffstat (limited to 'include/drm')
| -rw-r--r-- | include/drm/drm_fb_helper.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index a7d7a3b945ea..ddce2408ca2b 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h @@ -112,6 +112,20 @@ struct drm_fb_helper_funcs { * TODO: Fix i915 to not require this callback. */ void (*fb_restore)(struct drm_fb_helper *helper); + + /** + * @fb_set_suspend: + * + * Driver callback to suspend or resume, if set, fbdev emulation will + * invoke this callback during suspend and resume. Driver should call + * fb_set_suspend() from their implementation. If not set, fbdev + * emulation will invoke fb_set_suspend() directly. + * + * Only for i915. Do not use in new code. + * + * TODO: Fix i915 to not require this callback. + */ + void (*fb_set_suspend)(struct drm_fb_helper *helper, bool suspend); }; /** |
