History

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.

Alex Deucher committed 3 years ago

Commit 7d3f1d71 parent 7a41ed81 file · +6 −1Browse files

Unified · Split

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c+6−1
@@ -2753,7 +2753,12 @@ void amdgpu_vm_update_fault_cache(struct amdgpu_device *adev, · 2752 unmodified lines
27532753 xa_lock_irqsave(&adev->vm_manager.pasids, flags);
27542754
27552755 vm = xa_load(&adev->vm_manager.pasids, pasid);
2756− if (vm) {
2756+ /* Don't update the fault cache if status is 0. In the multiple
2757+ * fault case, subsequent faults will return a 0 status which is
2758+ * useless for userspace and replaces the useful fault status, so
2759+ * only update if status is non-0.
2760+ */
2761+ if (vm && status) {
27572762 vm->fault_info.addr = addr;
27582763 vm->fault_info.status = status;
27592764 if (AMDGPU_IS_GFXHUB(vmhub)) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t