[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1472050706-32911-1-git-send-email-seanpaul@chromium.org>
Date: Wed, 24 Aug 2016 10:58:26 -0400
From: Sean Paul <seanpaul@...omium.org>
To: dri-devel@...ts.freedesktop.org, ykk@...k-chips.com,
yzq@...k-chips.com, thierry.reding@...il.com,
architt@...eaurora.org
Cc: tomeu.vizoso@...labora.com, daniel.vetter@...el.com,
javier@....samsung.com, linux-kernel@...r.kernel.org,
Sean Paul <seanpaul@...omium.org>
Subject: [PATCH] drm/bridge: analogix_dp: Don't read EDID if panel present
If there's a panel connected to the analogix_dp bridge, rely on
the panel driver for modes, rather than reading EDID *and* calling
get_modes() on the panel.
This allows panels with a valid EDID to read it in the panel driver
(e.g. simple_panel), and panels with invalid EDID to homebrew modes
in their get_modes implementation.
Signed-off-by: Sean Paul <seanpaul@...omium.org>
---
This patch is based on Tomeu's cleanup patch which can be found
here: https://patchwork.freedesktop.org/patch/107114/
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 774cc796..e9c9aeb 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -930,15 +930,17 @@ int analogix_dp_get_modes(struct drm_connector *connector)
return 0;
}
- edid = drm_get_edid(connector, &dp->aux.ddc);
- if (edid) {
- drm_mode_connector_update_edid_property(&dp->connector, edid);
- num_modes += drm_add_edid_modes(&dp->connector, edid);
- kfree(edid);
- }
-
- if (dp->plat_data->panel)
+ if (dp->plat_data->panel) {
num_modes += drm_panel_get_modes(dp->plat_data->panel);
+ } else {
+ edid = drm_get_edid(connector, &dp->aux.ddc);
+ if (edid) {
+ drm_mode_connector_update_edid_property(&dp->connector,
+ edid);
+ num_modes += drm_add_edid_modes(&dp->connector, edid);
+ kfree(edid);
+ }
+ }
if (dp->plat_data->get_modes)
num_modes += dp->plat_data->get_modes(dp->plat_data, connector);
--
2.8.0.rc3.226.g39d4020
Powered by blists - more mailing lists