Skip to contentSkip to conversation

drm/i915/guc: GuC suspend path cleanup

PATCH Superseded Sujaritha Sundaresan 4 participants 16 messages Mar 21, 2019 – Mar 22, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/guc: GuC suspend path cleanup

Adding a call to intel_uc_suspend in i915_gem_suspend, which is a common point for the suspend/resume and hibernate paths. This fixes an unbalanced call that causes issues with the CTB register/deregister.

Cc Daniele Ceraolo Spurio <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Michal Wajdeczko <[email protected]>
---
 drivers/gpu/drm/i915/i915_gem.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_gem.c +3 -0
index 1a684b7e8c09..980855ebdeda 100644
@@ -4371,6 +4371,9 @@ void i915_gem_suspend(struct drm_i915_private *i915)
 	 */
 	switch_to_kernel_context_sync(i915, i915->gt.active_engines);
 
+	if (!__i915_wedged(&i915->gpu_error))
+		intel_uc_suspend(i915);
+
 	mutex_unlock(&i915->drm.struct_mutex);
 	i915_reset_flush(i915);
 
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 18 lines · Sujaritha Sundaresan

Adding a call to intel_uc_suspend in i915_gem_suspend, which is a common point for the suspend/resume and hibernate paths. This fixes an unbalanced call that causes issues with the CTB register/deregister.

Cc Daniele Ceraolo Spurio <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Michal Wajdeczko <[email protected]>
---
  drivers/gpu/drm/i915/i915_gem.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_gem.c +0 -0
index 1a684b7e8c09..980855ebdeda 100644

drivers/gpu/drm/i915/i915_gem.c void i915_gem_suspend(struct drm_i915_private *i915) · line 4375

Quoted 5 lines
drivers/gpu/drm/i915/i915_gem.c +2 -0
@@ -4371,6 +4371,9 @@ void i915_gem_suspend(struct drm_i915_private *i915)
  	 */
  	switch_to_kernel_context_sync(i915, i915->gt.active_engines);
 
+	if (!__i915_wedged(&i915->gpu_error))
+		intel_uc_suspend(i915);

We can probably call intel_uc_suspend unconditionally, because it internally checks for INTEL_UC_FIRMWARE_SUCCESS, which should be false if we wedged due to the uc_reset_prepare we added to the wedge function.

Daniele

drivers/gpu/drm/i915/i915_gem.c void i915_gem_suspend(struct drm_i915_private *i915) · line 4379

Quoted 5 lines
drivers/gpu/drm/i915/i915_gem.c +1 -0
+
  	mutex_unlock(&i915->drm.struct_mutex);
  	i915_reset_flush(i915);
 

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

Quoting Daniele Ceraolo Spurio (2019-03-21 17:49:55)

Quoted 24 lines · Sujaritha Sundaresan
Quoted 21 lines

Adding a call to intel_uc_suspend in i915_gem_suspend, which is a common point for the suspend/resume and hibernate paths. This fixes an unbalanced call that causes issues with the CTB register/deregister.

Cc Daniele Ceraolo Spurio <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Michal Wajdeczko <[email protected]>
---
  drivers/gpu/drm/i915/i915_gem.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_gem.c +0 -0
index 1a684b7e8c09..980855ebdeda 100644
@@ -4371,6 +4371,9 @@ void i915_gem_suspend(struct drm_i915_private *i915)
       */
      switch_to_kernel_context_sync(i915, i915->gt.active_engines);
 
Quoted 6 lines

drivers/gpu/drm/i915/i915_gem.c void i915_gem_suspend(struct drm_i915_private *i915) · line 4375

Quoted 2 lines
drivers/gpu/drm/i915/i915_gem.c +2 -0
+     if (!__i915_wedged(&i915->gpu_error))
+             intel_uc_suspend(i915);

We can probably call intel_uc_suspend unconditionally, because it internally checks for INTEL_UC_FIRMWARE_SUCCESS, which should be false if we wedged due to the uc_reset_prepare we added to the wedge function.

\o/ I was hoping there was a more natural test inside intel_uc. -Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#3 lore raw
Quoted 24 lines · Chris Wilson

Quoting Daniele Ceraolo Spurio (2019-03-21 17:49:55)

Quoted 23 lines · Sujaritha Sundaresan
Quoted 21 lines

Adding a call to intel_uc_suspend in i915_gem_suspend, which is a common point for the suspend/resume and hibernate paths. This fixes an unbalanced call that causes issues with the CTB register/deregister.

Cc Daniele Ceraolo Spurio <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Michal Wajdeczko <[email protected]>
---
   drivers/gpu/drm/i915/i915_gem.c | 3 +++
   1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_gem.c +0 -0
index 1a684b7e8c09..980855ebdeda 100644
@@ -4371,6 +4371,9 @@ void i915_gem_suspend(struct drm_i915_private *i915)
        */
       switch_to_kernel_context_sync(i915, i915->gt.active_engines);
 
Quoted 7 lines
Quoted 5 lines

drivers/gpu/drm/i915/i915_gem.c void i915_gem_suspend(struct drm_i915_private *i915) · line 4375

Quoted 2 lines
drivers/gpu/drm/i915/i915_gem.c +2 -0
+     if (!__i915_wedged(&i915->gpu_error))
+             intel_uc_suspend(i915);

We can probably call intel_uc_suspend unconditionally, because it internally checks for INTEL_UC_FIRMWARE_SUCCESS, which should be false if we wedged due to the uc_reset_prepare we added to the wedge function.

\o/ I was hoping there was a more natural test inside intel_uc. -Chris

Sure that seems like a more straight forward check.

I will drop the condition.

-Sujaritha

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

✗ Fi.CI.BAT: failure for drm/i915/guc: GuC suspend path cleanup

In reply to Sujaritha Sundaresan
== Series Details ==

== Series Details ==

Series: drm/i915/guc: GuC suspend path cleanup
URL : https://patchwork.freedesktop.org/series/58370/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5789 -> Patchwork_12553
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_12553 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12553, 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/58370/revisions/1/mbox/

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_exec_suspend@basic-s3:
- fi-apl-guc: PASS -> DMESG-WARN

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

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@query-info:
- fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] +55

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

* igt@amdgpu/amd_cs_nop@sync-fork-compute0:
- fi-icl-u3: NOTRUN -> SKIP [fdo#109315] +17

* igt@gem_exec_basic@gtt-bsd1:
- fi-icl-u3: NOTRUN -> SKIP [fdo#109276] +7

* igt@gem_exec_parse@basic-rejected:
- fi-icl-u3: NOTRUN -> SKIP [fdo#109289] +1

* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-7500u: PASS -> DMESG-WARN [fdo#105128] / [fdo#107139]

* igt@i915_module_load@reload:
- fi-blb-e6850: NOTRUN -> INCOMPLETE [fdo#107718]

* igt@i915_selftest@live_contexts:
- fi-icl-u3: NOTRUN -> DMESG-FAIL [fdo#108569]

* igt@kms_busy@basic-flip-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_chamelium@hdmi-edid-read:
- fi-icl-u3: NOTRUN -> SKIP [fdo#109284] +8

* igt@kms_force_connector_basic@prune-stale-modes:
- fi-icl-u3: NOTRUN -> SKIP [fdo#109285] +3

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

* igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +29

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-hsw-4770: SKIP [fdo#109271] -> PASS +2

* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS

* igt@i915_selftest@live_uncore:
- fi-ivb-3770: DMESG-FAIL [fdo#110210] -> PASS

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

[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105128]: https://bugs.freedesktop.org/show_bug.cgi?id=105128
[fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[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#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
[fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210

Participating hosts (41 -> 36)
------------------------------

Additional (2): fi-bsw-kefka fi-icl-u3
Missing (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-snb-2520m fi-ctg-p8600 fi-bdw-samus

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

* Linux: CI_DRM_5789 -> Patchwork_12553

CI_DRM_5789: 93b3614e8c493860dc63c3028460efb02036c6ea @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4896: 0f9c061247fb7aba21c9459f19f437927a28f32c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12553: 9329cf8f654ff9f48be803fbb5156435056c0212 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

9329cf8f654f drm/i915/guc: GuC suspend path cleanup

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12553/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

Re: ✗ Fi.CI.BAT: failure for drm/i915/guc: GuC suspend path cleanup

Quoting Patchwork (2019-03-21 19:26:27)

Quoted 28 lines

== Series Details ==

Series: drm/i915/guc: GuC suspend path cleanup
URL : https://patchwork.freedesktop.org/series/58370/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5789 -> Patchwork_12553
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_12553 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12553, 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/58370/revisions/1/mbox/

Possible new issues
-------------------

Quoted 8 lines

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_exec_suspend@basic-s3:
- fi-apl-guc: PASS -> DMESG-WARN

That says we turned the guc off before completing the idle sequence, so the intel_uc_suspend() has to be after the flush_workqueues. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#6 lore raw

Re: ✗ Fi.CI.BAT: failure for drm/i915/guc: GuC suspend path cleanup

Quoted 33 lines · Chris Wilson

Quoting Patchwork (2019-03-21 19:26:27)

Quoted 32 lines

== Series Details ==

Series: drm/i915/guc: GuC suspend path cleanup
URL : https://patchwork.freedesktop.org/series/58370/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5789 -> Patchwork_12553
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_12553 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12553, 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/58370/revisions/1/mbox/

Possible new issues
-------------------

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

### IGT changes ###

Quoted 7 lines
Quoted 4 lines

#### Possible regressions ####

* igt@gem_exec_suspend@basic-s3:
- fi-apl-guc: PASS -> DMESG-WARN

That says we turned the guc off before completing the idle sequence, so the intel_uc_suspend() has to be after the flush_workqueues. -Chris

But shouldn't this be taken care of by the switch_to_kernel_context_sync ?

And would be better have uc_suspend after drain_delayed_work instead of

just after flush_workqueue ?

-Sujaritha

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

Re: ✗ Fi.CI.BAT: failure for drm/i915/guc: GuC suspend path cleanup

Quoting Sujaritha (2019-03-21 19:41:17)

Quoted 37 lines · Chris Wilson
Quoted 35 lines

Quoting Patchwork (2019-03-21 19:26:27)

Quoted 34 lines

== Series Details ==

Series: drm/i915/guc: GuC suspend path cleanup
URL : https://patchwork.freedesktop.org/series/58370/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5789 -> Patchwork_12553
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_12553 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12553, 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/58370/revisions/1/mbox/

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

* igt@gem_exec_suspend@basic-s3:
- fi-apl-guc: PASS -> DMESG-WARN

That says we turned the guc off before completing the idle sequence, so the intel_uc_suspend() has to be after the flush_workqueues. -Chris

But shouldn't this be taken care of by the switch_to_kernel_context_sync ?

Hmm, no, we can't flush the retire worker there (because of struct_mutex). But it should be taken care! Something to work on :)

Quoted 3 lines

And would be better have uc_suspend after drain_delayed_work instead of

just after flush_workqueue ?

Basically right at the end; you don't need struct_mutex right? And the assert that the gt is !awake fits in with the intent to switch guc off. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#8 lore raw

Re: ✗ Fi.CI.BAT: failure for drm/i915/guc: GuC suspend path cleanup

Quoted 47 lines · Chris Wilson

Quoting Sujaritha (2019-03-21 19:41:17)

Quoted 36 lines · Chris Wilson
Quoted 35 lines

Quoting Patchwork (2019-03-21 19:26:27)

Quoted 34 lines

== Series Details ==

Series: drm/i915/guc: GuC suspend path cleanup
URL : https://patchwork.freedesktop.org/series/58370/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5789 -> Patchwork_12553
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_12553 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12553, 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/58370/revisions/1/mbox/

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

* igt@gem_exec_suspend@basic-s3:
- fi-apl-guc: PASS -> DMESG-WARN

That says we turned the guc off before completing the idle sequence, so the intel_uc_suspend() has to be after the flush_workqueues. -Chris

But shouldn't this be taken care of by the switch_to_kernel_context_sync ?

Hmm, no, we can't flush the retire worker there (because of struct_mutex). But it should be taken care! Something to work on :)

Quoted 6 lines
Quoted 3 lines

And would be better have uc_suspend after drain_delayed_work instead of

just after flush_workqueue ?

Basically right at the end; you don't need struct_mutex right? And the assert that the gt is !awake fits in with the intent to switch guc off. -Chris

Yes at the end, before the GEM_BUG_ON. The struct_mutex is not required.

-Sujaritha

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw

Re: ✗ Fi.CI.BAT: failure for drm/i915/guc: GuC suspend path cleanup

Quoting Sujaritha (2019-03-21 20:02:36)

Quoted 51 lines · Chris Wilson
Quoted 49 lines

Quoting Sujaritha (2019-03-21 19:41:17)

Quoted 36 lines · Chris Wilson
Quoted 35 lines

Quoting Patchwork (2019-03-21 19:26:27)

Quoted 34 lines

== Series Details ==

Series: drm/i915/guc: GuC suspend path cleanup
URL : https://patchwork.freedesktop.org/series/58370/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5789 -> Patchwork_12553
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_12553 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12553, 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/58370/revisions/1/mbox/

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

* igt@gem_exec_suspend@basic-s3:
- fi-apl-guc: PASS -> DMESG-WARN

That says we turned the guc off before completing the idle sequence, so the intel_uc_suspend() has to be after the flush_workqueues. -Chris

But shouldn't this be taken care of by the switch_to_kernel_context_sync ?

Hmm, no, we can't flush the retire worker there (because of struct_mutex). But it should be taken care! Something to work on :)

Quoted 2 lines

And would be better have uc_suspend after drain_delayed_work instead of

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

just after flush_workqueue ?

Basically right at the end; you don't need struct_mutex right? And the assert that the gt is !awake fits in with the intent to switch guc off. -Chris

Yes at the end, before the GEM_BUG_ON. The struct_mutex is not required.

I'd go just after. The assert is that GEM is idle, so ready to suspend the FW. Worksforme.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#10 lore raw

Re: ✗ Fi.CI.BAT: failure for drm/i915/guc: GuC suspend path cleanup

Quoted 51 lines · Chris Wilson

Quoting Sujaritha (2019-03-21 20:02:36)

Quoted 50 lines · Chris Wilson
Quoted 49 lines

Quoting Sujaritha (2019-03-21 19:41:17)

Quoted 34 lines · Chris Wilson
Quoted 33 lines

Quoting Patchwork (2019-03-21 19:26:27)

Quoted 32 lines

== Series Details ==

Series: drm/i915/guc: GuC suspend path cleanup
URL : https://patchwork.freedesktop.org/series/58370/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5789 -> Patchwork_12553
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_12553 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12553, 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/58370/revisions/1/mbox/

Possible new issues
-------------------

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

### IGT changes ###

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

#### Possible regressions ####

* igt@gem_exec_suspend@basic-s3:
- fi-apl-guc: PASS -> DMESG-WARN

That says we turned the guc off before completing the idle sequence, so the intel_uc_suspend() has to be after the flush_workqueues. -Chris

But shouldn't this be taken care of by the switch_to_kernel_context_sync ?

Hmm, no, we can't flush the retire worker there (because of struct_mutex). But it should be taken care! Something to work on :)

Quoted 3 lines

And would be better have uc_suspend after drain_delayed_work instead of

just after flush_workqueue ?

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Basically right at the end; you don't need struct_mutex right? And the assert that the gt is !awake fits in with the intent to switch guc off. -Chris

Yes at the end, before the GEM_BUG_ON. The struct_mutex is not required.

I'd go just after. The assert is that GEM is idle, so ready to suspend the FW. Worksforme.
-Chris

Okay sure, I will add it just after the BUG_ON.

-Sujaritha

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#11 lore raw

PATCH v2 1/1 drm/i915/guc: GuC suspend path cleanup

In reply to Sujaritha Sundaresan

Adding a call to intel_uc_suspend in i915_gem_suspend, which is a common point for the suspend/resume and hibernate paths. This fixes an unbalanced call that causes issues with the CTB register/deregister.

v2: Making the call unconditional (Daniele)
Moving the call to after the GEM_BUG_ON (Chris)

Cc Daniele Ceraolo Spurio <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Michal Wajdeczko <[email protected]>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_gem.c +2 -0
index 1a684b7e8c09..8e8b79711a31 100644
@@ -4388,6 +4388,8 @@ void i915_gem_suspend(struct drm_i915_private *i915)
 	 */
 	GEM_BUG_ON(i915->gt.awake);
 
+	intel_uc_suspend(i915);
+
 	intel_runtime_pm_put(i915, wakeref);
 }
 
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v2 1/1
#12 lore raw

Quoting Sujaritha Sundaresan (2019-03-21 20:38:04)

Quoted 5 lines

Adding a call to intel_uc_suspend in i915_gem_suspend, which is a common point for the suspend/resume and hibernate paths. This fixes an unbalanced call that causes issues with the CTB register/deregister.

Quoted 7 lines

v2: Making the call unconditional (Daniele)
Moving the call to after the GEM_BUG_ON (Chris)

Cc Daniele Ceraolo Spurio <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Michal Wajdeczko <[email protected]>

So I removed this when forcing a reset; then made the forced reset conditional...

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#13 lore raw

Quoting Chris Wilson (2019-03-22 08:57:35)

Quoted 9 lines

Quoting Sujaritha Sundaresan (2019-03-21 20:38:04)

Quoted 8 lines

Adding a call to intel_uc_suspend in i915_gem_suspend, which is a common point for the suspend/resume and hibernate paths. This fixes an unbalanced call that causes issues with the CTB register/deregister.

v2: Making the call unconditional (Daniele)
Moving the call to after the GEM_BUG_ON (Chris)

Quoted 8 lines
Quoted 4 lines
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Michal Wajdeczko <[email protected]>

So I removed this when forcing a reset; then made the forced reset conditional...

And pushed, thanks for the fixup.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#14 lore raw

✓ Fi.CI.BAT: success for drm/i915/guc: GuC suspend path cleanup (rev2)

In reply to Sujaritha Sundaresan
== Series Details ==

== Series Details ==

Series: drm/i915/guc: GuC suspend path cleanup (rev2)
URL : https://patchwork.freedesktop.org/series/58370/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5791 -> Patchwork_12558
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/58370/revisions/2/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_basic@basic-bsd2:
- fi-kbl-7500u: NOTRUN -> SKIP [fdo#109271] +9

* igt@gem_exec_basic@readonly-bsd1:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] +57

* igt@kms_busy@basic-flip-c:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: NOTRUN -> DMESG-WARN [fdo#103841]

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: PASS -> FAIL [fdo#103167]

* igt@kms_psr@primary_mmap_gtt:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +27

* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: PASS -> FAIL [fdo#103182] +1

* igt@runner@aborted:
- fi-kbl-7500u: NOTRUN -> FAIL [fdo#103841]

#### Possible fixes ####

* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS

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

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720

Participating hosts (44 -> 37)
------------------------------

Additional (2): fi-snb-2520m fi-kbl-7500u
Missing (9): fi-kbl-soraka fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus

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

* Linux: CI_DRM_5791 -> Patchwork_12558

CI_DRM_5791: 3b6d09692ea282a3487bdf972a068d312a67ca00 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4897: e12d69496a6bef09ac6c0f792b8d60a65cf5e0bf @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12558: 6dccc388d47a7e5cd250ec8ac469c11312906502 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

6dccc388d47a drm/i915/guc: GuC suspend path cleanup

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12558/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#15 lore raw

✓ Fi.CI.IGT: success for drm/i915/guc: GuC suspend path cleanup (rev2)

In reply to Sujaritha Sundaresan
== Series Details ==

== Series Details ==

Series: drm/i915/guc: GuC suspend path cleanup (rev2)
URL : https://patchwork.freedesktop.org/series/58370/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5791_full -> Patchwork_12558_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@preempt-contexts-bsd2:
- shard-iclb: NOTRUN -> SKIP [fdo#109276] +1

* igt@gem_ppgtt@blt-vs-render-ctxn:
- shard-iclb: PASS -> INCOMPLETE [fdo#109801]

* igt@gem_pwrite@big-cpu-fbr:
- shard-skl: NOTRUN -> SKIP [fdo#109271] +117

* igt@gem_pwrite@stolen-normal:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +21

* igt@gem_stolen@stolen-pwrite:
- shard-iclb: NOTRUN -> SKIP [fdo#109277]

* igt@gem_tiled_fence_blits@normal:
- shard-iclb: PASS -> TIMEOUT [fdo#109673]

* igt@i915_pm_rpm@drm-resources-equal:
- shard-skl: PASS -> INCOMPLETE [fdo#107807]

* igt@i915_selftest@live_workarounds:
- shard-iclb: PASS -> DMESG-FAIL [fdo#108954]

* igt@i915_suspend@sysfs-reader:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]

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

* igt@kms_busy@extended-modeset-hang-newfb-render-c:
- shard-apl: NOTRUN -> DMESG-WARN [fdo#110222]

* igt@kms_busy@extended-modeset-hang-oldfb-render-d:
- shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +12

* igt@kms_busy@extended-modeset-hang-oldfb-render-f:
- shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

* igt@kms_busy@extended-pageflip-hang-newfb-render-c:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +6

* igt@kms_chamelium@hdmi-hpd-storm:
- shard-iclb: NOTRUN -> SKIP [fdo#109284]

* igt@kms_cursor_legacy@cursor-vs-flip-toggle:
- shard-iclb: PASS -> FAIL [fdo#103355]

* igt@kms_cursor_legacy@cursora-vs-flipb-varying-size:
- shard-iclb: NOTRUN -> SKIP [fdo#109274] +1

* igt@kms_fbcon_fbt@fbc:
- shard-iclb: PASS -> DMESG-WARN [fdo#109593]

* igt@kms_flip@flip-vs-suspend:
- shard-skl: NOTRUN -> INCOMPLETE [fdo#109507]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- shard-iclb: PASS -> FAIL [fdo#103167] +6

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-pwrite:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +36

* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +28

* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-spr-indfb-draw-blt:
- shard-iclb: NOTRUN -> SKIP [fdo#109280] +1

* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite:
- shard-iclb: PASS -> FAIL [fdo#105682] / [fdo#109247] +2

* igt@kms_frontbuffer_tracking@fbcpsr-stridechange:
- shard-skl: NOTRUN -> FAIL [fdo#105683]

* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-wc:
- shard-iclb: PASS -> FAIL [fdo#109247] +21

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

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-kbl: NOTRUN -> FAIL [fdo#108145]

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

* igt@kms_plane_scaling@pipe-a-scaler-with-rotation:
- shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] +1

* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: PASS -> SKIP [fdo#109441] +2

* igt@kms_psr@sprite_mmap_gtt:
- shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +5

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

* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: PASS -> DMESG-FAIL [fdo#105763]

* igt@kms_universal_plane@universal-plane-gen9-features-pipe-d:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@perf@unprivileged-single-ctx-counters:
- shard-iclb: NOTRUN -> SKIP [fdo#109289]

* igt@runner@aborted:
- shard-iclb: NOTRUN -> FAIL [fdo#109593]

#### Possible fixes ####

* igt@gem_mmap_gtt@hang:
- shard-iclb: FAIL [fdo#109677] -> PASS

* igt@gem_tiled_pread_pwrite:
- shard-iclb: TIMEOUT [fdo#109673] -> PASS

* igt@gem_tiled_swapping@non-threaded:
- shard-iclb: DMESG-WARN [fdo#108686] -> PASS

* igt@i915_pm_rpm@i2c:
- shard-iclb: DMESG-WARN [fdo#109982] -> PASS

* igt@i915_pm_rpm@reg-read-ioctl:
- shard-skl: INCOMPLETE [fdo#107807] -> PASS

* igt@i915_suspend@fence-restore-untiled:
- shard-apl: DMESG-WARN [fdo#108566] -> PASS +1

* igt@kms_atomic_transition@1x-modeset-transitions:
- shard-iclb: INCOMPLETE -> PASS

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: FAIL [fdo#103167] -> PASS +6

* igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt:
- shard-iclb: FAIL [fdo#109247] -> PASS +15

* igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
- shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS

* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-iclb: SKIP [fdo#109441] -> PASS +2

* igt@kms_psr@sprite_mmap_cpu:
- shard-iclb: FAIL [fdo#107383] / [fdo#110215] -> PASS +1

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

* igt@kms_vblank@pipe-a-ts-continuation-modeset-rpm:
- shard-apl: FAIL [fdo#104894] -> PASS

#### Warnings ####

* igt@i915_selftest@live_contexts:
- shard-iclb: DMESG-FAIL [fdo#108569] -> INCOMPLETE [fdo#108569]

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: FAIL [fdo#109016] -> DMESG-FAIL [fdo#105763] / [fdo#108950]

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

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
[fdo#105683]: https://bugs.freedesktop.org/show_bug.cgi?id=105683
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
[fdo#108954]: https://bugs.freedesktop.org/show_bug.cgi?id=108954
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109247]: https://bugs.freedesktop.org/show_bug.cgi?id=109247
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109277]: https://bugs.freedesktop.org/show_bug.cgi?id=109277
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#109593]: https://bugs.freedesktop.org/show_bug.cgi?id=109593
[fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
[fdo#109677]: https://bugs.freedesktop.org/show_bug.cgi?id=109677
[fdo#109801]: https://bugs.freedesktop.org/show_bug.cgi?id=109801
[fdo#109982]: https://bugs.freedesktop.org/show_bug.cgi?id=109982
[fdo#110215]: https://bugs.freedesktop.org/show_bug.cgi?id=110215
[fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (10 -> 9)
------------------------------

Missing (1): shard-hsw

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

* Linux: CI_DRM_5791 -> Patchwork_12558

CI_DRM_5791: 3b6d09692ea282a3487bdf972a068d312a67ca00 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4897: e12d69496a6bef09ac6c0f792b8d60a65cf5e0bf @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12558: 6dccc388d47a7e5cd250ec8ac469c11312906502 @ 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_12558/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx