drm/amdgpu: Clear overflow for SRIOV

For VF, it doesn't have the permission to clear overflow, clear the bit
by reset.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Emily Deng
2025-04-08 20:25:43 +08:00
committed by Alex Deucher
parent fb20954c97
commit 5ae4591f4e
4 changed files with 24 additions and 4 deletions

View File

@@ -25,6 +25,7 @@
#include "amdgpu.h"
#include "amdgpu_ih.h"
#include "amdgpu_reset.h"
/**
* amdgpu_ih_ring_init - initialize the IH state
@@ -227,13 +228,23 @@ restart_ih:
ih->rptr &= ih->ptr_mask;
}
amdgpu_ih_set_rptr(adev, ih);
if (!ih->overflow)
amdgpu_ih_set_rptr(adev, ih);
wake_up_all(&ih->wait_process);
/* make sure wptr hasn't changed while processing */
wptr = amdgpu_ih_get_wptr(adev, ih);
if (wptr != ih->rptr)
goto restart_ih;
if (!ih->overflow)
goto restart_ih;
if (ih->overflow)
if (amdgpu_sriov_runtime(adev))
WARN_ONCE(!amdgpu_reset_domain_schedule(adev->reset_domain,
&adev->virt.flr_work),
"Failed to queue work! at %s",
__func__);
return IRQ_HANDLED;
}