Skip to content

Commit ea2062d

Browse files
Tom Chungalexdeucher
authored andcommitted
drm/amd/display: fix the system hang while disable PSR
[Why] When the PSR enabled. If you try to adjust the timing parameters, it may cause system hang. Because the timing mismatch with the DMCUB settings. [How] Disable the PSR before adjusting timing parameters. Cc: Mario Limonciello <[email protected]> Cc: Alex Deucher <[email protected]> Cc: [email protected] Acked-by: Stylon Wang <[email protected]> Signed-off-by: Tom Chung <[email protected]> Reviewed-by: Wayne Lin <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent e749dd1 commit ea2062d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8204,6 +8204,12 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
82048204
if (acrtc_state->abm_level != dm_old_crtc_state->abm_level)
82058205
bundle->stream_update.abm_level = &acrtc_state->abm_level;
82068206

8207+
mutex_lock(&dm->dc_lock);
8208+
if ((acrtc_state->update_type > UPDATE_TYPE_FAST) &&
8209+
acrtc_state->stream->link->psr_settings.psr_allow_active)
8210+
amdgpu_dm_psr_disable(acrtc_state->stream);
8211+
mutex_unlock(&dm->dc_lock);
8212+
82078213
/*
82088214
* If FreeSync state on the stream has changed then we need to
82098215
* re-adjust the min/max bounds now that DC doesn't handle this
@@ -8217,10 +8223,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
82178223
spin_unlock_irqrestore(&pcrtc->dev->event_lock, flags);
82188224
}
82198225
mutex_lock(&dm->dc_lock);
8220-
if ((acrtc_state->update_type > UPDATE_TYPE_FAST) &&
8221-
acrtc_state->stream->link->psr_settings.psr_allow_active)
8222-
amdgpu_dm_psr_disable(acrtc_state->stream);
8223-
82248226
update_planes_and_stream_adapter(dm->dc,
82258227
acrtc_state->update_type,
82268228
planes_count,

0 commit comments

Comments
 (0)