drm/vc4: dpi: Support DPI interface in mode3 for RGB565
authorChris Morgan <macromorgan@hotmail.com>
Fri, 28 Jan 2022 23:39:54 +0000 (17:39 -0600)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Tue, 1 Feb 2022 21:20:21 +0000 (21:20 +0000)
Add support for the VC4 DPI driver to utilize DPI mode 3. This is
defined here as xxxRRRRRxxGGGGGGxxxBBBBB:
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#parallel-display-interface-dpi

This mode is required to use the Geekworm MZP280 DPI display.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/vc4/vc4_dpi.c

index 08147d0eab8370f3166bd42ba3ca1b45d05ecbee..0d4fb6818d51618a3aeebe81ad83858877f4457e 100644 (file)
@@ -191,6 +191,10 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder)
                                dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3,
                                                       DPI_FORMAT);
                                break;
+                       case MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
+                               dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_2,
+                                                      DPI_FORMAT);
+                               break;
                        }
                } else {
                        /* Default to 18bit if no connector found. */