All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Use GEM suspend when aborting initialisation
@ 2018-06-06 14:54 Chris Wilson
  2018-06-06 15:56 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2018-06-06 14:54 UTC (permalink / raw)
  To: intel-gfx

As part of our GEM initialisation now, we send a request to the hardware
in order to record the initial GPU state. This coupled with deferred
idle workers, makes aborting on error tricky. We already have the
mechanism in place to wait on the GPU and cancel all the deferred
workers for suspend, so let's reuse it during the error teardown. It is
already used in places for later init error handling, but doing so at
this point is slightly ugly due to the mutex dance (it's ok, the module
load is still single threaded).

Testcase: igt/drv_module_reload/basic-reload-inject
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 86f1f9aaa119..1074f47e6cda 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5514,8 +5514,12 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
 	 * driver doesn't explode during runtime.
 	 */
 err_init_hw:
-	i915_gem_wait_for_idle(dev_priv, I915_WAIT_LOCKED);
-	i915_gem_contexts_lost(dev_priv);
+	mutex_unlock(&dev_priv->drm.struct_mutex);
+
+	WARN_ON(i915_gem_suspend(dev_priv));
+	i915_gem_suspend_late(dev_priv);
+
+	mutex_lock(&dev_priv->drm.struct_mutex);
 	intel_uc_fini_hw(dev_priv);
 err_uc_init:
 	intel_uc_fini(dev_priv);
-- 
2.17.1

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

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

* ✓ Fi.CI.BAT: success for drm/i915: Use GEM suspend when aborting initialisation
  2018-06-06 14:54 [PATCH] drm/i915: Use GEM suspend when aborting initialisation Chris Wilson
@ 2018-06-06 15:56 ` Patchwork
  2018-06-06 18:46 ` ✓ Fi.CI.IGT: " Patchwork
  2018-06-07  7:39 ` [PATCH] " Michał Winiarski
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-06-06 15:56 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Use GEM suspend when aborting initialisation
URL   : https://patchwork.freedesktop.org/series/44359/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4282 -> Patchwork_9222 =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_9222 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9222, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_9222:

  === IGT changes ===

    ==== Warnings ====

    igt@gem_exec_gttfill@basic:
      fi-pnv-d510:        SKIP -> PASS

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_mmap_gtt@basic-small-bo-tiledx:
      fi-gdg-551:         PASS -> FAIL (fdo#102575)

    igt@kms_flip@basic-flip-vs-modeset:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000)

    
    ==== Possible fixes ====

    igt@gem_sync@basic-each:
      fi-cnl-y3:          INCOMPLETE (fdo#105086) -> PASS

    igt@kms_flip@basic-flip-vs-wf_vblank:
      fi-glk-j4005:       FAIL (fdo#100368) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         INCOMPLETE (fdo#103927) -> PASS

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105086 https://bugs.freedesktop.org/show_bug.cgi?id=105086
  fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000


== Participating hosts (41 -> 37) ==

  Missing    (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq 


== Build changes ==

    * Linux: CI_DRM_4282 -> Patchwork_9222

  CI_DRM_4282: c1064b9be065603680d060184da1a93d404dcf0c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4508: 78a68c905066beeefd24b3a4518d817a811e8798 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9222: f6e2c5c2c5442d2f6d99b7b12e435cf703a79ab0 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

f6e2c5c2c544 drm/i915: Use GEM suspend when aborting initialisation

== Logs ==

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

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

* ✓ Fi.CI.IGT: success for drm/i915: Use GEM suspend when aborting initialisation
  2018-06-06 14:54 [PATCH] drm/i915: Use GEM suspend when aborting initialisation Chris Wilson
  2018-06-06 15:56 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-06-06 18:46 ` Patchwork
  2018-06-07  7:39 ` [PATCH] " Michał Winiarski
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-06-06 18:46 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Use GEM suspend when aborting initialisation
URL   : https://patchwork.freedesktop.org/series/44359/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4282_full -> Patchwork_9222_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_9222_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9222_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_9222_full:

  === IGT changes ===

    ==== Warnings ====

    igt@gem_exec_schedule@deep-blt:
      shard-kbl:          SKIP -> PASS +1

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

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

    
    ==== Possible fixes ====

    igt@drv_selftest@live_gtt:
      shard-glk:          INCOMPLETE (fdo#103359, k.org#198133) -> PASS

    igt@gem_exec_big:
      shard-hsw:          INCOMPLETE (fdo#103540) -> PASS

    igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
      shard-glk:          FAIL (fdo#106509, fdo#105454) -> PASS

    igt@kms_flip@flip-vs-expired-vblank:
      shard-hsw:          FAIL (fdo#105189) -> PASS

    igt@kms_flip@plain-flip-fb-recreate-interruptible:
      shard-glk:          FAIL (fdo#100368) -> PASS +1

    igt@kms_flip_tiling@flip-x-tiled:
      shard-glk:          FAIL (fdo#103822, fdo#104724) -> PASS +2

    
    ==== Warnings ====

    igt@gem_eio@suspend:
      shard-snb:          INCOMPLETE (fdo#105411) -> DMESG-FAIL (fdo#106808)

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
  fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
  fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
  fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
  fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
  fdo#106808 https://bugs.freedesktop.org/show_bug.cgi?id=106808
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4282 -> Patchwork_9222

  CI_DRM_4282: c1064b9be065603680d060184da1a93d404dcf0c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4508: 78a68c905066beeefd24b3a4518d817a811e8798 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9222: f6e2c5c2c5442d2f6d99b7b12e435cf703a79ab0 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

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

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

* Re: [PATCH] drm/i915: Use GEM suspend when aborting initialisation
  2018-06-06 14:54 [PATCH] drm/i915: Use GEM suspend when aborting initialisation Chris Wilson
  2018-06-06 15:56 ` ✓ Fi.CI.BAT: success for " Patchwork
  2018-06-06 18:46 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-06-07  7:39 ` Michał Winiarski
  2018-06-07  7:43   ` Chris Wilson
  2 siblings, 1 reply; 5+ messages in thread
From: Michał Winiarski @ 2018-06-07  7:39 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Wed, Jun 06, 2018 at 03:54:41PM +0100, Chris Wilson wrote:
> As part of our GEM initialisation now, we send a request to the hardware
> in order to record the initial GPU state. This coupled with deferred
> idle workers, makes aborting on error tricky. We already have the
> mechanism in place to wait on the GPU and cancel all the deferred
> workers for suspend, so let's reuse it during the error teardown. It is
> already used in places for later init error handling, but doing so at
> this point is slightly ugly due to the mutex dance (it's ok, the module
> load is still single threaded).
> 
> Testcase: igt/drv_module_reload/basic-reload-inject
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michał Winiarski <michal.winiarski@intel.com>

Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

-Michał

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 86f1f9aaa119..1074f47e6cda 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -5514,8 +5514,12 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
>  	 * driver doesn't explode during runtime.
>  	 */
>  err_init_hw:
> -	i915_gem_wait_for_idle(dev_priv, I915_WAIT_LOCKED);
> -	i915_gem_contexts_lost(dev_priv);
> +	mutex_unlock(&dev_priv->drm.struct_mutex);
> +
> +	WARN_ON(i915_gem_suspend(dev_priv));
> +	i915_gem_suspend_late(dev_priv);
> +
> +	mutex_lock(&dev_priv->drm.struct_mutex);
>  	intel_uc_fini_hw(dev_priv);
>  err_uc_init:
>  	intel_uc_fini(dev_priv);
> -- 
> 2.17.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Use GEM suspend when aborting initialisation
  2018-06-07  7:39 ` [PATCH] " Michał Winiarski
@ 2018-06-07  7:43   ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2018-06-07  7:43 UTC (permalink / raw)
  To: Michał Winiarski; +Cc: intel-gfx

Quoting Michał Winiarski (2018-06-07 08:39:39)
> On Wed, Jun 06, 2018 at 03:54:41PM +0100, Chris Wilson wrote:
> > As part of our GEM initialisation now, we send a request to the hardware
> > in order to record the initial GPU state. This coupled with deferred
> > idle workers, makes aborting on error tricky. We already have the
> > mechanism in place to wait on the GPU and cancel all the deferred
> > workers for suspend, so let's reuse it during the error teardown. It is
> > already used in places for later init error handling, but doing so at
> > this point is slightly ugly due to the mutex dance (it's ok, the module
> > load is still single threaded).
> > 
> > Testcase: igt/drv_module_reload/basic-reload-inject
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Michał Winiarski <michal.winiarski@intel.com>
> 
> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

And pushed. Now let's see how close we are to making CI great again!

Quick! Where's my coffee?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-06-07  7:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-06 14:54 [PATCH] drm/i915: Use GEM suspend when aborting initialisation Chris Wilson
2018-06-06 15:56 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-06-06 18:46 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-07  7:39 ` [PATCH] " Michał Winiarski
2018-06-07  7:43   ` 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.