amdgpu: add REPLACE and CLEAR checking for VA op (v2)
v2: fix indent Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Emil Velikov <emil.velikov@collabora.com>main
parent
0a4626fead
commit
eead591107
|
@ -703,7 +703,8 @@ int amdgpu_bo_va_op_raw(amdgpu_device_handle dev,
|
||||||
struct drm_amdgpu_gem_va va;
|
struct drm_amdgpu_gem_va va;
|
||||||
int r;
|
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)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
memset(&va, 0, sizeof(va));
|
memset(&va, 0, sizeof(va));
|
||||||
|
|
Loading…
Reference in New Issue