From 0ac671d6b6bbca9844567f9a3ccfb1c90479a6b2 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Wed, 21 Oct 2020 13:34:07 +0200 Subject: drm/atmel: Sort formats by preference Judging by the fbdev setup code it looks like we prefer XRGB8888. Because I'm fairly sure that the 24 bpp is a mistake, and the driver doesn't actually prefer RGB888, which is what it is currently getting. But maybe I'm mistaken. Signed-off-by: Daniel Vetter Cc: Sam Ravnborg Cc: Boris Brezillon Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: linux-arm-kernel@lists.infradead.org --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c index daa508504f47..c253d50eaad0 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c @@ -81,16 +81,16 @@ drm_plane_state_to_atmel_hlcdc_plane_state(struct drm_plane_state *s) #define SUBPIXEL_MASK 0xffff static uint32_t rgb_formats[] = { - DRM_FORMAT_C8, + DRM_FORMAT_XRGB8888, + DRM_FORMAT_ARGB8888, + DRM_FORMAT_RGBA8888, DRM_FORMAT_XRGB4444, DRM_FORMAT_ARGB4444, DRM_FORMAT_RGBA4444, DRM_FORMAT_ARGB1555, DRM_FORMAT_RGB565, DRM_FORMAT_RGB888, - DRM_FORMAT_XRGB8888, - DRM_FORMAT_ARGB8888, - DRM_FORMAT_RGBA8888, + DRM_FORMAT_C8, }; struct atmel_hlcdc_formats atmel_hlcdc_plane_rgb_formats = { @@ -99,16 +99,15 @@ struct atmel_hlcdc_formats atmel_hlcdc_plane_rgb_formats = { }; static uint32_t rgb_and_yuv_formats[] = { - DRM_FORMAT_C8, + DRM_FORMAT_XRGB8888, + DRM_FORMAT_ARGB8888, + DRM_FORMAT_RGBA8888, DRM_FORMAT_XRGB4444, DRM_FORMAT_ARGB4444, DRM_FORMAT_RGBA4444, DRM_FORMAT_ARGB1555, DRM_FORMAT_RGB565, DRM_FORMAT_RGB888, - DRM_FORMAT_XRGB8888, - DRM_FORMAT_ARGB8888, - DRM_FORMAT_RGBA8888, DRM_FORMAT_AYUV, DRM_FORMAT_YUYV, DRM_FORMAT_UYVY, @@ -118,6 +117,7 @@ static uint32_t rgb_and_yuv_formats[] = { DRM_FORMAT_NV61, DRM_FORMAT_YUV422, DRM_FORMAT_YUV420, + DRM_FORMAT_C8, }; struct atmel_hlcdc_formats atmel_hlcdc_plane_rgb_and_yuv_formats = { -- cgit v1.2.3