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 <seanpaul@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/374959
Commit-Ready: Chris Zhong <zyw@rock-chips.com>
Tested-by: Chris Zhong <zyw@rock-chips.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Change-Id: Ie07dd33e3c121215bf24394cfcb3fff8c7c746a5
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
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);