From dab94956490a739f667ab9db4e983eb71ac1e736 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Wed, 22 Sep 2021 16:35:15 +0200 Subject: [PATCH] [WIP] drm/starfive: Support DRM_FORMAT_XRGB8888 When creating dumb buffers with 32bpp and 24bit colour depth this is default mode return by drm_mode_legacy_fb_format. So we need to support this for common dumb buffers to just work. Signed-off-by: Emil Renner Berthing --- drivers/gpu/drm/starfive/starfive_drm_crtc.c | 1 + drivers/gpu/drm/starfive/starfive_drm_plane.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/starfive/starfive_drm_crtc.c b/drivers/gpu/drm/starfive/starfive_drm_crtc.c index edd38f4682fd..717dae0b52ca 100644 --- a/drivers/gpu/drm/starfive/starfive_drm_crtc.c +++ b/drivers/gpu/drm/starfive/starfive_drm_crtc.c @@ -64,6 +64,7 @@ static int ddrfmt_to_ppfmt(struct starfive_crtc *sf_crtc) case DRM_FORMAT_NV12: sf_crtc->vpp_format = COLOR_YUV420_NV12; break; + case DRM_FORMAT_XRGB8888: case DRM_FORMAT_ARGB8888: sf_crtc->vpp_format = COLOR_RGB888_ARGB; break; diff --git a/drivers/gpu/drm/starfive/starfive_drm_plane.c b/drivers/gpu/drm/starfive/starfive_drm_plane.c index 5bdc36b0bc0c..690ba34026cb 100644 --- a/drivers/gpu/drm/starfive/starfive_drm_plane.c +++ b/drivers/gpu/drm/starfive/starfive_drm_plane.c @@ -27,6 +27,7 @@ static const u32 formats[] = { DRM_FORMAT_NV21, DRM_FORMAT_NV12, + DRM_FORMAT_XRGB8888, DRM_FORMAT_ARGB8888, DRM_FORMAT_ABGR8888, };