diff options
| author | Alex Deucher <[email protected]> | 2023-07-26 21:09:40 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-10-05 21:49:51 +0000 |
| commit | 7d3f1d76f33dbeca5ffb2cb424f1e3b7e34c8d45 (patch) | |
| tree | ba9df4f6b1d2160f8f89ac85755cf74f70c7eacd /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | drm/amdgpu: add new INFO ioctl query for the last GPU page fault (diff) | |
| download | kernel-7d3f1d76f33dbeca5ffb2cb424f1e3b7e34c8d45.tar.gz kernel-7d3f1d76f33dbeca5ffb2cb424f1e3b7e34c8d45.zip | |
drm/amdgpu: refine fault cache updates
Don't update the fault cache if status is 0. In the multiple
fault case, subsequent faults will return a 0 status which is
useless for userspace and replaces the useful fault status, so
only update if status is non-0.
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 4058ed49e5a6..afc19341334f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -2753,7 +2753,12 @@ void amdgpu_vm_update_fault_cache(struct amdgpu_device *adev, xa_lock_irqsave(&adev->vm_manager.pasids, flags); vm = xa_load(&adev->vm_manager.pasids, pasid); - if (vm) { + /* Don't update the fault cache if status is 0. In the multiple + * fault case, subsequent faults will return a 0 status which is + * useless for userspace and replaces the useful fault status, so + * only update if status is non-0. + */ + if (vm && status) { vm->fault_info.addr = addr; vm->fault_info.status = status; if (AMDGPU_IS_GFXHUB(vmhub)) { |
