[RFC PATCH] drm/amdgpu: fix amdgpu_vm_handle_fault return value

Nirmoy nirmodas at amd.com
Thu Oct 10 11:27:01 UTC 2019


On 10/10/19 1:19 PM, Koenig, Christian wrote:
> Am 10.10.19 um 12:42 schrieb Nirmoy Das:
>> 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

> We could actually change the return value to void until that one lands,
> Christian.
>
>> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
>> ---
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index d9bece987e60..6f468c6ffef2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -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;
>>    }


More information about the amd-gfx mailing list