All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Recursive i915_reset_trylock() verboten
@ 2019-02-12 13:08 Chris Wilson
  2019-02-12 13:08 ` [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups Chris Wilson
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Chris Wilson @ 2019-02-12 13:08 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala

We cannot nest i915_reset_trylock() as the inner may wait for the
I915_RESET_BACKOFF which in turn is waiting upon sync_srcu who is
waiting for our outermost lock. As we take the reset srcu around the
fence update, we have to defer taking it in i915_gem_fault() until after
we acquire the pin on the fence to avoid nesting. This is a little ugly,
but still works. If a reset occurs between i915_vma_pin_fence() and the
second reset lock, the reset will restore the fence register back to the
pinned value before the reset lock allows us to proceed (our mmap won't
be revoked as we haven't yet marked it as being a userfault as that
requires us to hold the reset lock), so the pagefault is still
serialised with the revocation in reset.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109605
Fixes: 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index c8c355bec091..ae1467a74a08 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1923,16 +1923,16 @@ vm_fault_t i915_gem_fault(struct vm_fault *vmf)
 	if (ret)
 		goto err_unpin;
 
+	ret = i915_vma_pin_fence(vma);
+	if (ret)
+		goto err_unpin;
+
 	srcu = i915_reset_trylock(dev_priv);
 	if (srcu < 0) {
 		ret = srcu;
-		goto err_unpin;
+		goto err_fence;
 	}
 
-	ret = i915_vma_pin_fence(vma);
-	if (ret)
-		goto err_reset;
-
 	/* Finally, remap it using the new GTT offset */
 	ret = remap_io_mapping(area,
 			       area->vm_start + (vma->ggtt_view.partial.offset << PAGE_SHIFT),
@@ -1940,7 +1940,7 @@ vm_fault_t i915_gem_fault(struct vm_fault *vmf)
 			       min_t(u64, vma->size, area->vm_end - area->vm_start),
 			       &ggtt->iomap);
 	if (ret)
-		goto err_fence;
+		goto err_reset;
 
 	/* Mark as being mmapped into userspace for later revocation */
 	assert_rpm_wakelock_held(dev_priv);
@@ -1950,10 +1950,10 @@ vm_fault_t i915_gem_fault(struct vm_fault *vmf)
 
 	i915_vma_set_ggtt_write(vma);
 
-err_fence:
-	i915_vma_unpin_fence(vma);
 err_reset:
 	i915_reset_unlock(dev_priv, srcu);
+err_fence:
+	i915_vma_unpin_fence(vma);
 err_unpin:
 	__i915_vma_unpin(vma);
 err_unlock:
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups
  2019-02-12 13:08 [PATCH 1/2] drm/i915: Recursive i915_reset_trylock() verboten Chris Wilson
@ 2019-02-12 13:08 ` Chris Wilson
  2019-02-12 14:15   ` Mika Kuoppala
  2019-02-12 13:37 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2019-02-12 13:08 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala

Use lockdep to warn before we wait indefinitely in case we may be
waiting indefinitely.

Suggested-by: Mika Kuoppala <mika.kuoppala@intel.com>
References: 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/i915_reset.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reset.c b/drivers/gpu/drm/i915/i915_reset.c
index c1b53533ada6..12e74decd7a2 100644
--- a/drivers/gpu/drm/i915/i915_reset.c
+++ b/drivers/gpu/drm/i915/i915_reset.c
@@ -1305,6 +1305,9 @@ int i915_reset_trylock(struct drm_i915_private *i915)
 	struct i915_gpu_error *error = &i915->gpu_error;
 	int srcu;
 
+	might_lock(&error->reset_backoff_srcu);
+	might_sleep();
+
 	rcu_read_lock();
 	while (test_bit(I915_RESET_BACKOFF, &error->flags)) {
 		rcu_read_unlock();
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten
  2019-02-12 13:08 [PATCH 1/2] drm/i915: Recursive i915_reset_trylock() verboten Chris Wilson
  2019-02-12 13:08 ` [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups Chris Wilson
@ 2019-02-12 13:37 ` Patchwork
  2019-02-12 13:37 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-02-12 13:37 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten
URL   : https://patchwork.freedesktop.org/series/56535/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
47ca4b30856e drm/i915: Recursive i915_reset_trylock() verboten
f35c801a51cc drm/i915: Detect potential i915_reset_trylock() lockups
-:10: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#10: 
References: 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset")

-:10: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset")'
#10: 
References: 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset")

total: 1 errors, 1 warnings, 0 checks, 9 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten
  2019-02-12 13:08 [PATCH 1/2] drm/i915: Recursive i915_reset_trylock() verboten Chris Wilson
  2019-02-12 13:08 ` [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups Chris Wilson
  2019-02-12 13:37 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten Patchwork
@ 2019-02-12 13:37 ` Patchwork
  2019-02-12 13:57 ` ✓ Fi.CI.BAT: success " Patchwork
  2019-02-12 16:18 ` ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-02-12 13:37 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten
URL   : https://patchwork.freedesktop.org/series/56535/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915: Recursive i915_reset_trylock() verboten
-O:drivers/gpu/drm/i915/i915_gem.c:1940:32: warning: expression using sizeof(void)
-O:drivers/gpu/drm/i915/i915_gem.c:1940:32: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_gem.c:1940:32: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_gem.c:1940:32: warning: expression using sizeof(void)

Commit: drm/i915: Detect potential i915_reset_trylock() lockups
Okay!

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten
  2019-02-12 13:08 [PATCH 1/2] drm/i915: Recursive i915_reset_trylock() verboten Chris Wilson
                   ` (2 preceding siblings ...)
  2019-02-12 13:37 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2019-02-12 13:57 ` Patchwork
  2019-02-12 16:18 ` ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-02-12 13:57 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten
URL   : https://patchwork.freedesktop.org/series/56535/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5592 -> Patchwork_12203
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56535/revisions/1/mbox/

Known issues
------------

  Here are the changes found in Patchwork_12203 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@userptr:
    - fi-kbl-8809g:       PASS -> DMESG-WARN [fdo#108965]

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-kbl-7567u:       PASS -> WARN [fdo#109380]

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  
#### Possible fixes ####

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS

  * igt@kms_pipe_crc_basic@read-crc-pipe-b:
    - fi-byt-clapper:     FAIL [fdo#107362] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
  [fdo#109226]: https://bugs.freedesktop.org/show_bug.cgi?id=109226
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109380]: https://bugs.freedesktop.org/show_bug.cgi?id=109380


Participating hosts (46 -> 40)
------------------------------

  Additional (1): fi-pnv-d510 
  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus 


Build changes
-------------

    * Linux: CI_DRM_5592 -> Patchwork_12203

  CI_DRM_5592: 21b5bf210fc5659e3d5eda86727e689ebda26e29 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4818: ed32029e6a630d9322bd544b626eea38b4785e68 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12203: f35c801a51ccc5558ba49aeb173bc3be63beffc7 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

f35c801a51cc drm/i915: Detect potential i915_reset_trylock() lockups
47ca4b30856e drm/i915: Recursive i915_reset_trylock() verboten

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12203/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups
  2019-02-12 13:08 ` [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups Chris Wilson
@ 2019-02-12 14:15   ` Mika Kuoppala
  0 siblings, 0 replies; 8+ messages in thread
From: Mika Kuoppala @ 2019-02-12 14:15 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Use lockdep to warn before we wait indefinitely in case we may be
> waiting indefinitely.
>
> Suggested-by: Mika Kuoppala <mika.kuoppala@intel.com>
> References: 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_reset.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_reset.c b/drivers/gpu/drm/i915/i915_reset.c
> index c1b53533ada6..12e74decd7a2 100644
> --- a/drivers/gpu/drm/i915/i915_reset.c
> +++ b/drivers/gpu/drm/i915/i915_reset.c
> @@ -1305,6 +1305,9 @@ int i915_reset_trylock(struct drm_i915_private *i915)
>  	struct i915_gpu_error *error = &i915->gpu_error;
>  	int srcu;
>  
> +	might_lock(&error->reset_backoff_srcu);
> +	might_sleep();
> +
>  	rcu_read_lock();
>  	while (test_bit(I915_RESET_BACKOFF, &error->flags)) {
>  		rcu_read_unlock();
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten
  2019-02-12 13:08 [PATCH 1/2] drm/i915: Recursive i915_reset_trylock() verboten Chris Wilson
                   ` (3 preceding siblings ...)
  2019-02-12 13:57 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-02-12 16:18 ` Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-02-12 16:18 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten
URL   : https://patchwork.freedesktop.org/series/56535/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5592_full -> Patchwork_12203_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_12203_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_eio@unwedge-stress:
    - shard-snb:          PASS -> FAIL [fdo#107799]

  * igt@kms_busy@extended-modeset-hang-newfb-render-a:
    - shard-kbl:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
    - shard-snb:          NOTRUN -> DMESG-WARN [fdo#107956] +1

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
    - shard-glk:          PASS -> DMESG-WARN [fdo#107956]

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
    - shard-apl:          PASS -> FAIL [fdo#106510] / [fdo#108145]

  * igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
    - shard-glk:          PASS -> FAIL [fdo#108145]

  * igt@kms_color@pipe-a-ctm-max:
    - shard-apl:          PASS -> FAIL [fdo#108147]

  * igt@kms_content_protection@legacy:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108597]

  * igt@kms_cursor_crc@cursor-128x128-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +2

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
    - shard-glk:          PASS -> FAIL [fdo#105363]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-apl:          PASS -> FAIL [fdo#103167] +4

  * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
    - shard-apl:          NOTRUN -> FAIL [fdo#108145]
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145] / [fdo#108590]

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
    - shard-apl:          PASS -> FAIL [fdo#103166] +1

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
    - shard-glk:          PASS -> FAIL [fdo#103166] +1

  * igt@kms_properties@connector-properties-legacy:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#103313] / [fdo#105345]

  
#### Possible fixes ####

  * igt@gem_eio@in-flight-suspend:
    - shard-snb:          FAIL [fdo#103375] -> PASS

  * igt@gem_mmap_gtt@hang:
    - shard-kbl:          INCOMPLETE [fdo#103665] / [fdo#109605 ] -> PASS
    - shard-snb:          INCOMPLETE [fdo#105411] / [fdo#109605 ] -> PASS
    - shard-apl:          INCOMPLETE [fdo#103927] / [fdo#109605 ] -> PASS

  * igt@gem_workarounds@suspend-resume-context:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  * igt@kms_cursor_crc@cursor-128x128-onscreen:
    - shard-apl:          FAIL [fdo#103232] -> PASS

  * igt@kms_flip@dpms-vs-vblank-race:
    - shard-apl:          FAIL [fdo#103060] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
    - shard-apl:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
    - shard-glk:          FAIL [fdo#103167] -> PASS +1

  * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
    - shard-glk:          FAIL [fdo#108145] -> PASS

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
    - shard-apl:          FAIL [fdo#103166] -> PASS

  * igt@kms_setmode@basic:
    - shard-kbl:          FAIL [fdo#99912] -> PASS

  * igt@pm_rc6_residency@rc6-accuracy:
    - shard-snb:          {SKIP} [fdo#109271] -> PASS

  
#### Warnings ####

  * igt@kms_rotation_crc@multiplane-rotation:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> FAIL [fdo#109016]

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103313]: https://bugs.freedesktop.org/show_bug.cgi?id=103313
  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105345]: https://bugs.freedesktop.org/show_bug.cgi?id=105345
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#106510]: https://bugs.freedesktop.org/show_bug.cgi?id=106510
  [fdo#107799]: https://bugs.freedesktop.org/show_bug.cgi?id=107799
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
  [fdo#108597]: https://bugs.freedesktop.org/show_bug.cgi?id=108597
  [fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109605 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109605 
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


Build changes
-------------

    * Linux: CI_DRM_5592 -> Patchwork_12203

  CI_DRM_5592: 21b5bf210fc5659e3d5eda86727e689ebda26e29 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4818: ed32029e6a630d9322bd544b626eea38b4785e68 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12203: f35c801a51ccc5558ba49aeb173bc3be63beffc7 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12203/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups
  2019-02-12 12:47 [PATCH 1/2] " Chris Wilson
@ 2019-02-12 12:47 ` Chris Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2019-02-12 12:47 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala

Use lockdep to warn before we wait indefinitely in case we may be
waiting indefinitely.

Suggested-by: Mika Kuoppala <mika.kuoppala@intel.com>
References: 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/i915_reset.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reset.c b/drivers/gpu/drm/i915/i915_reset.c
index c1b53533ada6..364c74d1d59b 100644
--- a/drivers/gpu/drm/i915/i915_reset.c
+++ b/drivers/gpu/drm/i915/i915_reset.c
@@ -1305,6 +1305,8 @@ int i915_reset_trylock(struct drm_i915_private *i915)
 	struct i915_gpu_error *error = &i915->gpu_error;
 	int srcu;
 
+	might_lock(&error->reset_backoff_srcu);
+
 	rcu_read_lock();
 	while (test_bit(I915_RESET_BACKOFF, &error->flags)) {
 		rcu_read_unlock();
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-02-12 16:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-12 13:08 [PATCH 1/2] drm/i915: Recursive i915_reset_trylock() verboten Chris Wilson
2019-02-12 13:08 ` [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups Chris Wilson
2019-02-12 14:15   ` Mika Kuoppala
2019-02-12 13:37 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Recursive i915_reset_trylock() verboten Patchwork
2019-02-12 13:37 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-02-12 13:57 ` ✓ Fi.CI.BAT: success " Patchwork
2019-02-12 16:18 ` ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-02-12 12:47 [PATCH 1/2] " Chris Wilson
2019-02-12 12:47 ` [PATCH 2/2] drm/i915: Detect potential i915_reset_trylock() lockups Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.