Skip to content

Commit cb31c58

Browse files
huthThomas Zimmermann
authored andcommitted
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: 6ae2ff2 ("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]
1 parent afeea27 commit cb31c58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/drm_fbdev_dma.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper,
101101
sizes->surface_width, sizes->surface_height,
102102
sizes->surface_bpp);
103103

104-
format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
104+
format = drm_driver_legacy_fb_format(dev, sizes->surface_bpp,
105+
sizes->surface_depth);
105106
buffer = drm_client_framebuffer_create(client, sizes->surface_width,
106107
sizes->surface_height, format);
107108
if (IS_ERR(buffer))

0 commit comments

Comments
 (0)