mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
drm/amdgpu: move WB_FREE to correct place
WB_FREE should be put after all engines's hw_fini done, otherwise the invalid wptr/rptr_addr would still be used by engines which trigger abnormal bugs. This fixes couple DMAR reading error in host side for SRIOV after guest kmd is unloaded. Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9f51943c2a
commit
a4ef6edc8e
1 changed files with 7 additions and 5 deletions
|
@ -1455,11 +1455,6 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
|
||||||
for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
|
for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
|
||||||
if (!adev->ip_blocks[i].status.hw)
|
if (!adev->ip_blocks[i].status.hw)
|
||||||
continue;
|
continue;
|
||||||
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC) {
|
|
||||||
amdgpu_free_static_csa(adev);
|
|
||||||
amdgpu_device_wb_fini(adev);
|
|
||||||
amdgpu_device_vram_scratch_fini(adev);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
|
if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
|
||||||
adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE) {
|
adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE) {
|
||||||
|
@ -1486,6 +1481,13 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
|
||||||
for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
|
for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
|
||||||
if (!adev->ip_blocks[i].status.sw)
|
if (!adev->ip_blocks[i].status.sw)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC) {
|
||||||
|
amdgpu_free_static_csa(adev);
|
||||||
|
amdgpu_device_wb_fini(adev);
|
||||||
|
amdgpu_device_vram_scratch_fini(adev);
|
||||||
|
}
|
||||||
|
|
||||||
r = adev->ip_blocks[i].version->funcs->sw_fini((void *)adev);
|
r = adev->ip_blocks[i].version->funcs->sw_fini((void *)adev);
|
||||||
/* XXX handle errors */
|
/* XXX handle errors */
|
||||||
if (r) {
|
if (r) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue