diff options
author | Leo (Sunpeng) Li <sunpeng.li@amd.com> | 2017-11-10 15:02:19 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-28 17:55:26 -0500 |
commit | 8ffca5dca093cdd25264e782cc0c4539cb318925 (patch) | |
tree | f780d5fb3940769939df3af82216f9895813bc11 | |
parent | 1b61973f9e0e7724bdc779ef3f9b55bd21b08db4 (diff) |
drm/amd/display: Do DC mode-change check when adding CRTCs
Within atomic check, dm_update_crtcs_state is called twice. First to
remove from the dc_state, and subsequently to add to it.
In both calls, a secondary mode-change check is done using dc-level
states. We shouldn't be doing this while removing, since a new
dc_stream_state has not been created to do the necessary comparison.
Because of this, the mode_changed flag within the DRM state can be
mistakenly set to false. Doing so only when adding prevents this.
We are also guaranteed that a call to add will come after remove, or
else the atomic check fails (and a commit will not happen).
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@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>
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 5293604a894b..8b0fb25d84a6 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |||
@@ -4460,7 +4460,7 @@ static int dm_update_crtcs_state(struct dc *dc, | |||
4460 | } | 4460 | } |
4461 | } | 4461 | } |
4462 | 4462 | ||
4463 | if (dc_is_stream_unchanged(new_stream, dm_old_crtc_state->stream) && | 4463 | if (enable && dc_is_stream_unchanged(new_stream, dm_old_crtc_state->stream) && |
4464 | dc_is_stream_scaling_unchanged(new_stream, dm_old_crtc_state->stream)) { | 4464 | dc_is_stream_scaling_unchanged(new_stream, dm_old_crtc_state->stream)) { |
4465 | 4465 | ||
4466 | new_crtc_state->mode_changed = false; | 4466 | new_crtc_state->mode_changed = false; |