Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fbdev: Send old blank state in FB_EVENT_BLANK

The event FB_EVENT_BLANK sends the new blank state in the event's
data field. Also send the old state. It's an additional field in the
data array; existing receivers won't notice the difference.

The backlight subsystem currently tracks blank state per display per
backlight. That is not optimal as it ties backlight code to fbdev. A
subsystem should not track internal state of another subsystem. With
both, new and old, blank state in FB_EVENT_BLANK, the backlight code
will not require its own state tracker any longer.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Simona Vetter <simona.vetter@ffwll.ch>
Link: https://lore.kernel.org/r/20250321095517.313713-4-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Thomas Zimmermann and committed by
Lee Jones
dfb4bf1a 7e3711eb

+4 -1
+4 -1
drivers/video/fbdev/core/fbmem.c
··· 343 343 { 344 344 int old_blank = info->blank; 345 345 struct fb_event event; 346 + int data[2]; 346 347 int ret; 347 348 348 349 if (!info->fbops->fb_blank) ··· 352 351 if (blank > FB_BLANK_POWERDOWN) 353 352 blank = FB_BLANK_POWERDOWN; 354 353 354 + data[0] = blank; 355 + data[1] = old_blank; 355 356 event.info = info; 356 - event.data = &blank; 357 + event.data = data; 357 358 358 359 info->blank = blank; 359 360