[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>
This commit is contained in:
Emil Renner Berthing 2021-09-22 16:35:15 +02:00 committed by Emil Renner Berthing
parent 5479cd6317
commit 0e279ebf6a
2 changed files with 2 additions and 0 deletions

View file

@ -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;

View file

@ -28,6 +28,7 @@ static const u32 formats[] = {
DRM_FORMAT_NV21,
DRM_FORMAT_NV12,
DRM_FORMAT_XRGB8888,
DRM_FORMAT_ARGB8888,
DRM_FORMAT_ABGR8888,
};