2142cf58ce9f096548e85c13736f39e816247eec
[openwrt/staging/xback.git] /
1 From 1c22021723d142524d744f6e2a6d81fc39b1b366 Mon Sep 17 00:00:00 2001
2 From: Chris Morgan <macromorgan@hotmail.com>
3 Date: Fri, 28 Jan 2022 17:39:54 -0600
4 Subject: [PATCH] drm/vc4: dpi: Support DPI interface in mode3 for
5 RGB565
6
7 Add support for the VC4 DPI driver to utilize DPI mode 3. This is
8 defined here as xxxRRRRRxxGGGGGGxxxBBBBB:
9 https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#parallel-display-interface-dpi
10
11 This mode is required to use the Geekworm MZP280 DPI display.
12
13 Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
14 Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
15 ---
16 drivers/gpu/drm/vc4/vc4_dpi.c | 4 ++++
17 1 file changed, 4 insertions(+)
18
19 --- a/drivers/gpu/drm/vc4/vc4_dpi.c
20 +++ b/drivers/gpu/drm/vc4/vc4_dpi.c
21 @@ -188,6 +188,10 @@ static void vc4_dpi_encoder_enable(struc
22 dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_1,
23 DPI_FORMAT);
24 break;
25 + case MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
26 + dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_2,
27 + DPI_FORMAT);
28 + break;
29 default:
30 DRM_ERROR("Unknown media bus format %d\n",
31 bus_format);