drm/bridge: analogix: fix edid not works
authorMark Yao <mark.yao@rock-chips.com>
Mon, 17 Apr 2017 03:00:18 +0000 (11:00 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 17 Apr 2017 07:04:44 +0000 (15:04 +0800)
Change-Id: I1a964b51d0d137e66ad5d073a2eef2fb22770bba
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c

index 6ac31a9..ff2b881 100644 (file)
@@ -938,9 +938,10 @@ int analogix_dp_get_modes(struct drm_connector *connector)
 
        pm_runtime_get_sync(dp->dev);
 
-       if (dp->plat_data->panel) {
+       if (dp->plat_data->panel)
                num_modes += drm_panel_get_modes(dp->plat_data->panel);
-       } else if (analogix_dp_handle_edid(dp) == 0) {
+
+       if (!num_modes && !analogix_dp_handle_edid(dp)) {
                drm_mode_connector_update_edid_property(&dp->connector, edid);
                num_modes += drm_add_edid_modes(&dp->connector, edid);
        }