RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdgpu: refine kiq access register > > Am 22.04.20 um 13:49 schrieb Tao, Yintian: >> Hi Christian >> >> >> Can you help answer the questions below? Thanks in advance. >> -Original Message- >

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
: [PATCH] drm/amdgpu: refine kiq access register Am 22.04.20 um 11:29 schrieb Yintian Tao: According to the current kiq access register method, there will be race condition when using KIQ to read register if multiple clients want to read at same time just like the expample below: 1. client-A start

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Please see inline commetns. -Original Message- From: Koenig, Christian Sent: 2020年4月22日 19:57 To: Tao, Yintian ; Liu, Monk ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register Am 22.04.20 um 13:49 schrieb Tao

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
] drm/amdgpu: refine kiq access register Am 22.04.20 um 11:29 schrieb Yintian Tao: According to the current kiq access register method, there will be race condition when using KIQ to read register if multiple clients want to read at same time just like the expample below: 1. client-A start to read

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Can you help answer the questions below? Thanks in advance. -Original Message- From: Koenig, Christian Sent: 2020年4月22日 19:03 To: Tao, Yintian ; Liu, Monk ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register Am

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
Am 22.04.20 um 11:29 schrieb Yintian Tao: According to the current kiq access register method, there will be race condition when using KIQ to read register if multiple clients want to read at same time just like the expample below: 1. client-A start to read REG-0 throguh KIQ 2. client-A poll the

[PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Yintian Tao
According to the current kiq access register method, there will be race condition when using KIQ to read register if multiple clients want to read at same time just like the expample below: 1. client-A start to read REG-0 throguh KIQ 2. client-A poll the seqno-0 3. client-B start to read REG-1 thro

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Please see inline comments. -Original Message- From: Koenig, Christian Sent: 2020年4月22日 16:23 To: Tao, Yintian ; Liu, Monk ; Liu, Shaoyun ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register Am 22.04.20 um 10

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
Subject: Re: [PATCH] drm/amdgpu: refine kiq access register Am 22.04.20 um 09:35 schrieb Tao, Yintian: Hi Christian BUG_ON(in_interrupt()); That won't work like this. The KIQ is also used in interrupt context in the driver, that's why we used spin_lock_irqsave(). [yttao]: Accord

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Please see inline comments -Original Message- From: Koenig, Christian Sent: 2020年4月22日 15:54 To: Tao, Yintian ; Liu, Monk ; Liu, Shaoyun ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register Am 22.04.20 um 09:49

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
: [PATCH] drm/amdgpu: refine kiq access register Am 22.04.20 um 09:35 schrieb Tao, Yintian: Hi Christian BUG_ON(in_interrupt()); That won't work like this. The KIQ is also used in interrupt context in the driver, that's why we used spin_lock_irqsave(). [yttao]: According to the curren

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Hi Christian Please see inline comments. -Original Message- From: Christian König Sent: 2020年4月22日 15:40 To: Tao, Yintian ; Koenig, Christian ; Liu, Monk ; Liu, Shaoyun ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
top.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register BUG_ON(in_interrupt()); That won't work like this. The KIQ is also used in interrupt context in the driver, that's why we used spin_lock_irqsave(). And I would either say that we should use the trick with the NOP to r

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
15:23 To: Tao, Yintian ; Liu, Monk ; Liu, Shaoyun ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: refine kiq access register > BUG_ON(in_interrupt()); That won't work like this. The KIQ is also used in interrupt context in the driver, that's why

Re: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Christian König
Christian. Am 22.04.20 um 09:11 schrieb Tao, Yintian: Add Felix and Shaoyun -Original Message- From: Yintian Tao Sent: 2020年4月22日 12:42 To: Koenig, Christian ; Liu, Monk Cc: amd-gfx@lists.freedesktop.org; Tao, Yintian Subject: [PATCH] drm/amdgpu: refine kiq access register According

RE: [PATCH] drm/amdgpu: refine kiq access register

2020-04-22 Thread Tao, Yintian
Add Felix and Shaoyun -Original Message- From: Yintian Tao Sent: 2020年4月22日 12:42 To: Koenig, Christian ; Liu, Monk Cc: amd-gfx@lists.freedesktop.org; Tao, Yintian Subject: [PATCH] drm/amdgpu: refine kiq access register According to the current kiq access register method, there will

[PATCH] drm/amdgpu: refine kiq access register

2020-04-21 Thread Yintian Tao
According to the current kiq access register method, there will be race condition when using KIQ to read register if multiple clients want to read at same time just like the expample below: 1. client-A start to read REG-0 throguh KIQ 2. client-A poll the seqno-0 3. client-B start to read REG-1 thro