drm: rp1: rp1-dpi: Add DRM_FORMAT_ARGB8888 and DRM_FORMAT_ABGR8888

Android requires this.
As the underlying hardware doesn't support alpha blending,
we ignore the alpha value.

Signed-off-by: Jan Kehren <jan.kehren@emteria.com>
This commit is contained in:
Jan Kehren
2024-08-20 08:08:50 +00:00
committed by Dom Cobley
parent 0cf9fcd8ca
commit c449381e59
2 changed files with 14 additions and 0 deletions

View File

@@ -260,6 +260,8 @@ static struct drm_driver rp1dpi_driver = {
static const u32 rp1dpi_formats[] = {
DRM_FORMAT_XRGB8888,
DRM_FORMAT_XBGR8888,
DRM_FORMAT_ARGB8888,
DRM_FORMAT_ABGR8888,
DRM_FORMAT_RGB888,
DRM_FORMAT_BGR888,
DRM_FORMAT_RGB565

View File

@@ -257,6 +257,18 @@ static const struct rp1dpi_ipixfmt my_formats[] = {
.shift = ISHIFT_RGB(7, 15, 23),
.rgbsz = BITS(DPI_DMA_RGBSZ_BPP, 3),
},
{
.format = DRM_FORMAT_ARGB8888,
.mask = IMASK_RGB(0x3fc, 0x3fc, 0x3fc),
.shift = ISHIFT_RGB(23, 15, 7),
.rgbsz = BITS(DPI_DMA_RGBSZ_BPP, 3),
},
{
.format = DRM_FORMAT_ABGR8888,
.mask = IMASK_RGB(0x3fc, 0x3fc, 0x3fc),
.shift = ISHIFT_RGB(7, 15, 23),
.rgbsz = BITS(DPI_DMA_RGBSZ_BPP, 3),
},
{
.format = DRM_FORMAT_RGB888,
.mask = IMASK_RGB(0x3fc, 0x3fc, 0x3fc),