[PATCH 1/1] drm/bridge: tc358767: respect (e)DP output resolution limits
Alexander Stein
alexander.stein at ew.tq-group.com
Tue Nov 28 13:39:33 UTC 2023
From: Markus Niebel <Markus.Niebel at ew.tq-group.com>
Modes S21/P21, (e)DP output, support only resolutions up to 1920x1200.
Filter out modes from EDID larger than this limit. This especially
important for 4k monitors.
Signed-off-by: Markus Niebel <Markus.Niebel at ew.tq-group.com>
Signed-off-by: Alexander Stein <alexander.stein at ew.tq-group.com>
---
drivers/gpu/drm/bridge/tc358767.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 019b8f1432a7d..88bdd9dca41d0 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -1646,9 +1646,17 @@ tc_connector_detect(struct drm_connector *connector, bool force)
return connector_status_unknown;
}
+static int tc_fill_modes(struct drm_connector *connector, uint32_t maxX,
+ uint32_t maxY)
+{
+ return drm_helper_probe_single_connector_modes(connector,
+ min(maxX, 1920U),
+ min(maxY, 1200U));
+}
+
static const struct drm_connector_funcs tc_connector_funcs = {
.detect = tc_connector_detect,
- .fill_modes = drm_helper_probe_single_connector_modes,
+ .fill_modes = tc_fill_modes,
.destroy = drm_connector_cleanup,
.reset = drm_atomic_helper_connector_reset,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
--
2.34.1
More information about the dri-devel
mailing list