summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-03-21 12:53:55 +0300
committerLee Jones <lee@kernel.org>2025-04-10 12:38:57 +0300
commit7e3711eb87c584ed224a7ad7000eba36e6fa3a51 (patch)
tree5ab939c5f2b4bb0df5c5ea31ef0c227ff570033e /include/linux
parent93e41f968d7c6ea1cedc6b365917cbb787ef08f6 (diff)
downloadlinux-7e3711eb87c584ed224a7ad7000eba36e6fa3a51.tar.xz
fbdev: Track display blanking state
Store the display's blank status in struct fb_info.blank and track it in fb_blank(). As an extra, the status is now available from the sysfs blank attribute. Support for blanking is optional. Therefore framebuffer_alloc() initializes the state to FB_BLANK_UNBLANK (i.e., the display is on). If the fb_blank callback has been set, register_framebuffer() sets the state to FB_BLANK_POWERDOWN. On the first modeset, the call to fb_blank() will update it to _UNBLANK. This is important, as listeners to FB_EVENT_BLANK will now see the display being switched on. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Simona Vetter <simona.vetter@ffwll.ch> Link: https://lore.kernel.org/r/20250321095517.313713-3-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index cd653862ab99..348aa2e146e2 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -472,6 +472,8 @@ struct fb_info {
struct list_head modelist; /* mode list */
struct fb_videomode *mode; /* current mode */
+ int blank; /* current blanking; see FB_BLANK_ constants */
+
#if IS_ENABLED(CONFIG_FB_BACKLIGHT)
/* assigned backlight device */
/* set before framebuffer registration,