diff options
author | Emil Renner Berthing <kernel@esmil.dk> | 2021-09-22 17:35:15 +0300 |
---|---|---|
committer | Emil Renner Berthing <kernel@esmil.dk> | 2022-07-13 00:26:52 +0300 |
commit | e4bcd0006aa0c4f9df20c3ba299ca5fa999a3af2 (patch) | |
tree | d79a44cf6f600dc245540e6888ba460ca5f8ed3d | |
parent | 79b50d72347854e99b0646477c4c3583aa2cee48 (diff) | |
download | linux-e4bcd0006aa0c4f9df20c3ba299ca5fa999a3af2.tar.xz |
[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>
-rw-r--r-- | drivers/gpu/drm/starfive/starfive_drm_crtc.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/starfive/starfive_drm_plane.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/starfive/starfive_drm_crtc.c b/drivers/gpu/drm/starfive/starfive_drm_crtc.c index 66923f830268..38d094d87d66 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 0d169d39877e..8ec7155cadbd 100644 --- a/drivers/gpu/drm/starfive/starfive_drm_plane.c +++ b/drivers/gpu/drm/starfive/starfive_drm_plane.c @@ -28,6 +28,7 @@ static const u32 formats[] = { DRM_FORMAT_NV21, DRM_FORMAT_NV12, + DRM_FORMAT_XRGB8888, DRM_FORMAT_ARGB8888, DRM_FORMAT_ABGR8888, }; |