drm/amdgpu/vcn:Always gate vcn block during hw finishing
authorJames Zhu <James.Zhu@amd.com>
Wed, 12 Dec 2018 19:46:10 +0000 (14:46 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Dec 2018 22:38:24 +0000 (17:38 -0500)
Under Dynamic Power Gate mode, UVD_STATUS needn't be checked.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c

index 4f8352044563415876ea80de0f00a6b02ddbb79b..775204315888f10332ed0352d0dc4e766262016b 100644 (file)
@@ -214,7 +214,8 @@ static int vcn_v1_0_hw_fini(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        struct amdgpu_ring *ring = &adev->vcn.ring_dec;
 
-       if (RREG32_SOC15(VCN, 0, mmUVD_STATUS))
+       if ((adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) ||
+               RREG32_SOC15(VCN, 0, mmUVD_STATUS))
                vcn_v1_0_set_powergating_state(adev, AMD_PG_STATE_GATE);
 
        ring->sched.ready = false;