Re: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-10 Thread Christian König
10, 2021 9:03 PM To: Li, Dennis ; Grodzovsky, Andrey ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: capture invalid hardware access v2 I assumed that pre-reset functions could complete all fences And exactly that's incorrect. We can only complete the low level hardware fences

RE: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-10 Thread Li, Dennis
--Original Message- From: Christian König Sent: Wednesday, March 10, 2021 9:03 PM To: Li, Dennis ; Grodzovsky, Andrey ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: capture invalid hardware access v2 > I assumed that pre-reset functions could complete all fences And exactly that

Re: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-10 Thread Christian König
l read locks are released. Best Regards Dennis Li -Original Message- From: Grodzovsky, Andrey Sent: Wednesday, March 10, 2021 1:42 PM To: Li, Dennis ; Christian König ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: capture invalid hardware access v2 But how this wil

RE: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Li, Dennis
R will be blocked until all read locks are released. Best Regards Dennis Li -Original Message- From: Grodzovsky, Andrey Sent: Wednesday, March 10, 2021 1:42 PM To: Li, Dennis ; Christian König ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: capture invalid hardware access

Re: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Andrey Grodzovsky
nis Li -Original Message- From: Grodzovsky, Andrey Sent: Wednesday, March 10, 2021 2:26 AM To: Christian König ; Li, Dennis ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: capture invalid hardware access v2 On 2021-03-09 12:47 p.m., Christian König wrote: No it won't. Acc

RE: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Li, Dennis
To: Li, Dennis ; amd-gfx@lists.freedesktop.org Cc: Grodzovsky, Andrey Subject: Re: [PATCH] drm/amdgpu: capture invalid hardware access v2 Hi Dennis, why do you think that this will always assert in reset thread? In the reset thread while we are holding the reset lock write side

RE: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Li, Dennis
l Message- From: Grodzovsky, Andrey Sent: Wednesday, March 10, 2021 2:26 AM To: Christian König ; Li, Dennis ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: capture invalid hardware access v2 On 2021-03-09 12:47 p.m., Christian König wrote: > No it won't. Accessing t

Re: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Daniel Vetter
On Tue, Mar 9, 2021 at 8:13 PM Andrey Grodzovsky wrote: > > On 2021-03-09 1:51 p.m., Christian König wrote: > > Am 09.03.21 um 19:26 schrieb Andrey Grodzovsky: > >> On 2021-03-09 12:47 p.m., Christian König wrote: > >>> No it won't. Accessing the hardware without the lock is ok as long as > >>>

Re: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Andrey Grodzovsky
On 2021-03-09 1:51 p.m., Christian König wrote: Am 09.03.21 um 19:26 schrieb Andrey Grodzovsky: On 2021-03-09 12:47 p.m., Christian König wrote: No it won't. Accessing the hardware without the lock is ok as long as the write side isn't taken. Oh, forgot about the trylock part, sorry...

Re: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Christian König
Am 09.03.21 um 19:26 schrieb Andrey Grodzovsky: On 2021-03-09 12:47 p.m., Christian König wrote: No it won't. Accessing the hardware without the lock is ok as long as the write side isn't taken. Oh, forgot about the trylock part, sorry... But that approach is illegal anyway because we

Re: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Andrey Grodzovsky
On 2021-03-09 12:47 p.m., Christian König wrote: No it won't. Accessing the hardware without the lock is ok as long as the write side isn't taken. Oh, forgot about the trylock part, sorry... But that approach is illegal anyway because we suspend the hardware without proper protection from

Re: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Christian König
No it won't. Accessing the hardware without the lock is ok as long as the write side isn't taken. But that approach is illegal anyway because we suspend the hardware without proper protection from concurrent access. Christian. Am 09.03.21 um 17:40 schrieb Andrey Grodzovsky: Because he takes

Re: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Andrey Grodzovsky
Because he takes the write side lock post amdgpu_pre_asic_reset - where HW suspend sequence happens (touching registers) - so i think it will assert. Andrey On 2021-03-09 7:56 a.m., Christian König wrote: Hi Dennis, why do you think that this will always assert in reset thread? In the

Re: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-09 Thread Christian König
Hi Dennis, why do you think that this will always assert in reset thread? In the reset thread while we are holding the reset lock write side lockdep_assert_held() should be satisfied and not cause any splat in the system log. Regards, Christian. Am 09.03.21 um 03:03 schrieb Li, Dennis:

RE: [PATCH] drm/amdgpu: capture invalid hardware access v2

2021-03-08 Thread Li, Dennis
[AMD Official Use Only - Internal Distribution Only] Hi, Christian, amdgpu_device_skip_hw_access will always assert in reset thread, which seems not a good idea. Best Regards Dennis Li -Original Message- From: Christian König Sent: Tuesday, March 9, 2021 2:07 AM To: