drm/amd/display: Fix in disabling secure display
authorAlan Liu <HaoPing.Liu@amd.com>
Wed, 22 Mar 2023 05:43:28 +0000 (13:43 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Apr 2023 20:28:52 +0000 (16:28 -0400)
commit785b250e33c7b1a9dcdb262eac691cd33ac7a53a
tree2bb80e21b46542c6e82fc96acdfcb41739826581
parent4ad3ee5ccc77aa3f9d702f7b9ad4d9cfeca6c443
drm/amd/display: Fix in disabling secure display

[Why]
Currently we don't check if secure display is enabled before we send
command to disable secure display in dmub. It will accidentally cause
some other igt tests to fail, eg, crtc-linear-degamma.

[How]
Refactor the code we reset the secure display state to check secure
display was enabled or not before stopping it in dmub.

Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alan Liu <HaoPing.Liu@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_crc.c