From: Thomas Huth Date: Tue, 2 Jul 2024 12:17:37 +0000 (+0200) Subject: drm/fbdev-dma: Fix framebuffer mode for big endian devices X-Git-Tag: v6.10.3~179 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=96852136af63824e8202a132375b36c1ea922bd0;p=thirdparty%2Fkernel%2Fstable.git drm/fbdev-dma: Fix framebuffer mode for big endian devices commit cb31c58e8c294ff31ea842ee1fa2c06c9a9f1cc3 upstream. The drm_mode_legacy_fb_format() function only generates formats suitable for little endian devices. switch to drm_driver_legacy_fb_format() here instead to take the device endianness into consideration, too. Suggested-by: Thomas Zimmermann Signed-off-by: Thomas Huth Reviewed-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Thomas Zimmermann Fixes: 6ae2ff23aa43 ("drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()") Cc: Geert Uytterhoeven Cc: Javier Martinez Canillas Cc: Hamza Mahfooz Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: # v6.7+ Link: https://patchwork.freedesktop.org/patch/msgid/20240702121737.522878-1-thuth@redhat.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c index 13cd754af311d..77695339e4d4c 100644 --- a/drivers/gpu/drm/drm_fbdev_dma.c +++ b/drivers/gpu/drm/drm_fbdev_dma.c @@ -90,7 +90,8 @@ static int drm_fbdev_dma_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))