mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
From 4cf35266cbe9737b75a135031e8f992794764e9c Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Thu, 2 Dec 2021 18:28:29 +0000
|
|
Subject: [PATCH 612/828] drm/vc4: dpi: Ensure a default format is selected
|
|
|
|
In a couple of error/incomplete configuration cases, the
|
|
DPI_FORMAT bits wouldn't get set.
|
|
|
|
Adopt a default of RGB666 in all these cases.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_dpi.c | 13 +++++++++----
|
|
1 file changed, 9 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
|
|
@@ -173,6 +173,10 @@ static void vc4_dpi_encoder_enable(struc
|
|
dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR,
|
|
DPI_ORDER);
|
|
break;
|
|
+ default:
|
|
+ DRM_ERROR("Unknown media bus format %d\n",
|
|
+ bus_format);
|
|
+ fallthrough;
|
|
case MEDIA_BUS_FMT_RGB666_1X18:
|
|
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1,
|
|
DPI_FORMAT);
|
|
@@ -187,11 +191,12 @@ static void vc4_dpi_encoder_enable(struc
|
|
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3,
|
|
DPI_FORMAT);
|
|
break;
|
|
- default:
|
|
- DRM_ERROR("Unknown media bus format %d\n",
|
|
- bus_format);
|
|
- break;
|
|
}
|
|
+ } else {
|
|
+ /* Default to 18bit if no connector found. */
|
|
+ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1,
|
|
+ DPI_FORMAT);
|
|
+
|
|
}
|
|
|
|
if (connector->display_info.bus_flags &
|