Patch "drm/fbdev-generic: Fix framebuffer on big endian devices" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/fbdev-generic: Fix framebuffer on big endian devices

to the 6.9-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-fbdev-generic-fix-framebuffer-on-big-endian-devi.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c71a2e794fe4334d7bf079e9434d59b75bf02b91
Author: Thomas Huth <thuth@xxxxxxxxxx>
Date:   Thu Jun 27 19:35:30 2024 +0200

    drm/fbdev-generic: Fix framebuffer on big endian devices
    
    [ Upstream commit 740b8dad05bee39e1e3b926f05bb4a8274b8ba49 ]
    
    Starting with kernel 6.7, the framebuffer text console is not working
    anymore with the virtio-gpu device on s390x hosts. Such big endian fb
    devices are usinga different pixel ordering than little endian devices,
    e.g. DRM_FORMAT_BGRX8888 instead of DRM_FORMAT_XRGB8888.
    
    This used to work fine as long as drm_client_buffer_addfb() was still
    calling drm_mode_addfb() which called drm_driver_legacy_fb_format()
    internally to get the right format. But drm_client_buffer_addfb() has
    recently been reworked to call drm_mode_addfb2() instead with the
    format value that has been passed to it as a parameter (see commit
    6ae2ff23aa43 ("drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()").
    
    That format parameter is determined in drm_fbdev_generic_helper_fb_probe()
    via the drm_mode_legacy_fb_format() function - which only generates
    formats suitable for little endian devices. So to fix this issue
    switch to drm_driver_legacy_fb_format() here instead to take the
    device endianness into consideration.
    
    Fixes: 6ae2ff23aa43 ("drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()")
    Closes: https://issues.redhat.com/browse/RHEL-45158
    Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
    Reviewed-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>
    Acked-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
    Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
    Tested-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
    Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240627173530.460615-1-thuth@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c
index b4659cd6285ab..cbb7418b789f8 100644
--- a/drivers/gpu/drm/drm_fbdev_generic.c
+++ b/drivers/gpu/drm/drm_fbdev_generic.c
@@ -84,7 +84,8 @@ static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper,
 		    sizes->surface_width, sizes->surface_height,
 		    sizes->surface_bpp);
 
-	format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
+	format = drm_driver_legacy_fb_format(dev, sizes->surface_bpp,
+					     sizes->surface_depth);
 	buffer = drm_client_framebuffer_create(client, sizes->surface_width,
 					       sizes->surface_height, format);
 	if (IS_ERR(buffer))




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux