From: Sean Paul Date: Wed, 24 Aug 2016 14:25:29 +0000 (-0400) Subject: FROMLIST: drm/bridge: analogix_dp: Don't read EDID if panel present X-Git-Tag: firefly_0821_release~367 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=22f222066804006139c0796a28084c34315ed780;p=firefly-linux-kernel-4.4.55.git FROMLIST: 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. BUG=chrome-os-partner:53565 TEST=Boot device and confirm the modes returned are from panel driver instead of EDID [from https://patchwork.freedesktop.org/patch/107115/] Signed-off-by: Sean Paul Reviewed-on: https://chromium-review.googlesource.com/374959 Commit-Ready: Chris Zhong Tested-by: Chris Zhong Reviewed-by: Stéphane Marchesin Change-Id: Ie07dd33e3c121215bf24394cfcb3fff8c7c746a5 Signed-off-by: Mark Yao --- diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 58f0d294f8c1..31f384b096a6 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -931,14 +931,13 @@ int analogix_dp_get_modes(struct drm_connector *connector) pm_runtime_get_sync(dp->dev); - if (analogix_dp_handle_edid(dp) == 0) { + if (dp->plat_data->panel) { + num_modes += drm_panel_get_modes(dp->plat_data->panel); + } else if (analogix_dp_handle_edid(dp) == 0) { drm_mode_connector_update_edid_property(&dp->connector, edid); num_modes += drm_add_edid_modes(&dp->connector, edid); } - if (dp->plat_data->panel) - num_modes += drm_panel_get_modes(dp->plat_data->panel); - if (dp->plat_data->get_modes) num_modes += dp->plat_data->get_modes(dp->plat_data, connector);