[PATCH 2/2] amdgpu: add REPLACE and CLEAR checking for VA op

Nicolai Hähnle nhaehnle at gmail.com
Tue Mar 21 13:31:27 UTC 2017


On 17.03.2017 06:59, Junwei Zhang wrote:
> Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
> ---
>  amdgpu/amdgpu_bo.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
> index 71cd666..8fe3cfd 100644
> --- a/amdgpu/amdgpu_bo.c
> +++ b/amdgpu/amdgpu_bo.c
> @@ -952,7 +952,10 @@ int amdgpu_bo_va_op_raw(amdgpu_device_handle dev,
>  	struct drm_amdgpu_gem_va va;
>  	int r;
>
> -	if (ops != AMDGPU_VA_OP_MAP && ops != AMDGPU_VA_OP_UNMAP)
> +	if (ops != AMDGPU_VA_OP_MAP && ops != AMDGPU_VA_OP_UNMAP &&
> +			ops != AMDGPU_VA_OP_REPLACE &&
> +			ops != AMDGPU_VA_OP_CLEAR)

The indentation looks wrong. I believe the style is to use spaces so 
that the first 'ops' in each row lines up.

Cheers,
Nicolai

> +
>  		return -EINVAL;
>
>  	memset(&va, 0, sizeof(va));
>



More information about the amd-gfx mailing list