1 From 9f0523de1b7ef122fae527326372a4ab5aa42fa6 Mon Sep 17 00:00:00 2001
2 From: Jan Kehren <jan.kehren@emteria.com>
3 Date: Tue, 20 Aug 2024 08:08:50 +0000
4 Subject: [PATCH 1223/1350] drm: rp1: rp1-dpi: Add DRM_FORMAT_ARGB8888 and
8 As the underlying hardware doesn't support alpha blending,
9 we ignore the alpha value.
11 Signed-off-by: Jan Kehren <jan.kehren@emteria.com>
13 drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi.c | 2 ++
14 drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi_hw.c | 12 ++++++++++++
15 2 files changed, 14 insertions(+)
17 --- a/drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi.c
18 +++ b/drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi.c
19 @@ -260,6 +260,8 @@ static struct drm_driver rp1dpi_driver =
20 static const u32 rp1dpi_formats[] = {
23 + DRM_FORMAT_ARGB8888,
24 + DRM_FORMAT_ABGR8888,
28 --- a/drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi_hw.c
29 +++ b/drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi_hw.c
30 @@ -258,6 +258,18 @@ static const struct rp1dpi_ipixfmt my_fo
31 .rgbsz = BITS(DPI_DMA_RGBSZ_BPP, 3),
34 + .format = DRM_FORMAT_ARGB8888,
35 + .mask = IMASK_RGB(0x3fc, 0x3fc, 0x3fc),
36 + .shift = ISHIFT_RGB(23, 15, 7),
37 + .rgbsz = BITS(DPI_DMA_RGBSZ_BPP, 3),
40 + .format = DRM_FORMAT_ABGR8888,
41 + .mask = IMASK_RGB(0x3fc, 0x3fc, 0x3fc),
42 + .shift = ISHIFT_RGB(7, 15, 23),
43 + .rgbsz = BITS(DPI_DMA_RGBSZ_BPP, 3),
46 .format = DRM_FORMAT_RGB888,
47 .mask = IMASK_RGB(0x3fc, 0x3fc, 0x3fc),
48 .shift = ISHIFT_RGB(23, 15, 7),