Skip to content

Commit

Permalink
drm/amd/display: Do not skip FBC init in failsafe mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mikita Lipski authored and Alex Deucher committed Jun 15, 2018
1 parent e952230 commit 85ee15d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 85ee15d

Please sign in to comment.