Skip to content

Commit 1c3d5de

Browse files
committed
[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 <kernel@esmil.dk>
1 parent 54a67c0 commit 1c3d5de

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/gpu/drm/starfive/starfive_drm_crtc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ static int ddrfmt_to_ppfmt(struct starfive_crtc *sf_crtc)
6464
case DRM_FORMAT_NV12:
6565
sf_crtc->vpp_format = COLOR_YUV420_NV12;
6666
break;
67+
case DRM_FORMAT_XRGB8888:
6768
case DRM_FORMAT_ARGB8888:
6869
sf_crtc->vpp_format = COLOR_RGB888_ARGB;
6970
break;

drivers/gpu/drm/starfive/starfive_drm_plane.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ static const u32 formats[] = {
2828
DRM_FORMAT_NV21,
2929
DRM_FORMAT_NV12,
3030

31+
DRM_FORMAT_XRGB8888,
3132
DRM_FORMAT_ARGB8888,
3233
DRM_FORMAT_ABGR8888,
3334
};

0 commit comments

Comments
 (0)