Patch "drm/fb-helper: Mark screen buffers in system memory with FBINFO_VIRTFB" has been added to the 5.16-stable tree
Subsystems (2)
[email protected]
AppliedThis is a note to let you know that I've just added the patch titled
drm/fb-helper: Mark screen buffers in system memory with FBINFO_VIRTFB
to the 5.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-fb-helper-mark-screen-buffers-in-system-memory-with-fbinfo_virtfb.patch
and it can be found in the queue-5.16 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From cd9f7f7ac5932129fe81b4c7559cfcb226ec7c5c Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <[email protected]>
Date: Tue, 1 Feb 2022 12:53:05 +0100
Subject: drm/fb-helper: Mark screen buffers in system memory with FBINFO_VIRTFB
From: Thomas Zimmermann <[email protected]>
commit cd9f7f7ac5932129fe81b4c7559cfcb226ec7c5c upstream.
Mark screen buffers in system memory with FBINFO_VIRTFB. Otherwise, fbdev deferred I/O marks mmap'ed areas of system memory with VM_IO. (There's an inverse relationship between the two flags.)
For shadow buffers, also set the FBINFO_READS_FAST hint.
v3:
* change FB_ to FBINFO_ in commit description
v2:
* updated commit description (Daniel)
* added Fixes tag
--- drivers/gpu/drm/drm_fb_helper.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_fb_helper.c +6 -3
@@ -2346,6 +2346,7 @@ static int drm_fb_helper_generic_probe(s fbi->fbops = &drm_fbdev_fb_ops; fbi->screen_size = fb->height * fb->pitches[0 ]; fbi->fix.smem_len = fbi->screen_size; + fbi->flags =FBINFO_DEFAULT ;drm_fb_helper_fill_info (fbi, fb_helper, sizes);
@@ -2353,19 +2354,21 @@ static int drm_fb_helper_generic_probe(s fbi->screen_buffer =vzalloc (fbi->screen_size);if (!fbi->screen_buffer)return -ENOMEM ; + fbi->flags |=FBINFO_VIRTFB |FBINFO_READS_FAST ; fbi->fbdefio = &drm_fbdev_defio; -fb_deferred_io_init (fbi); }else {/* buffer is mapped for HW framebuffer */ ret =drm_client_buffer_vmap (fb_helper->buffer, &map);if (ret)return ret; -if (map.is_iomem) +if (map.is_iomem) { fbi->screen_base = map.vaddr_iomem; -else + }else { fbi->screen_buffer = map.vaddr; + fbi->flags |=FBINFO_VIRTFB ; + }/* * Shamelessly leak the physical address to user-space. As
Patches currently in stable-queue which might be from [email protected] are
queue-5.16/fbdev-hot-unplug-firmware-fb-devices-on-forced-removal.patch queue-5.16/drm-fb-helper-mark-screen-buffers-in-system-memory-with-fbinfo_virtfb.patch queue-5.16/drm-simpledrm-add-panel-orientation-property-on-non-upright-mounted-lcd-panels.patch queue-5.16/mgag200-fix-memmapsl-configuration-in-gctl6-register.patch