drm/amd/display: Do not skip FBC init in failsafe mode
authorMikita Lipski <mikita.lipski@amd.com>
Mon, 28 May 2018 14:08:30 +0000 (10:08 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Jun 2018 17:25:04 +0000 (12:25 -0500)
Initially FBC would be initialized if display's edid was correct
and all the modes acquired from it, but n case when edid is corrupted
or non-existant we must still initialize FBC.

Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index b1b8d1914b31545c0a41ef0c26cfc5c5fb08c652..a1c912bc959af80331cc07ac2f316e6a5dc86cb7 100644 (file)
@@ -3425,12 +3425,12 @@ static int amdgpu_dm_connector_get_modes(struct drm_connector *connector)
 
        encoder = helper->best_encoder(connector);
 
-       if (!edid || !drm_edid_is_valid(edid))
-               return drm_add_modes_noedid(connector, 640, 480);
-
-       amdgpu_dm_connector_ddc_get_modes(connector, edid);
-       amdgpu_dm_connector_add_common_modes(encoder, connector);
-
+       if (!edid || !drm_edid_is_valid(edid)) {
+               drm_add_modes_noedid(connector, 640, 480);
+       } else {
+               amdgpu_dm_connector_ddc_get_modes(connector, edid);
+               amdgpu_dm_connector_add_common_modes(encoder, connector);
+       }
        amdgpu_dm_fbc_init(connector);
 
        return amdgpu_dm_connector->num_modes;