1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.6/target/linux/bcm27xx/patches-6.6/0038-drm-vc4-Limit-max_bpc-to-8-on-Pi0-3.patch
Ycarus (Yannick Chabanois) 12de1d2995 Add RPI kernel 6.6 support
2024-04-05 20:55:33 +02:00

42 lines
1.5 KiB
Diff

From accb4b40a97c432b8a83f6fedf12b015aebb711d Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Mon, 24 Apr 2023 18:32:45 +0100
Subject: [PATCH 0038/1002] drm/vc4: Limit max_bpc to 8 on Pi0-3
Pi 0-3 have no deep colour support and only 24bpp output,
so max_bpc should remain as 8.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/gpu/drm/vc4/vc4_hdmi.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index 97e40e3f7ce5..b2c1e637d27a 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -756,7 +756,6 @@ static int vc4_hdmi_connector_init(struct drm_device *dev,
drm_connector_attach_colorspace_property(connector);
drm_connector_attach_tv_margin_properties(connector);
- drm_connector_attach_max_bpc_property(connector, 8, 12);
connector->polled = (DRM_CONNECTOR_POLL_CONNECT |
DRM_CONNECTOR_POLL_DISCONNECT);
@@ -765,8 +764,12 @@ static int vc4_hdmi_connector_init(struct drm_device *dev,
connector->doublescan_allowed = 0;
connector->stereo_allowed = 1;
- if (vc4_hdmi->variant->supports_hdr)
+ if (vc4_hdmi->variant->supports_hdr) {
+ drm_connector_attach_max_bpc_property(connector, 8, 12);
drm_connector_attach_hdr_output_metadata_property(connector);
+ } else {
+ drm_connector_attach_max_bpc_property(connector, 8, 8);
+ }
vc4_hdmi_attach_broadcast_rgb_property(dev, vc4_hdmi);
--
2.44.0