*** [libdrm] add REPLACE and CLEAR for VA op ***
cover *** [libdrm] add REPLACE and CLEAR for VA op ***
Based on latest PRT support by Nicolai
Junwei Zhang (2):
amdgpu: add new VA operations CLEAR and REPLACE
amdgpu: add REPLACE and CLEAR checking for VA op
amdgpu/amdgpu_bo.c | 5 ++++- include/drm/amdgpu_drm.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-)
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): 1489730362-31095-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org
PATCH 1/2 amdgpu: add new VA operations CLEAR and REPLACE
--- include/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+)
include/drm/amdgpu_drm.h +2 -0
@@ -410,6 +410,8 @@ struct drm_amdgpu_gem_op {#define AMDGPU_VA_OP_MAP 1#define AMDGPU_VA_OP_UNMAP 2 +#define AMDGPU_VA_OP_CLEAR 3 +#define AMDGPU_VA_OP_REPLACE 4/* Delay the page table update till the next CS */ #define AMDGPU_VM_DELAY_UPDATE (1 << 0)
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): 1489730362-31095-2-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 1/2] amdgpu: add new VA operations CLEAR and REPLACE
This should use the proper procedure for updating amdgpu_drm.h, as explained in include/drm/README. I can take care of this as soon as all the kernel patches for PRT are in a tree that doesn't rebase (i.e. agd5f/drm-next-4.12 or airlied/drm-next).
Nicolai
Quoted 11 lines · Junwei Zhang
Signed-off-by Junwei Zhang <[email protected]>--- include/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+)include/drm/amdgpu_drm.h +0
-0
include/drm/amdgpu_drm.h struct drm_amdgpu_gem_op { · line 417
Quoted 8 lines
include/drm/amdgpu_drm.h +2
-0@@ -410,6 +410,8 @@ struct drm_amdgpu_gem_op {#define AMDGPU_VA_OP_MAP 1#define AMDGPU_VA_OP_UNMAP 2 +#define AMDGPU_VA_OP_CLEAR 3 +#define AMDGPU_VA_OP_REPLACE 4/* Delay the page table update till the next CS */ #define AMDGPU_VM_DELAY_UPDATE (1 << 0)
_______________________________________________
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): ace47633-adf1-9055-5e08-1803f2f026c4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH 1/2] amdgpu: add new VA operations CLEAR and REPLACE
Quoted 4 lines · Nicolai Hähnle
This should use the proper procedure for updating
amdgpu_drm.h, as explained ininclude/drm/README. I can take care of this as soon as all the kernel patches for PRT are in a tree that doesn't rebase (i.e. agd5f/drm-next-4.12 or airlied/drm-next).
Thanks, got it.
Jerry
Quoted 15 lines
Nicolai
Quoted 11 lines · Junwei Zhang
Signed-off-by Junwei Zhang <[email protected]>--- include/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+)include/drm/amdgpu_drm.h +0
-0@@ -410,6 +410,8 @@ struct drm_amdgpu_gem_op {
Quoted 9 lines
include/drm/amdgpu_drm.h struct drm_amdgpu_gem_op { · line 417
Quoted 8 lines
include/drm/amdgpu_drm.h +2
-0#define AMDGPU_VA_OP_MAP 1#define AMDGPU_VA_OP_UNMAP 2 +#define AMDGPU_VA_OP_CLEAR 3 +#define AMDGPU_VA_OP_REPLACE 4/* Delay the page table update till the next CS */ #define AMDGPU_VM_DELAY_UPDATE (1 << 0)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/2 amdgpu: add REPLACE and CLEAR checking for VA op
In reply to a message not in the archive--- amdgpu/amdgpu_bo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
amdgpu/amdgpu_bo.c +4 -1
@@ -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 ) +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): 1489730362-31095-3-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 2/2] amdgpu: add REPLACE and CLEAR checking for VA op
Quoted 10 lines · Junwei Zhang
Signed-off-by Junwei Zhang <[email protected]>--- amdgpu/amdgpu_bo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)amdgpu/amdgpu_bo.c +0
-0
amdgpu/amdgpu_bo.c int amdgpu_bo_va_op_raw(amdgpu_device_handle dev, · line 957
Quoted 7 lines
amdgpu/amdgpu_bo.c +3
-1@@ -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
amdgpu/amdgpu_bo.c int amdgpu_bo_va_op_raw(amdgpu_device_handle dev, · line 961
Quoted 5 lines
amdgpu/amdgpu_bo.c +1
-0+return -EINVAL ;memset (&va,0 ,sizeof (va));
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx