Commit 0b8794e2 authored by Jack Xiao's avatar Jack Xiao Committed by Alex Deucher

drm/amdgpu/vcn2: don't access register when power gated

It will cause bus hang to access register UVD_STATUS
when VCN is in the state of power gated.
Signed-off-by: default avatarJack Xiao <Jack.Xiao@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a8179d62
...@@ -277,7 +277,8 @@ static int vcn_v2_0_hw_fini(void *handle) ...@@ -277,7 +277,8 @@ static int vcn_v2_0_hw_fini(void *handle)
struct amdgpu_ring *ring = &adev->vcn.ring_dec; struct amdgpu_ring *ring = &adev->vcn.ring_dec;
int i; int i;
if (RREG32_SOC15(VCN, 0, mmUVD_STATUS)) if (adev->vcn.cur_state != AMD_PG_STATE_GATE &&
RREG32_SOC15(VCN, 0, mmUVD_STATUS))
vcn_v2_0_set_powergating_state(adev, AMD_PG_STATE_GATE); vcn_v2_0_set_powergating_state(adev, AMD_PG_STATE_GATE);
ring->sched.ready = false; ring->sched.ready = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment