Re: [PATCH] drm: fix deadlock of syncobj v6

2018-10-23 Thread Koenig, Christian
Am 23.10.18 um 11:37 schrieb Chunming Zhou: > v2: > add a mutex between sync_cb execution and free. > v3: > clearly separating the roles for pt_lock and cb_mutex (Chris) > v4: > the cb_mutex should be taken outside of the pt_lock around > this if() block. (Chris) > v5: > fix a corner case > v6: > t

[PATCH] drm: fix deadlock of syncobj v6

2018-10-23 Thread Chunming Zhou
v2: add a mutex between sync_cb execution and free. v3: clearly separating the roles for pt_lock and cb_mutex (Chris) v4: the cb_mutex should be taken outside of the pt_lock around this if() block. (Chris) v5: fix a corner case v6: tidy drm_syncobj_fence_get_or_add_callback up. (Chris) Tested by s

Re: [PATCH] drm: fix deadlock of syncobj v5

2018-10-23 Thread Koenig, Christian
Am 23.10.18 um 11:11 schrieb Chris Wilson: > Quoting zhoucm1 (2018-10-23 10:09:01) >> >> On 2018年10月23日 17:01, Chris Wilson wrote: >>> Quoting Chunming Zhou (2018-10-23 08:57:54) v2: add a mutex between sync_cb execution and free. v3: clearly separating the roles for pt_lock and

Re: [PATCH] drm: fix deadlock of syncobj v5

2018-10-23 Thread Chris Wilson
Quoting zhoucm1 (2018-10-23 10:09:01) > > > On 2018年10月23日 17:01, Chris Wilson wrote: > > Quoting Chunming Zhou (2018-10-23 08:57:54) > >> v2: > >> add a mutex between sync_cb execution and free. > >> v3: > >> clearly separating the roles for pt_lock and cb_mutex (Chris) > >> v4: > >> the cb_mute

Re: [PATCH] drm: fix deadlock of syncobj v5

2018-10-23 Thread zhoucm1
On 2018年10月23日 17:01, Chris Wilson wrote: Quoting Chunming Zhou (2018-10-23 08:57:54) v2: add a mutex between sync_cb execution and free. v3: clearly separating the roles for pt_lock and cb_mutex (Chris) v4: the cb_mutex should be taken outside of the pt_lock around this if() block. (Chris) v

Re: [PATCH] drm: fix deadlock of syncobj v5

2018-10-23 Thread Chris Wilson
Quoting Chunming Zhou (2018-10-23 08:57:54) > v2: > add a mutex between sync_cb execution and free. > v3: > clearly separating the roles for pt_lock and cb_mutex (Chris) > v4: > the cb_mutex should be taken outside of the pt_lock around this if() block. > (Chris) > v5: > fix a corner case > > Tes

Re: [PATCH] drm: fix deadlock of syncobj v4

2018-10-23 Thread Chris Wilson
Quoting zhoucm1 (2018-10-23 09:00:26) > > > On 2018年10月23日 15:51, Chris Wilson wrote: > > Quoting Chunming Zhou (2018-10-23 02:50:08) > >> v2: > >> add a mutex between sync_cb execution and free. > >> v3: > >> clearly separating the roles for pt_lock and cb_mutex (Chris) > >> v4: > >> the cb_mute

Re: [PATCH] drm: fix deadlock of syncobj v4

2018-10-23 Thread zhoucm1
On 2018年10月23日 15:51, Chris Wilson wrote: Quoting Chunming Zhou (2018-10-23 02:50:08) v2: add a mutex between sync_cb execution and free. v3: clearly separating the roles for pt_lock and cb_mutex (Chris) v4: the cb_mutex should be taken outside of the pt_lock around this if() block. (Chris)

[PATCH] drm: fix deadlock of syncobj v5

2018-10-23 Thread Chunming Zhou
v2: add a mutex between sync_cb execution and free. v3: clearly separating the roles for pt_lock and cb_mutex (Chris) v4: the cb_mutex should be taken outside of the pt_lock around this if() block. (Chris) v5: fix a corner case Tested by syncobj_basic and syncobj_wait of igt. Signed-off-by: Chun

Re: [PATCH] drm: fix deadlock of syncobj v4

2018-10-23 Thread Chris Wilson
Quoting Chunming Zhou (2018-10-23 02:50:08) > v2: > add a mutex between sync_cb execution and free. > v3: > clearly separating the roles for pt_lock and cb_mutex (Chris) > v4: > the cb_mutex should be taken outside of the pt_lock around this if() block. > (Chris) > > Tested by syncobj_basic and s

[PATCH] drm: fix deadlock of syncobj v4

2018-10-22 Thread Chunming Zhou
v2: add a mutex between sync_cb execution and free. v3: clearly separating the roles for pt_lock and cb_mutex (Chris) v4: the cb_mutex should be taken outside of the pt_lock around this if() block. (Chris) Tested by syncobj_basic and syncobj_wait of igt. Signed-off-by: Chunming Zhou Cc: Daniel

Re: [PATCH] drm: fix deadlock of syncobj v3

2018-10-22 Thread Chris Wilson
Quoting Chunming Zhou (2018-10-22 10:08:59) > v2: > add a mutex between sync_cb execution and free. > v3: > clearly separating the roles for pt_lock and cb_mutex (Chris) > > Signed-off-by: Chunming Zhou > Cc: Daniel Vetter > Cc: Chris Wilson > Cc: Christian König > --- > drivers/gpu/drm/drm_s

[PATCH] drm: fix deadlock of syncobj v3

2018-10-22 Thread Chunming Zhou
v2: add a mutex between sync_cb execution and free. v3: clearly separating the roles for pt_lock and cb_mutex (Chris) Signed-off-by: Chunming Zhou Cc: Daniel Vetter Cc: Chris Wilson Cc: Christian König --- drivers/gpu/drm/drm_syncobj.c | 51 ++- include/drm/drm

Re: [PATCH] drm: fix deadlock of syncobj v2

2018-10-22 Thread zhoucm1
On 2018年10月22日 16:34, Chris Wilson wrote: Quoting Chunming Zhou (2018-10-21 12:14:24) v2: add a mutex between sync_cb execution and free. The result would appear to be that syncobj->lock is relegated to protecting the pt_list and the mutex would only be needed for the syncobj->cb_list. The p

Re: [PATCH] drm: fix deadlock of syncobj v2

2018-10-22 Thread Chris Wilson
Quoting Chunming Zhou (2018-10-21 12:14:24) > v2: > add a mutex between sync_cb execution and free. The result would appear to be that syncobj->lock is relegated to protecting the pt_list and the mutex would only be needed for the syncobj->cb_list. The patch looks correct for resolving the deadlo

RE: [PATCH] drm: fix deadlock of syncobj v2

2018-10-22 Thread Zhou, David(ChunMing)
Koenig, Christian > > Subject: [PATCH] drm: fix deadlock of syncobj v2 > > v2: > add a mutex between sync_cb execution and free. > > Signed-off-by: Chunming Zhou > Cc: Daniel Vetter > Cc: Chris Wilson > Cc: Christian König > --- > drivers/gpu/drm/drm_syncobj.c

[PATCH] drm: fix deadlock of syncobj v2

2018-10-21 Thread Chunming Zhou
v2: add a mutex between sync_cb execution and free. Signed-off-by: Chunming Zhou Cc: Daniel Vetter Cc: Chris Wilson Cc: Christian König --- drivers/gpu/drm/drm_syncobj.c | 11 +-- include/drm/drm_syncobj.h | 4 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/

Re: [PATCH] drm: fix deadlock of syncobj

2018-10-19 Thread Christian König
Am 19.10.18 um 14:19 schrieb zhoucm1: On 2018年10月19日 20:08, Koenig, Christian wrote: Am 19.10.18 um 14:01 schrieb zhoucm1: On 2018年10月19日 19:26, zhoucm1 wrote: On 2018年10月19日 18:50, Chris Wilson wrote: Quoting Chunming Zhou (2018-10-19 11:26:41) Signed-off-by: Chunming Zhou Cc: Daniel V

Re: [PATCH] drm: fix deadlock of syncobj

2018-10-19 Thread zhoucm1
On 2018年10月19日 20:08, Koenig, Christian wrote: Am 19.10.18 um 14:01 schrieb zhoucm1: On 2018年10月19日 19:26, zhoucm1 wrote: On 2018年10月19日 18:50, Chris Wilson wrote: Quoting Chunming Zhou (2018-10-19 11:26:41) Signed-off-by: Chunming Zhou Cc: Daniel Vetter Cc: Chris Wilson Cc: Christian

Re: [PATCH] drm: fix deadlock of syncobj

2018-10-19 Thread Koenig, Christian
Am 19.10.18 um 14:01 schrieb zhoucm1: > > > On 2018年10月19日 19:26, zhoucm1 wrote: >> >> >> On 2018年10月19日 18:50, Chris Wilson wrote: >>> Quoting Chunming Zhou (2018-10-19 11:26:41) Signed-off-by: Chunming Zhou Cc: Daniel Vetter Cc: Chris Wilson Cc: Christian König --- >>

Re: [PATCH] drm: fix deadlock of syncobj

2018-10-19 Thread zhoucm1
On 2018年10月19日 19:26, zhoucm1 wrote: On 2018年10月19日 18:50, Chris Wilson wrote: Quoting Chunming Zhou (2018-10-19 11:26:41) Signed-off-by: Chunming Zhou Cc: Daniel Vetter Cc: Chris Wilson Cc: Christian König ---   drivers/gpu/drm/drm_syncobj.c | 7 +--   1 file changed, 5 insertions(+

Re: [PATCH] drm: fix deadlock of syncobj

2018-10-19 Thread zhoucm1
On 2018年10月19日 18:50, Chris Wilson wrote: Quoting Chunming Zhou (2018-10-19 11:26:41) Signed-off-by: Chunming Zhou Cc: Daniel Vetter Cc: Chris Wilson Cc: Christian König --- drivers/gpu/drm/drm_syncobj.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/

Re: [PATCH] drm: fix deadlock of syncobj

2018-10-19 Thread Chris Wilson
Quoting Chunming Zhou (2018-10-19 11:26:41) > Signed-off-by: Chunming Zhou > Cc: Daniel Vetter > Cc: Chris Wilson > Cc: Christian König > --- > drivers/gpu/drm/drm_syncobj.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers

[PATCH] drm: fix deadlock of syncobj

2018-10-19 Thread Chunming Zhou
Signed-off-by: Chunming Zhou Cc: Daniel Vetter Cc: Chris Wilson Cc: Christian König --- drivers/gpu/drm/drm_syncobj.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index 57bf6006394d..2f3c14cb5156 100644