mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 18:40:10 +00:00
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:
@@ -260,6 +260,8 @@ static struct drm_driver rp1dpi_driver = {
|
|||||||
static const u32 rp1dpi_formats[] = {
|
static const u32 rp1dpi_formats[] = {
|
||||||
DRM_FORMAT_XRGB8888,
|
DRM_FORMAT_XRGB8888,
|
||||||
DRM_FORMAT_XBGR8888,
|
DRM_FORMAT_XBGR8888,
|
||||||
|
DRM_FORMAT_ARGB8888,
|
||||||
|
DRM_FORMAT_ABGR8888,
|
||||||
DRM_FORMAT_RGB888,
|
DRM_FORMAT_RGB888,
|
||||||
DRM_FORMAT_BGR888,
|
DRM_FORMAT_BGR888,
|
||||||
DRM_FORMAT_RGB565
|
DRM_FORMAT_RGB565
|
||||||
|
|||||||
@@ -257,6 +257,18 @@ static const struct rp1dpi_ipixfmt my_formats[] = {
|
|||||||
.shift = ISHIFT_RGB(7, 15, 23),
|
.shift = ISHIFT_RGB(7, 15, 23),
|
||||||
.rgbsz = BITS(DPI_DMA_RGBSZ_BPP, 3),
|
.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,
|
.format = DRM_FORMAT_RGB888,
|
||||||
.mask = IMASK_RGB(0x3fc, 0x3fc, 0x3fc),
|
.mask = IMASK_RGB(0x3fc, 0x3fc, 0x3fc),
|
||||||
|
|||||||
Reference in New Issue
Block a user