@@ -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)
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@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Manivannan Sadhasivam <mani@kernel.org> Cc: dri-devel <dri-devel@lists.freedesktop.org> Cc: Liwei Cai <cailiwei@hisilicon.com> Cc: Xinliang Liu <xinliang.liu@linaro.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: John Stultz <john.stultz@linaro.org> --- drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.17.1