Re: [Linaro-mm-sig] Re: [PATCH v4 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-19 Thread Christian König

Am 19.09.22 um 13:26 schrieb Ville Syrjälä:

On Sat, Sep 17, 2022 at 05:18:40PM +0200, Christian König wrote:

Am 17.09.22 um 08:17 schrieb Ville Syrjälä:

On Thu, Sep 15, 2022 at 06:05:30PM +0200, Christian König wrote:

Am 15.09.22 um 15:02 schrieb Yadav, Arvind:

On 9/15/2022 5:37 PM, Christian König wrote:

Is that sufficient to allow running a desktop on amdgpu with the
extra check enabled? If yes that would be quite a milestone.


Yes, It is running on amdgpu with extra config enabled.

In this case I will start pushing the patches to drm-misc-next. I'm just
going to leave out the last one until the IGT tests are working as well.

ffs Christian. intel CI blew up yet again:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2FCI_DRM_12146%2Fshard-glk7%2Figt%40kms_plane_lowres%40tiling-y%40pipe-c-hdmi-a-2.htmldata=05%7C01%7Cchristian.koenig%40amd.com%7C31a4fd82204b4eada97708da9a31d922%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637991836142423547%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=TqPiX483fF%2FUdZHTjle8k5XplcF3DVaZBs0IzQlNYck%3Dreserved=0

The last time (some ttm thing) was just a week or two ago,
so it's really getting tiresome watching you push entirely
untested stuff all the time. Would be really helpful if you
finally started to do/require premerge testing.

Well first of all sorry for causing trouble, but as I wrote above I
intentionally left out the last one to *not* break the IGT tests.

The patches pushed so far where just updating a bunch of corner cases
and fixing the selftests.

Do you have any more insight why that should affect the IGT tests?

I have no idea. You have the oopses from pstore right there.
Did you even look at them?


Ah! Sorry, I didn't see that there were additional links to the oopses. 
Yeah, the problem is obvious with them.


The check for the signaled bit comes before grabbing the lock. This only 
worked before because of the __dma_fence_enable_sw_signaling() shortcut.


Going to send a fix for this in a minute.

Thanks,
Christian.



Re: [Linaro-mm-sig] Re: [PATCH v4 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-19 Thread Ville Syrjälä
On Sat, Sep 17, 2022 at 05:18:40PM +0200, Christian König wrote:
> Am 17.09.22 um 08:17 schrieb Ville Syrjälä:
> > On Thu, Sep 15, 2022 at 06:05:30PM +0200, Christian König wrote:
> >> Am 15.09.22 um 15:02 schrieb Yadav, Arvind:
> >>> On 9/15/2022 5:37 PM, Christian König wrote:
>  Is that sufficient to allow running a desktop on amdgpu with the
>  extra check enabled? If yes that would be quite a milestone.
> 
> >>> Yes, It is running on amdgpu with extra config enabled.
> >> In this case I will start pushing the patches to drm-misc-next. I'm just
> >> going to leave out the last one until the IGT tests are working as well.
> > ffs Christian. intel CI blew up yet again:
> > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12146/shard-glk7/igt@kms_plane_lowres@tilin...@pipe-c-hdmi-a-2.html
> >
> > The last time (some ttm thing) was just a week or two ago,
> > so it's really getting tiresome watching you push entirely
> > untested stuff all the time. Would be really helpful if you
> > finally started to do/require premerge testing.
> 
> Well first of all sorry for causing trouble, but as I wrote above I 
> intentionally left out the last one to *not* break the IGT tests.
> 
> The patches pushed so far where just updating a bunch of corner cases 
> and fixing the selftests.
> 
> Do you have any more insight why that should affect the IGT tests?

I have no idea. You have the oopses from pstore right there.
Did you even look at them?

-- 
Ville Syrjälä
Intel


Re: [Linaro-mm-sig] Re: [PATCH v4 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-17 Thread Christian König

Am 17.09.22 um 08:17 schrieb Ville Syrjälä:

On Thu, Sep 15, 2022 at 06:05:30PM +0200, Christian König wrote:

Am 15.09.22 um 15:02 schrieb Yadav, Arvind:

On 9/15/2022 5:37 PM, Christian König wrote:

Is that sufficient to allow running a desktop on amdgpu with the
extra check enabled? If yes that would be quite a milestone.


Yes, It is running on amdgpu with extra config enabled.

In this case I will start pushing the patches to drm-misc-next. I'm just
going to leave out the last one until the IGT tests are working as well.

ffs Christian. intel CI blew up yet again:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12146/shard-glk7/igt@kms_plane_lowres@tilin...@pipe-c-hdmi-a-2.html

The last time (some ttm thing) was just a week or two ago,
so it's really getting tiresome watching you push entirely
untested stuff all the time. Would be really helpful if you
finally started to do/require premerge testing.


Well first of all sorry for causing trouble, but as I wrote above I 
intentionally left out the last one to *not* break the IGT tests.


The patches pushed so far where just updating a bunch of corner cases 
and fixing the selftests.


Do you have any more insight why that should affect the IGT tests?

Regards,
Christian.


Re: [PATCH v4 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-17 Thread Ville Syrjälä
On Thu, Sep 15, 2022 at 06:05:30PM +0200, Christian König wrote:
> Am 15.09.22 um 15:02 schrieb Yadav, Arvind:
> >
> > On 9/15/2022 5:37 PM, Christian König wrote:
> >> Is that sufficient to allow running a desktop on amdgpu with the 
> >> extra check enabled? If yes that would be quite a milestone.
> >>
> > Yes, It is running on amdgpu with extra config enabled.
> 
> In this case I will start pushing the patches to drm-misc-next. I'm just 
> going to leave out the last one until the IGT tests are working as well.

ffs Christian. intel CI blew up yet again:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12146/shard-glk7/igt@kms_plane_lowres@tilin...@pipe-c-hdmi-a-2.html

The last time (some ttm thing) was just a week or two ago,
so it's really getting tiresome watching you push entirely
untested stuff all the time. Would be really helpful if you
finally started to do/require premerge testing.

-- 
Ville Syrjälä
Intel


Re: [PATCH v4 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-15 Thread Christian König

Am 15.09.22 um 15:02 schrieb Yadav, Arvind:


On 9/15/2022 5:37 PM, Christian König wrote:
Is that sufficient to allow running a desktop on amdgpu with the 
extra check enabled? If yes that would be quite a milestone.



Yes, It is running on amdgpu with extra config enabled.


In this case I will start pushing the patches to drm-misc-next. I'm just 
going to leave out the last one until the IGT tests are working as well.


What's left is checking the userspace IGT tests. Especially the 
sync_file and drm_syncobj tests I would expect to have problems with 
this extra check.



Yes, IGT test cases are failing


Yeah, as noted on the call please investigate.

This one is the real reason why I wanted somebody to look at this. My 
suspicion is that we have missing calls to 
dma_fence_enable_sw_signaling() in the drm_syncobj code.


Thanks,
Christian.



~Arvind


Thanks,
Christian.

Am 14.09.22 um 18:43 schrieb Arvind Yadav:

Fence signaling must be enabled to make sure that
the dma_fence_is_signaled() function ever returns true.
Since drivers and implementations sometimes mess this up,
this ensures correct behaviour when DEBUG_WW_MUTEX_SLOWPATH
is used during debugging.
This should make any implementation bugs resulting in not
signaled fences much more obvious.

Arvind Yadav (6):
   [PATCH v4 1/6] dma-buf: Remove the signaled bit status check
   [PATCH v4 2/6] dma-buf: set signaling bit for the stub fence
   [PATCH v4 3/6] dma-buf: Enable signaling on fence for selftests
   [PATCH v4 4/6] dma-buf: dma_fence_wait must enable signaling
   [PATCH v4 5/6] drm/sched: Use parent fence instead of finished
   [PATCH v4 6/6] dma-buf: Check status of enable-signaling bit on 
debug


  drivers/dma-buf/Kconfig    |  7 +++
  drivers/dma-buf/dma-fence.c    | 16 ++--
  drivers/dma-buf/st-dma-fence-chain.c   |  4 
  drivers/dma-buf/st-dma-fence-unwrap.c  | 22 ++
  drivers/dma-buf/st-dma-fence.c | 16 
  drivers/dma-buf/st-dma-resv.c  | 10 ++
  drivers/gpu/drm/scheduler/sched_main.c |  4 ++--
  include/linux/dma-fence.h  |  5 +
  8 files changed, 76 insertions(+), 8 deletions(-)







Re: [PATCH v4 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-15 Thread Yadav, Arvind



On 9/15/2022 5:37 PM, Christian König wrote:
Is that sufficient to allow running a desktop on amdgpu with the extra 
check enabled? If yes that would be quite a milestone.



Yes, It is running on amdgpu with extra config enabled.
What's left is checking the userspace IGT tests. Especially the 
sync_file and drm_syncobj tests I would expect to have problems with 
this extra check.



Yes, IGT test cases are failing .

~Arvind


Thanks,
Christian.

Am 14.09.22 um 18:43 schrieb Arvind Yadav:

Fence signaling must be enabled to make sure that
the dma_fence_is_signaled() function ever returns true.
Since drivers and implementations sometimes mess this up,
this ensures correct behaviour when DEBUG_WW_MUTEX_SLOWPATH
is used during debugging.
This should make any implementation bugs resulting in not
signaled fences much more obvious.

Arvind Yadav (6):
   [PATCH v4 1/6] dma-buf: Remove the signaled bit status check
   [PATCH v4 2/6] dma-buf: set signaling bit for the stub fence
   [PATCH v4 3/6] dma-buf: Enable signaling on fence for selftests
   [PATCH v4 4/6] dma-buf: dma_fence_wait must enable signaling
   [PATCH v4 5/6] drm/sched: Use parent fence instead of finished
   [PATCH v4 6/6] dma-buf: Check status of enable-signaling bit on debug

  drivers/dma-buf/Kconfig    |  7 +++
  drivers/dma-buf/dma-fence.c    | 16 ++--
  drivers/dma-buf/st-dma-fence-chain.c   |  4 
  drivers/dma-buf/st-dma-fence-unwrap.c  | 22 ++
  drivers/dma-buf/st-dma-fence.c | 16 
  drivers/dma-buf/st-dma-resv.c  | 10 ++
  drivers/gpu/drm/scheduler/sched_main.c |  4 ++--
  include/linux/dma-fence.h  |  5 +
  8 files changed, 76 insertions(+), 8 deletions(-)





Re: [PATCH v4 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-15 Thread Christian König
Is that sufficient to allow running a desktop on amdgpu with the extra 
check enabled? If yes that would be quite a milestone.


What's left is checking the userspace IGT tests. Especially the 
sync_file and drm_syncobj tests I would expect to have problems with 
this extra check.


Thanks,
Christian.

Am 14.09.22 um 18:43 schrieb Arvind Yadav:

Fence signaling must be enabled to make sure that
the dma_fence_is_signaled() function ever returns true.
Since drivers and implementations sometimes mess this up,
this ensures correct behaviour when DEBUG_WW_MUTEX_SLOWPATH
is used during debugging.
This should make any implementation bugs resulting in not
signaled fences much more obvious.

Arvind Yadav (6):
   [PATCH v4 1/6] dma-buf: Remove the signaled bit status check
   [PATCH v4 2/6] dma-buf: set signaling bit for the stub fence
   [PATCH v4 3/6] dma-buf: Enable signaling on fence for selftests
   [PATCH v4 4/6] dma-buf: dma_fence_wait must enable signaling
   [PATCH v4 5/6] drm/sched: Use parent fence instead of finished
   [PATCH v4 6/6] dma-buf: Check status of enable-signaling bit on debug

  drivers/dma-buf/Kconfig|  7 +++
  drivers/dma-buf/dma-fence.c| 16 ++--
  drivers/dma-buf/st-dma-fence-chain.c   |  4 
  drivers/dma-buf/st-dma-fence-unwrap.c  | 22 ++
  drivers/dma-buf/st-dma-fence.c | 16 
  drivers/dma-buf/st-dma-resv.c  | 10 ++
  drivers/gpu/drm/scheduler/sched_main.c |  4 ++--
  include/linux/dma-fence.h  |  5 +
  8 files changed, 76 insertions(+), 8 deletions(-)





[PATCH v4 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-14 Thread Arvind Yadav
Fence signaling must be enabled to make sure that
the dma_fence_is_signaled() function ever returns true.
Since drivers and implementations sometimes mess this up,
this ensures correct behaviour when DEBUG_WW_MUTEX_SLOWPATH
is used during debugging.
This should make any implementation bugs resulting in not
signaled fences much more obvious.

Arvind Yadav (6):
  [PATCH v4 1/6] dma-buf: Remove the signaled bit status check
  [PATCH v4 2/6] dma-buf: set signaling bit for the stub fence
  [PATCH v4 3/6] dma-buf: Enable signaling on fence for selftests
  [PATCH v4 4/6] dma-buf: dma_fence_wait must enable signaling
  [PATCH v4 5/6] drm/sched: Use parent fence instead of finished
  [PATCH v4 6/6] dma-buf: Check status of enable-signaling bit on debug

 drivers/dma-buf/Kconfig|  7 +++
 drivers/dma-buf/dma-fence.c| 16 ++--
 drivers/dma-buf/st-dma-fence-chain.c   |  4 
 drivers/dma-buf/st-dma-fence-unwrap.c  | 22 ++
 drivers/dma-buf/st-dma-fence.c | 16 
 drivers/dma-buf/st-dma-resv.c  | 10 ++
 drivers/gpu/drm/scheduler/sched_main.c |  4 ++--
 include/linux/dma-fence.h  |  5 +
 8 files changed, 76 insertions(+), 8 deletions(-)

-- 
2.25.1