Skip to contentSkip to conversation

amdgpu: add REPLACE and CLEAR checking for VA op (v2)

PATCH In review Junwei Zhang 3 participants 3 messages Mar 22, 2017 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 amdgpu: add REPLACE and CLEAR checking for VA op (v2)

v2: fix indent

---
 amdgpu/amdgpu_bo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
amdgpu/amdgpu_bo.c +3 -1
index 71cd666..850fe8c 100644
@@ -952,7 +952,9 @@ 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)
+
 		return -EINVAL;
 
 	memset(&va, 0, sizeof(va));
Signature · 6 lines
1.9.1

_______________________________________________
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): 1490152440-3721-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 3 lines · Junwei Zhang

v2: fix indent

Quoted 10 lines
---
 amdgpu/amdgpu_bo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
amdgpu/amdgpu_bo.c +0 -0
index 71cd666..850fe8c 100644

amdgpu/amdgpu_bo.c int amdgpu_bo_va_op_raw(amdgpu_device_handle dev, · line 960

Quoted 10 lines
amdgpu/amdgpu_bo.c +3 -1
@@ -952,7 +952,9 @@ 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)
+
 		return -EINVAL;
 
 	memset(&va, 0, sizeof(va));

_______________________________________________
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): 6e194b66-d14d-5b43-cd7b-2e5534738c16-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Reviewed-by
#4 lore raw

Am 22.03.2017 um 07:31 schrieb Nicolai Hähnle:

Quoted 6 lines · Junwei Zhang
Quoted 3 lines

v2: fix indent

Quoted 20 lines
Quoted 20 lines

---
 amdgpu/amdgpu_bo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
amdgpu/amdgpu_bo.c +3 -1
index 71cd666..850fe8c 100644
@@ -952,7 +952,9 @@ 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)
+
         return -EINVAL;
 
Quoted 7 lines

amdgpu/amdgpu_bo.c int amdgpu_bo_va_op_raw(amdgpu_device_handle dev, · line 960

Quoted 2 lines
amdgpu/amdgpu_bo.c +0 -0
     memset(&va, 0, sizeof(va));

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

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