diff options
author | Liu Ying <victor.liu@nxp.com> | 2018-04-12 17:57:59 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 0f589934a0e19c7c9a79665bb1c6ea4ac6b93266 (patch) | |
tree | 820d45e547f6d9d8f181aa06864a845e6e994cb1 /drivers/gpu/imx/imx8_dprc.c | |
parent | 5455cf8e69fda6f109d2cfe8e7db1b1daa45e297 (diff) |
MLK-18012-3 gpu: imx: imx8_dprc: Add 32bpp local alpha RGB pfmts support
This patch adds 32bpp local alpha RGB pixel formats support
in the dprc driver.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Diffstat (limited to 'drivers/gpu/imx/imx8_dprc.c')
-rw-r--r-- | drivers/gpu/imx/imx8_dprc.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/imx/imx8_dprc.c b/drivers/gpu/imx/imx8_dprc.c index 1acabdf40085..26cdef787796 100644 --- a/drivers/gpu/imx/imx8_dprc.c +++ b/drivers/gpu/imx/imx8_dprc.c @@ -191,18 +191,34 @@ static const struct dprc_format_info formats[] = { .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, }, { + .format = DRM_FORMAT_ARGB8888, + .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, + }, { .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, }, { + .format = DRM_FORMAT_ABGR8888, + .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, + }, { .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, }, { + .format = DRM_FORMAT_RGBA8888, + .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, + }, { .format = DRM_FORMAT_RGBX8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, }, { + .format = DRM_FORMAT_BGRA8888, + .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, + .hsub = 1, .vsub = 1, + }, { .format = DRM_FORMAT_BGRX8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, @@ -461,9 +477,13 @@ void dprc_configure(struct dprc *dprc, unsigned int stream_id, val |= BUF2; val &= ~(PIX_COMP_SEL_MASK | PIX_SIZE); switch (format) { + case DRM_FORMAT_ARGB8888: case DRM_FORMAT_XRGB8888: + case DRM_FORMAT_ABGR8888: case DRM_FORMAT_XBGR8888: + case DRM_FORMAT_RGBA8888: case DRM_FORMAT_RGBX8888: + case DRM_FORMAT_BGRA8888: case DRM_FORMAT_BGRX8888: /* * It turns out pixel components are mapped directly @@ -614,9 +634,13 @@ bool dprc_format_supported(struct dprc *dprc, u32 format, u64 modifier) return false; switch (format) { + case DRM_FORMAT_ARGB8888: case DRM_FORMAT_XRGB8888: + case DRM_FORMAT_ABGR8888: case DRM_FORMAT_XBGR8888: + case DRM_FORMAT_RGBA8888: case DRM_FORMAT_RGBX8888: + case DRM_FORMAT_BGRA8888: case DRM_FORMAT_BGRX8888: case DRM_FORMAT_RGB565: return (modifier == DRM_FORMAT_MOD_NONE || |