Skip to contentSkip to conversation

drm/amdgpu: fix amdgpu_vm_handle_fault return value

RFC PATCH NAK Nirmoy Das 3 participants 3 messages Oct 10, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

RFC PATCH 1/1 drm/amdgpu: fix amdgpu_vm_handle_fault return value

amdgpu_vm_handle_fault should return true on success

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
index d9bece987e60..6f468c6ffef2 100644
@@ -3215,5 +3215,5 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid,
 error_unref:
 	amdgpu_bo_unref(&root);
 
-	return false;
+	return (r == 0) ? true : false;
 }
Signature · 6 lines
2.23.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Am 10.10.19 um 12:42 schrieb Nirmoy Das:

Quoted 1 line

amdgpu_vm_handle_fault should return true on success

NAK, that is intentional.

There is a follow up patch which didn't made it into our server branch which implements faults handling.

We could actually change the return value to void until that one lands, Christian.

Quoted 11 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
index d9bece987e60..6f468c6ffef2 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid, · line 3219

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
@@ -3215,5 +3215,5 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid,
  error_unref:
  	amdgpu_bo_unref(&root);
 
-	return false;
+	return (r == 0) ? true : false;
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): df4bd681-d745-4cb0-3dec-38e826f4c9fe-5C7GfCeVMHo@public.gmane.org

#4 lore raw
Quoted 6 lines · Christian

Am 10.10.19 um 12:42 schrieb Nirmoy Das:

Quoted 1 line

amdgpu_vm_handle_fault should return true on success

NAK, that is intentional.

There is a follow up patch which didn't made it into our server branch which implements faults handling.

In that case I think it is good as it is.

Thanks,

Nirmoy

Quoted 16 lines

We could actually change the return value to void until that one lands, Christian.

Quoted 13 lines
---
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
index d9bece987e60..6f468c6ffef2 100644
@@ -3215,5 +3215,5 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid,
   error_unref:
   	amdgpu_bo_unref(&root);
 
Quoted 3 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, unsigned int pasid, · line 3219

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
-	return false;
+	return (r == 0) ? true : false;
   }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx