diff options
author | Thomas Huth <[email protected]> | 2024-07-02 14:17:37 +0200 |
---|---|---|
committer | Thomas Zimmermann <[email protected]> | 2024-07-08 16:28:00 +0200 |
commit | cb31c58e8c294ff31ea842ee1fa2c06c9a9f1cc3 (patch) | |
tree | ce2f7a1a5cead014e7c404982863e2ff1a4ca7d1 | |
parent | afeea2758b4f1210361ce2a91d8fa3e7df606ad2 (diff) |
drm/fbdev-dma: Fix framebuffer mode for big endian devices
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 <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Thomas Zimmermann <[email protected]>
Fixes: 6ae2ff23aa43 ("drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()")
Cc: Geert Uytterhoeven <[email protected]>
Cc: Javier Martinez Canillas <[email protected]>
Cc: Hamza Mahfooz <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: <[email protected]> # v6.7+
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/drm_fbdev_dma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c index 97ef6300d47e..fdef4a2f883f 100644 --- a/drivers/gpu/drm/drm_fbdev_dma.c +++ b/drivers/gpu/drm/drm_fbdev_dma.c @@ -101,7 +101,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)) |