[PATCH 2/3] drm: kirin9xxx: Add additional color formats
John Stultz
john.stultz at linaro.org
Thu Aug 20 03:40:59 UTC 2020
This is against Mauro's tree here:
https://gitlab.freedesktop.org/mchehab_kernel/hikey-970/-/commits/master/
Add support for two color formats (ARGB and ABGR) needed for use
with drm_hwcomposer and AOSP.
NOTE: I see Red/Blue swapped colors with this (and yes I did try
the obvious swap of formats here, to no luck :), so I need to dig
more on whats different from the other driver on this.
But with these formats supported drm_hwcomposer no longer crashes
Cc: Mauro Carvalho Chehab <mchehab+huawei at kernel.org>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Cc: Manivannan Sadhasivam <mani at kernel.org>
Cc: dri-devel <dri-devel at lists.freedesktop.org>
Cc: Liwei Cai <cailiwei at hisilicon.com>
Cc: Xinliang Liu <xinliang.liu at linaro.org>
Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Cc: Sam Ravnborg <sam at ravnborg.org>
Cc: Sumit Semwal <sumit.semwal at linaro.org>
Cc: Chen Feng <puck.chen at hisilicon.com>
Signed-off-by: John Stultz <john.stultz at linaro.org>
---
drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c
index e3a1f85bdbd2..f2e99c766927 100644
--- a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c
+++ b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c
@@ -55,14 +55,15 @@ static const struct dss_format dss_formats[] = {
{ DRM_FORMAT_XBGR8888, HISI_FB_PIXEL_FORMAT_BGRX_8888 },
{ DRM_FORMAT_RGBA8888, HISI_FB_PIXEL_FORMAT_RGBA_8888 },
{ DRM_FORMAT_BGRA8888, HISI_FB_PIXEL_FORMAT_BGRA_8888 },
- /*{ DRM_FORMAT_ARGB8888, },*/
- /*{ DRM_FORMAT_ABGR8888, },*/
+ { DRM_FORMAT_ARGB8888, HISI_FB_PIXEL_FORMAT_RGBA_8888 },
+ { DRM_FORMAT_ABGR8888, HISI_FB_PIXEL_FORMAT_BGRA_8888 },
};
static const u32 channel_formats1[] = {
DRM_FORMAT_RGB565, DRM_FORMAT_BGR565,
DRM_FORMAT_XRGB8888, DRM_FORMAT_XBGR8888,
- DRM_FORMAT_RGBA8888, DRM_FORMAT_BGRA8888
+ DRM_FORMAT_RGBA8888, DRM_FORMAT_BGRA8888,
+ DRM_FORMAT_ARGB8888, DRM_FORMAT_ABGR8888,
};
u32 dss_get_channel_formats(u8 ch, const u32 **formats)
--
2.17.1
More information about the dri-devel
mailing list