Commit 8201a67a authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amdgpu: no need to ungate uvd/vce clock when fini.

Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6b16cf77
...@@ -1470,6 +1470,9 @@ static int amdgpu_fini(struct amdgpu_device *adev) ...@@ -1470,6 +1470,9 @@ static int amdgpu_fini(struct amdgpu_device *adev)
amdgpu_wb_fini(adev); amdgpu_wb_fini(adev);
amdgpu_vram_scratch_fini(adev); amdgpu_vram_scratch_fini(adev);
} }
if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE) {
/* ungate blocks before hw fini so that we can shutdown the blocks safely */ /* ungate blocks before hw fini so that we can shutdown the blocks safely */
r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev, r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev,
AMD_CG_STATE_UNGATE); AMD_CG_STATE_UNGATE);
...@@ -1478,12 +1481,15 @@ static int amdgpu_fini(struct amdgpu_device *adev) ...@@ -1478,12 +1481,15 @@ static int amdgpu_fini(struct amdgpu_device *adev)
adev->ip_blocks[i].version->funcs->name, r); adev->ip_blocks[i].version->funcs->name, r);
return r; return r;
} }
}
r = adev->ip_blocks[i].version->funcs->hw_fini((void *)adev); r = adev->ip_blocks[i].version->funcs->hw_fini((void *)adev);
/* XXX handle errors */ /* XXX handle errors */
if (r) { if (r) {
DRM_DEBUG("hw_fini of IP block <%s> failed %d\n", DRM_DEBUG("hw_fini of IP block <%s> failed %d\n",
adev->ip_blocks[i].version->funcs->name, r); adev->ip_blocks[i].version->funcs->name, r);
} }
adev->ip_blocks[i].status.hw = false; adev->ip_blocks[i].status.hw = 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