Re: [Intel-gfx] [PATCH 03/10] drm/syncobj: add new drm_syncobj_add_point interface v2

2018-12-12 Thread Chunming Zhou
gt;> Sent: Wednesday, December 12, 2018 7:15 PM >>> To: Koenig, Christian >>> Cc: Zhou, David(ChunMing) ; dri-devel >> de...@lists.freedesktop.org>; amd-gfx list ; >>> intel-gfx ; Christian König >>> >>> Subject: Re: [Intel-gfx] [PATC

[Intel-gfx] [PATCH i-g-t] igt: add timeline test cases v2

2018-12-11 Thread Chunming Zhou
v2: adapt to new transfer ioctl Signed-off-by: Chunming Zhou --- include/drm-uapi/drm.h | 33 ++ lib/igt_syncobj.c| 206 lib/igt_syncobj.h| 19 + tests/meson.build|1 + tests/syncobj_timeline.c | 1032 ++ 5 files

[Intel-gfx] [PATCH libdrm 7/8] wrap transfer interfaces

2018-12-11 Thread Chunming Zhou
Signed-off-by: Chunming Zhou --- amdgpu/amdgpu.h| 22 ++ amdgpu/amdgpu_cs.c | 16 2 files changed, 38 insertions(+) diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h index 5536d2d5..48e28aef 100644 --- a/amdgpu/amdgpu.h +++ b/amdgpu/amdgpu.h @@ -1638,6

[Intel-gfx] [PATCH libdrm 8/8] add syncobj timeline tests v3

2018-12-11 Thread Chunming Zhou
v2: drop DRM_SYNCOBJ_CREATE_TYPE_TIMELINE, fix timeout calculation, fix some warnings v3: add export/import and cpu signal testing cases Signed-off-by: Chunming Zhou Signed-off-by: Christian König --- tests/amdgpu/Makefile.am | 3 +- tests/amdgpu/amdgpu_test.c | 12 ++ tests

[Intel-gfx] [PATCH libdrm 6/8] expose timeline signal/export/import interfaces v2

2018-12-11 Thread Chunming Zhou
v2: adapt to new one transfer ioctl Signed-off-by: Chunming Zhou --- amdgpu/amdgpu-symbol-check | 3 ++ amdgpu/amdgpu.h| 51 amdgpu/amdgpu_cs.c | 68 ++ 3 files changed, 122 insertions(+) diff --git a/amdgpu

[Intel-gfx] [PATCH libdrm 5/8] add timeline signal/transfer ioctls v2

2018-12-11 Thread Chunming Zhou
v2: use one transfer ioctl Signed-off-by: Chunming Zhou --- xf86drm.c | 33 + xf86drm.h | 6 ++ 2 files changed, 39 insertions(+) diff --git a/xf86drm.c b/xf86drm.c index 9816b3b2..2a089616 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -4278,6 +4278,21

[Intel-gfx] [PATCH libdrm 2/8] addr cs chunk for syncobj timeline

2018-12-11 Thread Chunming Zhou
Signed-off-by: Chunming Zhou --- include/drm/amdgpu_drm.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h index 1ceec56d..a3c067dd 100644 --- a/include/drm/amdgpu_drm.h +++ b/include/drm/amdgpu_drm.h @@ -517,6 +517,8 @@ struct

[Intel-gfx] [PATCH libdrm 4/8] wrap syncobj timeline query/wait APIs for amdgpu v3

2018-12-11 Thread Chunming Zhou
v2: symbos are stored in lexical order. v3: drop export/import and extra query indirection Signed-off-by: Chunming Zhou Signed-off-by: Christian König --- amdgpu/amdgpu-symbol-check | 2 ++ amdgpu/amdgpu.h| 39 ++ amdgpu/amdgpu_cs.c | 23

[Intel-gfx] [PATCH libdrm 3/8] add timeline wait/query ioctl v2

2018-12-11 Thread Chunming Zhou
v2: drop export/import Signed-off-by: Chunming Zhou --- xf86drm.c | 44 xf86drm.h | 6 ++ 2 files changed, 50 insertions(+) diff --git a/xf86drm.c b/xf86drm.c index 71ad54ba..9816b3b2 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -4277,3 +4277,47

[Intel-gfx] [PATCH libdrm 1/8] new syncobj extension v3

2018-12-11 Thread Chunming Zhou
v2: drop not implemented IOCTLs and flags v3: add transfer/signal ioctls Signed-off-by: Chunming Zhou Signed-off-by: Christian König --- include/drm/drm.h | 35 +++ 1 file changed, 35 insertions(+) diff --git a/include/drm/drm.h b/include/drm/drm.h index

[Intel-gfx] [PATCH 04/10] drm/syncobj: add support for timeline point wait v8

2018-12-11 Thread Chunming Zhou
for xxx_WAIT_AVAILABLE v6: rebase and rework on new container v7: drop _WAIT_COMPLETED, it is the default anyway v8: correctly handle garbage collected fences Signed-off-by: Chunming Zhou Signed-off-by: Christian König Cc: Daniel Rakos Cc: Jason Ekstrand Cc: Bas Nieuwenhuizen Cc: Dave Airlie Cc: Chris Wilson

[Intel-gfx] [PATCH 10/10] drm/amdgpu: update version for timeline syncobj support in amdgpu

2018-12-11 Thread Chunming Zhou
Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 8de55f7f1a3a..cafafdb1d03f 100644 --- a/drivers/gpu/drm/amd

[Intel-gfx] [PATCH 06/10] drm/syncobj: use the timeline point in drm_syncobj_find_fence v3

2018-12-11 Thread Chunming Zhou
From: Christian König Implement finding the right timeline point in drm_syncobj_find_fence. v2: return -EINVAL when the point is not submitted yet. v3: fix reference counting bug, add flags handling as well Signed-off-by: Christian König --- drivers/gpu/drm/drm_syncobj.c | 43

[Intel-gfx] [PATCH 07/10] drm/amdgpu: add timeline support in amdgpu CS v2

2018-12-11 Thread Chunming Zhou
syncobj wait/signal operation is appending in command submission. v2: separate to two kinds in/out_deps functions Signed-off-by: Chunming Zhou Cc: Daniel Rakos Cc: Jason Ekstrand Cc: Bas Nieuwenhuizen Cc: Dave Airlie Cc: Christian König Cc: Chris Wilson --- drivers/gpu/drm/amd/amdgpu

[Intel-gfx] [PATCH 08/10] drm/syncobj: add transition iotcls between binary and timeline v2

2018-12-11 Thread Chunming Zhou
we need to import/export timeline point. v2: unify to one transfer ioctl Signed-off-by: Chunming Zhou --- drivers/gpu/drm/drm_internal.h | 2 + drivers/gpu/drm/drm_ioctl.c| 2 + drivers/gpu/drm/drm_syncobj.c | 74 ++ include/uapi/drm/drm.h | 10

[Intel-gfx] [PATCH 09/10] drm/syncobj: add timeline signal ioctl for syncobj v2

2018-12-11 Thread Chunming Zhou
v2: individually allocate chain array, since chain node is free independently. Signed-off-by: Chunming Zhou --- drivers/gpu/drm/drm_internal.h | 2 + drivers/gpu/drm/drm_ioctl.c| 2 + drivers/gpu/drm/drm_syncobj.c | 81 ++ include/uapi/drm/drm.h

[Intel-gfx] [PATCH 02/10] drm/syncobj: remove drm_syncobj_cb and cleanup

2018-12-11 Thread Chunming Zhou
From: Christian König This completes "drm/syncobj: Drop add/remove_callback from driver interface" and cleans up the implementation a bit. Signed-off-by: Christian König --- drivers/gpu/drm/drm_syncobj.c | 91 --- include/drm/drm_syncobj.h | 21 2

[Intel-gfx] [PATCH 05/10] drm/syncobj: add timeline payload query ioctl v4

2018-12-11 Thread Chunming Zhou
user mode can query timeline payload. v2: check return value of copy_to_user v3: handle querying entry by entry v4: rebase on new chain container, simplify interface Signed-off-by: Chunming Zhou Cc: Daniel Rakos Cc: Jason Ekstrand Cc: Bas Nieuwenhuizen Cc: Dave Airlie Cc: Christian König Cc

[Intel-gfx] [PATCH 01/10] dma-buf: add new dma_fence_chain container v4

2018-12-11 Thread Chunming Zhou
From: Christian König Lockless container implementation similar to a dma_fence_array, but with only two elements per node and automatic garbage collection. v2: properly document dma_fence_chain_for_each, add dma_fence_chain_find_seqno, drop prev reference during garbage collection if it's

[Intel-gfx] [PATCH 03/10] drm/syncobj: add new drm_syncobj_add_point interface v3

2018-12-11 Thread Chunming Zhou
From: Christian König Use the dma_fence_chain object to create a timeline of fence objects instead of just replacing the existing fence. v2: rebase and cleanup v3: fix garbage collection parameters Signed-off-by: Christian König --- drivers/gpu/drm/drm_syncobj.c | 37

[Intel-gfx] [PATCH i-g-t] igt: add timeline test cases v2

2018-12-07 Thread Chunming Zhou
v2: adapt to new transfer ioctl Signed-off-by: Chunming Zhou --- include/drm-uapi/drm.h | 33 ++ lib/igt_syncobj.c| 206 lib/igt_syncobj.h| 19 + tests/meson.build|1 + tests/syncobj_timeline.c | 1051 ++ 5 files

[Intel-gfx] [PATCH libdrm 7/7] add syncobj timeline tests v3

2018-12-07 Thread Chunming Zhou
v2: drop DRM_SYNCOBJ_CREATE_TYPE_TIMELINE, fix timeout calculation, fix some warnings v3: add export/import and cpu signal testing cases Signed-off-by: Chunming Zhou Signed-off-by: Christian König --- tests/amdgpu/Makefile.am | 3 +- tests/amdgpu/amdgpu_test.c | 12 ++ tests

[Intel-gfx] [PATCH libdrm 6/7] expose timeline signal/export/import interfaces v2

2018-12-07 Thread Chunming Zhou
v2: adapt to new one transfer ioctl Signed-off-by: Chunming Zhou --- amdgpu/amdgpu-symbol-check | 3 ++ amdgpu/amdgpu.h| 51 +++ amdgpu/amdgpu_cs.c | 62 ++ 3 files changed, 116 insertions(+) diff --git

[Intel-gfx] [PATCH libdrm 5/7] add timeline signal/transfer ioctls v2

2018-12-07 Thread Chunming Zhou
v2: use one transfer ioctl Signed-off-by: Chunming Zhou --- xf86drm.c | 33 + xf86drm.h | 6 ++ 2 files changed, 39 insertions(+) diff --git a/xf86drm.c b/xf86drm.c index 9816b3b2..2a089616 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -4278,6 +4278,21

[Intel-gfx] [PATCH libdrm 4/7] wrap syncobj timeline query/wait APIs for amdgpu v3

2018-12-07 Thread Chunming Zhou
v2: symbos are stored in lexical order. v3: drop export/import and extra query indirection Signed-off-by: Chunming Zhou Signed-off-by: Christian König --- amdgpu/amdgpu-symbol-check | 2 ++ amdgpu/amdgpu.h| 39 ++ amdgpu/amdgpu_cs.c | 23

[Intel-gfx] [PATCH libdrm 3/7] add timeline wait/query ioctl v2

2018-12-07 Thread Chunming Zhou
v2: drop export/import Signed-off-by: Chunming Zhou --- xf86drm.c | 44 xf86drm.h | 6 ++ 2 files changed, 50 insertions(+) diff --git a/xf86drm.c b/xf86drm.c index 71ad54ba..9816b3b2 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -4277,3 +4277,47

[Intel-gfx] [PATCH libdrm 2/7] addr cs chunk for syncobj timeline

2018-12-07 Thread Chunming Zhou
Signed-off-by: Chunming Zhou --- include/drm/amdgpu_drm.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h index 1ceec56d..a3c067dd 100644 --- a/include/drm/amdgpu_drm.h +++ b/include/drm/amdgpu_drm.h @@ -517,6 +517,8 @@ struct

[Intel-gfx] [PATCH libdrm 1/7] new syncobj extension v3

2018-12-07 Thread Chunming Zhou
v2: drop not implemented IOCTLs and flags v3: add transfer/signal ioctls Signed-off-by: Chunming Zhou Signed-off-by: Christian König --- include/drm/drm.h | 35 +++ 1 file changed, 35 insertions(+) diff --git a/include/drm/drm.h b/include/drm/drm.h index

[Intel-gfx] [PATCH 07/10] drm/amdgpu: add timeline support in amdgpu CS v2

2018-12-07 Thread Chunming Zhou
syncobj wait/signal operation is appending in command submission. v2: separate to two kinds in/out_deps functions Signed-off-by: Chunming Zhou Cc: Daniel Rakos Cc: Jason Ekstrand Cc: Bas Nieuwenhuizen Cc: Dave Airlie Cc: Christian König Cc: Chris Wilson --- drivers/gpu/drm/amd/amdgpu

[Intel-gfx] [PATCH 10/10] drm/amdgpu: update version for timeline syncobj support in amdgpu

2018-12-07 Thread Chunming Zhou
Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 8de55f7f1a3a..cafafdb1d03f 100644 --- a/drivers/gpu/drm/amd

[Intel-gfx] [PATCH 08/10] drm/syncobj: add transition iotcls between binary and timeline v2

2018-12-07 Thread Chunming Zhou
we need to import/export timeline point. v2: unify to one transfer ioctl Signed-off-by: Chunming Zhou --- drivers/gpu/drm/drm_internal.h | 2 + drivers/gpu/drm/drm_ioctl.c| 2 + drivers/gpu/drm/drm_syncobj.c | 79 ++ include/uapi/drm/drm.h | 10

[Intel-gfx] [PATCH 09/10] drm/syncobj: add timeline signal ioctl for syncobj v2

2018-12-07 Thread Chunming Zhou
v2: individually allocate chain array, since chain node is free independently. Signed-off-by: Chunming Zhou --- drivers/gpu/drm/drm_internal.h | 2 + drivers/gpu/drm/drm_ioctl.c| 2 + drivers/gpu/drm/drm_syncobj.c | 81 ++ include/uapi/drm/drm.h

[Intel-gfx] [PATCH 06/10] drm/syncobj: use the timeline point in drm_syncobj_find_fence v3

2018-12-07 Thread Chunming Zhou
From: Christian König Implement finding the right timeline point in drm_syncobj_find_fence. v2: return -EINVAL when the point is not submitted yet. v3: fix reference counting bug, add flags handling as well Signed-off-by: Christian König --- drivers/gpu/drm/drm_syncobj.c | 43

[Intel-gfx] [PATCH 05/10] drm/syncobj: add timeline payload query ioctl v4

2018-12-07 Thread Chunming Zhou
user mode can query timeline payload. v2: check return value of copy_to_user v3: handle querying entry by entry v4: rebase on new chain container, simplify interface Signed-off-by: Chunming Zhou Cc: Daniel Rakos Cc: Jason Ekstrand Cc: Bas Nieuwenhuizen Cc: Dave Airlie Cc: Christian König Cc

[Intel-gfx] [PATCH 04/10] drm/syncobj: add support for timeline point wait v8

2018-12-07 Thread Chunming Zhou
for xxx_WAIT_AVAILABLE v6: rebase and rework on new container v7: drop _WAIT_COMPLETED, it is the default anyway v8: correctly handle garbage collected fences Signed-off-by: Chunming Zhou Signed-off-by: Christian König Cc: Daniel Rakos Cc: Jason Ekstrand Cc: Bas Nieuwenhuizen Cc: Dave Airlie Cc: Chris Wilson

[Intel-gfx] [PATCH 03/10] drm/syncobj: add new drm_syncobj_add_point interface v2

2018-12-07 Thread Chunming Zhou
From: Christian König Use the dma_fence_chain object to create a timeline of fence objects instead of just replacing the existing fence. v2: rebase and cleanup Signed-off-by: Christian König --- drivers/gpu/drm/drm_syncobj.c | 37 +++ include/drm/drm_syncobj.h

[Intel-gfx] [PATCH 02/10] drm/syncobj: remove drm_syncobj_cb and cleanup

2018-12-07 Thread Chunming Zhou
From: Christian König This completes "drm/syncobj: Drop add/remove_callback from driver interface" and cleans up the implementation a bit. Signed-off-by: Christian König --- drivers/gpu/drm/drm_syncobj.c | 91 --- include/drm/drm_syncobj.h | 21 2

[Intel-gfx] [PATCH 01/10] dma-buf: add new dma_fence_chain container v4

2018-12-07 Thread Chunming Zhou
From: Christian König Lockless container implementation similar to a dma_fence_array, but with only two elements per node and automatic garbage collection. v2: properly document dma_fence_chain_for_each, add dma_fence_chain_find_seqno, drop prev reference during garbage collection if it's

[Intel-gfx] [PATCH i-g-t] igt: add timeline test cases

2018-12-07 Thread Chunming Zhou
Signed-off-by: Chunming Zhou --- include/drm-uapi/drm.h | 33 ++ lib/igt_syncobj.c| 204 +++ lib/igt_syncobj.h| 19 + tests/meson.build|1 + tests/syncobj_timeline.c | 1100 ++ 5 files changed, 1357 insertions(+) create

[Intel-gfx] [PATCH] drm/syncobj: Avoid kmalloc(GFP_KERNEL) under spinlock

2018-10-26 Thread Chunming Zhou
off-by: Chunming Zhou Cc: Maarten Lankhorst Cc: intel-gfx@lists.freedesktop.org Cc: Christian König Cc: Chris Wilson CC: Julia Lawall Reviewed-by: Chris Wilson --- drivers/gpu/drm/drm_syncobj.c | 36 ++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --

[Intel-gfx] [PATCH] drm/syncobj: Avoid kmalloc(GFP_KERNEL) under spinlock

2018-10-25 Thread Chunming Zhou
: syncobj->timeline still needs protect. v3: use a global signaled fence instead of re-allocation. v4: Don't need moving lock. Don't expose func. Tested by: syncobj_wait and ./deqp-vk -n dEQP-VK.*semaphore* with lock debug kernel options enabled. Signed-off-by: Chunming Zhou Cc: Maarten Lankhorst

[Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v3

2018-10-25 Thread Chunming Zhou
: syncobj->timeline still needs protect. v3: use a global signaled fence instead of re-allocation. Signed-off-by: Chunming Zhou Cc: Maarten Lankhorst Cc: intel-gfx@lists.freedesktop.org Cc: Christian König --- drivers/gpu/drm/drm_drv.c | 2 ++ drivers/gpu/drm/drm_syncobj.c |

[Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings v2

2018-10-25 Thread Chunming Zhou
the GFP_KERNEL is not necessarily the correct one. It may be desired to unlock the lock, or to not call the function under the lock in the first place. Generated by: scripts/coccinelle/locks/call_kern.cocci v2: syncobj->timeline still needs protect. Signed-off-by: Chunming Zhou Cc: Maar

[Intel-gfx] [PATCH] drm: fix call_kern.cocci warnings

2018-10-25 Thread Chunming Zhou
the GFP_KERNEL is not necessarily the correct one. It may be desired to unlock the lock, or to not call the function under the lock in the first place. Generated by: scripts/coccinelle/locks/call_kern.cocci Signed-off-by: Chunming Zhou Cc: Maarten Lankhorst Cc: intel-gfx

[Intel-gfx] [PATCH] drm: fix deadlock of syncobj v6

2018-10-23 Thread Chunming Zhou
by syncobj_basic and syncobj_wait of igt. Signed-off-by: Chunming Zhou Cc: Daniel Vetter Cc: Chris Wilson Cc: Christian König Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Chris Wilson --- drivers/gpu/drm/drm_syncobj.c | 156 -- include/drm/drm_syncobj.h

[Intel-gfx] [PATCH] drm: fix deadlock of syncobj v5

2018-10-23 Thread Chunming Zhou
-by: Chunming Zhou Cc: Daniel Vetter Cc: Chris Wilson Cc: Christian König Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Chris Wilson --- drivers/gpu/drm/drm_syncobj.c | 55 +++ include/drm/drm_syncobj.h | 8 +++-- 2 files changed, 36 insertions(+), 27 deletions