drm/amd/display: Add IPS checks before dcn register access
authorRoman Li <roman.li@amd.com>
Tue, 9 Jan 2024 22:31:33 +0000 (17:31 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Jan 2024 22:13:27 +0000 (17:13 -0500)
commit60818ed76577c9565cf761b03bc7d1460448b986
treedba4b5600dfbc2e122a72c4b18ba5b713aba2b37
parentb8f2234846d7ebd1347013425ffdead4d123147f
drm/amd/display: Add IPS checks before dcn register access

[Why]
With IPS enabled a system hangs once PSR is active.
PSR active triggers transition to IPS2 state.
While in IPS2 an access to dcn registers results in hard hang.
Existing check doesn't cover for PSR sequence.

[How]
Safeguard register access by disabling idle optimization in atomic commit
and crtc scanout. It will be re-enabled on next vblank.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Roman Li <roman.li@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c