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

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)

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

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

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)
Ping... Btw: The patch is tested by syncobj_basic and syncobj_wait of IGT. > -Original Message- > From: Chunming Zhou > Sent: Sunday, October 21, 2018 7:14 PM > To: dri-devel@lists.freedesktop.org > Cc: Zhou, David(ChunMing) ; Daniel Vetter > ; Chris Wilson ; Koenig, Christian > > Subjec

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