intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Restore sane defaults for KMS on GEM error load
@ 2018-07-26  6:56 Chris Wilson
  2018-07-26  7:41 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2018-07-26  6:56 UTC (permalink / raw)
  To: intel-gfx

If we fail during GEM initialisation, we scrub the HW state by
performing a device level GPU resuet. However, we want to leave the
system in a usable state (with functioning KMS but no GEM) so after
scrubbing the HW state, we need to restore some sane defaults and
re-enable the low-level common parts of the GPU (such as the GMCH).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a4031fab57b0..2b93fdd5a7a6 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5608,7 +5608,10 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
 					"Failed to initialize GPU, declaring it wedged!\n");
 			i915_gem_set_wedged(dev_priv);
 		}
-		ret = 0;
+
+		/* Minimal basic recovery for KMS */
+		ret = i915_ggtt_enable_hw(dev_priv);
+		intel_init_clock_gating(dev_priv);
 	}
 
 	i915_gem_drain_freed_objects(dev_priv);
-- 
2.18.0

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

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

* ✗ Fi.CI.BAT: failure for drm/i915: Restore sane defaults for KMS on GEM error load
  2018-07-26  6:56 [PATCH] drm/i915: Restore sane defaults for KMS on GEM error load Chris Wilson
@ 2018-07-26  7:41 ` Patchwork
  2018-07-26  7:48 ` [PATCH] " Chris Wilson
  2018-07-26  8:51 ` ✗ Fi.CI.BAT: failure for drm/i915: Restore sane defaults for KMS on GEM error load (rev2) Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-07-26  7:41 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Restore sane defaults for KMS on GEM error load
URL   : https://patchwork.freedesktop.org/series/47266/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4547 -> Patchwork_9775 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_9775 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9775, 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/47266/revisions/1/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@debugfs_test@read_all_entries:
      {fi-icl-u}:         NOTRUN -> DMESG-WARN +5

    igt@drv_selftest@live_objects:
      fi-cnl-psr:         NOTRUN -> DMESG-FAIL

    {igt@kms_psr@primary_page_flip}:
      {fi-icl-u}:         NOTRUN -> FAIL +3

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-no-display:
      fi-cnl-psr:         NOTRUN -> DMESG-WARN (fdo#105395) +5

    igt@drv_selftest@live_hangcheck:
      fi-kbl-7560u:       PASS -> DMESG-FAIL (fdo#106947, fdo#106560)

    igt@drv_selftest@live_objects:
      {fi-icl-u}:         NOTRUN -> DMESG-FAIL (fdo#107339)

    igt@drv_selftest@live_workarounds:
      fi-cnl-psr:         NOTRUN -> DMESG-FAIL (fdo#107292)

    igt@drv_selftest@mock_sanitycheck:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#107344)

    igt@gem_exec_suspend@basic-s3:
      {fi-skl-caroline}:  NOTRUN -> INCOMPLETE (fdo#104108)

    igt@gem_workarounds@basic-read:
      {fi-icl-u}:         NOTRUN -> FAIL (fdo#107338)

    igt@kms_busy@basic-flip-c:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#105719)

    {igt@kms_psr@cursor_plane_move}:
      fi-cnl-psr:         NOTRUN -> DMESG-FAIL (fdo#107372)

    {igt@kms_psr@primary_page_flip}:
      fi-cnl-psr:         NOTRUN -> DMESG-WARN (fdo#107372)

    igt@prime_vgem@basic-fence-flip:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000)
      fi-byt-j1900:       NOTRUN -> FAIL (fdo#104008)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_hangcheck:
      fi-bxt-dsi:         DMESG-FAIL (fdo#106560) -> PASS

    igt@gem_exec_create@basic:
      fi-glk-j4005:       DMESG-WARN (fdo#106745) -> PASS

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

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

  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
  fdo#105395 https://bugs.freedesktop.org/show_bug.cgi?id=105395
  fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719
  fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
  fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
  fdo#106745 https://bugs.freedesktop.org/show_bug.cgi?id=106745
  fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
  fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
  fdo#107338 https://bugs.freedesktop.org/show_bug.cgi?id=107338
  fdo#107339 https://bugs.freedesktop.org/show_bug.cgi?id=107339
  fdo#107344 https://bugs.freedesktop.org/show_bug.cgi?id=107344
  fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372


== Participating hosts (48 -> 45) ==

  Additional (4): fi-byt-j1900 fi-skl-caroline fi-icl-u fi-cnl-psr 
  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper 


== Build changes ==

    * Linux: CI_DRM_4547 -> Patchwork_9775

  CI_DRM_4547: 0a7ab192a697e951b2404f3c1ce42c5fa74f9ed1 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4575: fe908a01012c9daafafb3410b9407725ca9d4f21 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9775: 6492373a1aa1f42796239cc9e3b1abbc2d5d35a7 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

6492373a1aa1 drm/i915: Restore sane defaults for KMS on GEM error load

== Logs ==

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

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

* [PATCH] drm/i915: Restore sane defaults for KMS on GEM error load
  2018-07-26  6:56 [PATCH] drm/i915: Restore sane defaults for KMS on GEM error load Chris Wilson
  2018-07-26  7:41 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2018-07-26  7:48 ` Chris Wilson
  2018-07-26  8:51 ` ✗ Fi.CI.BAT: failure for drm/i915: Restore sane defaults for KMS on GEM error load (rev2) Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2018-07-26  7:48 UTC (permalink / raw)
  To: intel-gfx

If we fail during GEM initialisation, we scrub the HW state by
performing a device level GPU resuet. However, we want to leave the
system in a usable state (with functioning KMS but no GEM) so after
scrubbing the HW state, we need to restore some sane defaults and
re-enable the low-level common parts of the GPU (such as the GMCH).

v2: Restore GTT entries.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a4031fab57b0..45397ba4f443 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5608,7 +5608,12 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
 					"Failed to initialize GPU, declaring it wedged!\n");
 			i915_gem_set_wedged(dev_priv);
 		}
-		ret = 0;
+
+		/* Minimal basic recovery for KMS */
+		ret = i915_ggtt_enable_hw(dev_priv);
+		i915_gem_restore_gtt_mappings(dev_priv);
+		i915_gem_restore_fences(dev_priv);
+		intel_init_clock_gating(dev_priv);
 	}
 
 	i915_gem_drain_freed_objects(dev_priv);
-- 
2.18.0

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

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

* ✗ Fi.CI.BAT: failure for drm/i915: Restore sane defaults for KMS on GEM error load (rev2)
  2018-07-26  6:56 [PATCH] drm/i915: Restore sane defaults for KMS on GEM error load Chris Wilson
  2018-07-26  7:41 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2018-07-26  7:48 ` [PATCH] " Chris Wilson
@ 2018-07-26  8:51 ` Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-07-26  8:51 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Restore sane defaults for KMS on GEM error load (rev2)
URL   : https://patchwork.freedesktop.org/series/47266/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4548 -> Patchwork_9776 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_9776 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9776, 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/47266/revisions/2/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_module_reload@basic-reload-inject:
      fi-skl-6260u:       PASS -> DMESG-FAIL
      fi-snb-2600:        PASS -> DMESG-FAIL
      fi-byt-j1900:       PASS -> DMESG-FAIL
      fi-kbl-7560u:       PASS -> DMESG-FAIL
      fi-skl-6770hq:      PASS -> DMESG-FAIL
      fi-byt-n2820:       PASS -> DMESG-FAIL
      fi-bxt-j4205:       PASS -> DMESG-FAIL
      fi-kbl-r:           PASS -> DMESG-FAIL
      fi-cfl-s3:          PASS -> DMESG-FAIL
      {fi-cfl-8109u}:     PASS -> DMESG-FAIL
      fi-snb-2520m:       PASS -> DMESG-FAIL
      {fi-bsw-kefka}:     PASS -> DMESG-FAIL
      fi-bdw-gvtdvm:      PASS -> DMESG-FAIL
      fi-ilk-650:         PASS -> DMESG-FAIL
      fi-bsw-n3050:       PASS -> DMESG-FAIL
      fi-kbl-7567u:       PASS -> DMESG-FAIL
      {fi-skl-iommu}:     PASS -> DMESG-FAIL
      fi-ivb-3770:        PASS -> DMESG-FAIL
      fi-skl-gvtdvm:      PASS -> DMESG-FAIL
      fi-whl-u:           PASS -> DMESG-FAIL
      fi-skl-6700hq:      PASS -> DMESG-FAIL
      fi-kbl-7500u:       PASS -> DMESG-FAIL
      fi-ivb-3520m:       PASS -> DMESG-FAIL
      fi-hsw-4770:        PASS -> DMESG-FAIL
      {fi-bdw-samus}:     PASS -> DMESG-FAIL
      {fi-kbl-8809g}:     NOTRUN -> DMESG-FAIL
      fi-glk-dsi:         PASS -> DMESG-FAIL
      fi-bdw-5557u:       PASS -> DMESG-FAIL
      fi-cfl-8700k:       PASS -> DMESG-FAIL
      fi-hsw-peppy:       PASS -> DMESG-FAIL
      {fi-icl-u}:         PASS -> DMESG-FAIL
      fi-kbl-x1275:       PASS -> DMESG-FAIL
      fi-skl-6600u:       PASS -> DMESG-FAIL
      fi-hsw-4770r:       PASS -> DMESG-FAIL
      fi-skl-6700k2:      PASS -> DMESG-FAIL
      fi-elk-e7500:       PASS -> DMESG-FAIL

    
    ==== Warnings ====

    igt@drv_module_reload@basic-reload-inject:
      fi-bwr-2160:        INCOMPLETE -> DMESG-FAIL
      fi-gdg-551:         INCOMPLETE -> DMESG-FAIL
      fi-glk-j4005:       DMESG-WARN (fdo#105719) -> DMESG-FAIL
      fi-cnl-psr:         DMESG-WARN (fdo#105395) -> DMESG-FAIL
      fi-blb-e6850:       INCOMPLETE -> DMESG-FAIL

    igt@drv_selftest@live_contexts:
      fi-cfl-s3:          PASS -> SKIP +29

    igt@drv_selftest@live_dmabuf:
      fi-hsw-4770r:       PASS -> SKIP +29

    igt@drv_selftest@live_evict:
      fi-kbl-x1275:       PASS -> SKIP +29

    igt@drv_selftest@live_guc:
      fi-hsw-peppy:       PASS -> SKIP +29
      {fi-bdw-samus}:     PASS -> SKIP +29

    igt@drv_selftest@live_hangcheck:
      fi-snb-2520m:       PASS -> SKIP +29

    igt@drv_selftest@live_hugepages:
      {fi-cfl-8109u}:     PASS -> SKIP +29

    igt@drv_selftest@live_objects:
      fi-bdw-5557u:       PASS -> SKIP +29
      fi-snb-2600:        PASS -> SKIP +29
      fi-skl-6770hq:      PASS -> SKIP +29

    igt@drv_selftest@live_requests:
      fi-whl-u:           PASS -> SKIP +29
      fi-skl-gvtdvm:      PASS -> SKIP +29
      fi-ivb-3520m:       PASS -> SKIP +29

    igt@drv_selftest@live_sanitycheck:
      fi-bdw-gvtdvm:      PASS -> SKIP +29
      fi-bsw-n3050:       PASS -> SKIP +29

    igt@drv_selftest@live_uncore:
      fi-kbl-7560u:       PASS -> SKIP +29
      fi-skl-6600u:       PASS -> SKIP +29

    igt@drv_selftest@live_workarounds:
      fi-kbl-r:           PASS -> SKIP +29

    igt@drv_selftest@mock_dmabuf:
      fi-cfl-8700k:       PASS -> SKIP +29
      {fi-skl-iommu}:     PASS -> SKIP +29
      fi-byt-n2820:       PASS -> SKIP +29

    igt@drv_selftest@mock_engine:
      fi-skl-6260u:       PASS -> SKIP +29

    igt@drv_selftest@mock_evict:
      fi-byt-j1900:       PASS -> SKIP +29

    igt@drv_selftest@mock_fence:
      fi-skl-6700k2:      PASS -> SKIP +29
      fi-elk-e7500:       PASS -> SKIP +29

    igt@drv_selftest@mock_hugepages:
      fi-glk-j4005:       PASS -> SKIP +29

    igt@drv_selftest@mock_requests:
      fi-cnl-psr:         PASS -> SKIP +15

    igt@drv_selftest@mock_sanitycheck:
      fi-skl-6700hq:      PASS -> SKIP +29
      fi-kbl-7500u:       PASS -> SKIP +29
      fi-hsw-4770:        PASS -> SKIP +29

    igt@drv_selftest@mock_timelines:
      fi-glk-dsi:         PASS -> SKIP +29
      fi-bxt-j4205:       PASS -> SKIP +29
      {fi-icl-u}:         PASS -> SKIP +19
      fi-ivb-3770:        PASS -> SKIP +29

    igt@drv_selftest@mock_uncore:
      fi-ilk-650:         PASS -> SKIP +29
      fi-kbl-7567u:       PASS -> SKIP +29

    igt@drv_selftest@mock_vma:
      {fi-bsw-kefka}:     PASS -> SKIP +28

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
      fi-skl-6700k2:      PASS -> FAIL (fdo#103191)

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

    
    ==== Possible fixes ====

    igt@drv_selftest@live_objects:
      fi-cnl-psr:         DMESG-FAIL -> SKIP
      {fi-icl-u}:         DMESG-FAIL (fdo#107339) -> SKIP

    igt@drv_selftest@live_sanitycheck:
      fi-cnl-psr:         DMESG-WARN (fdo#105395) -> SKIP +3

    igt@drv_selftest@live_workarounds:
      {fi-bsw-kefka}:     DMESG-FAIL (fdo#107292) -> SKIP

    
  {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#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105395 https://bugs.freedesktop.org/show_bug.cgi?id=105395
  fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719
  fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
  fdo#107339 https://bugs.freedesktop.org/show_bug.cgi?id=107339


== Participating hosts (51 -> 45) ==

  Additional (1): fi-kbl-8809g 
  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper 


== Build changes ==

    * Linux: CI_DRM_4548 -> Patchwork_9776

  CI_DRM_4548: 1ccdb8d0bf55621006a4ac04e8e5e964480382ef @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4576: bcb37a9b20eeec97f15fac2222408cc2e0b77631 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9776: 17ae1d530d02451ed7451645ca3b25307365b48d @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

17ae1d530d02 drm/i915: Restore sane defaults for KMS on GEM error load

== Logs ==

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

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

end of thread, other threads:[~2018-07-26  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-26  6:56 [PATCH] drm/i915: Restore sane defaults for KMS on GEM error load Chris Wilson
2018-07-26  7:41 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-07-26  7:48 ` [PATCH] " Chris Wilson
2018-07-26  8:51 ` ✗ Fi.CI.BAT: failure for drm/i915: Restore sane defaults for KMS on GEM error load (rev2) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).