linux-stable/drivers/video
Nam Cao 2db6388d8a fbdev: flush deferred IO before closing
commit 33cd6ea9c0 upstream.

When framebuffer gets closed, the queued deferred IO gets cancelled. This
can cause some last display data to vanish. This is problematic for users
who send a still image to the framebuffer, then close the file: the image
may never appear.

To ensure none of display data get lost, flush the queued deferred IO
first before closing.

Another possible solution is to delete the cancel_delayed_work_sync()
instead. The difference is that the display may appear some time after
closing. However, the clearing of page mapping after this needs to be
removed too, because the page mapping is used by the deferred work. It is
not completely obvious whether it is okay to not clear the page mapping.
For a patch intended for stable trees, go with the simple and obvious
solution.

Fixes: 60b59beafb ("fbdev: mm: Deferred IO support")
Cc: stable@vger.kernel.org
Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-25 15:35:45 -08:00
..
backlight backlight: pwm_bl: Disable PWM on shutdown, suspend and remove 2023-11-20 11:59:20 +01:00
console drm: fix up fbdev Kconfig defaults 2023-09-18 10:52:55 +02:00
fbdev fbdev: flush deferred IO before closing 2024-01-25 15:35:45 -08:00
logo video: logo: LOGO should depend on FB_CORE i.s.o. FB 2023-07-28 11:48:30 +02:00
aperture.c
cmdline.c
display_timing.c
hdmi.c
Kconfig video: logo: LOGO should depend on FB_CORE i.s.o. FB 2023-07-28 11:48:30 +02:00
Makefile
nomodeset.c
of_display_timing.c
of_videomode.c
sticore.c sticon/parisc: Fix STI console on 64-bit only machines 2023-06-30 17:14:14 +02:00
vgastate.c
videomode.c