[PATCH libdrm] amdgpu: add error return value for finding bo by cpu mapping

Michel Dänzer michel at daenzer.net
Thu Aug 30 08:57:54 UTC 2018


On 2018-08-30 10:50 a.m., Junwei Zhang wrote:
> If nothing is found, error should be returned.
> 
> Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
> 
> [...]
>  
> @@ -577,10 +578,11 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,
>  	} else {
>  		*buf_handle = NULL;
>  		*offset_in_bo = 0;
> +		r = -EINVAL;

I think -ENOENT would be better, to differentiate this error from
passing invalid pointer / size parameters.

With that,

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list