* [PATCH] drm/i915: Always retire residual requests before suspend
@ 2018-07-17 8:41 Chris Wilson
2018-07-17 11:32 ` ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2018-07-17 8:41 UTC (permalink / raw
To: intel-gfx
If the driver is wedged, we skip idling the GPU. However, we may still
have a few requests still not retired following the wedging (since they
will be waiting for a background worker trying to acquire struct_mutex).
As we hold the struct_mutex, always do a quick request retirement in
order to flush the wedged path.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107257
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 42d24410a98c..cc875e1dc7f6 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5074,6 +5074,8 @@ int i915_gem_suspend(struct drm_i915_private *i915)
assert_kernel_context_is_current(i915);
}
+ i915_retire_requests(i915); /* ensure we flush after wedging */
+
mutex_unlock(&i915->drm.struct_mutex);
intel_uc_suspend(i915);
--
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] 6+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Always retire residual requests before suspend
2018-07-17 8:41 [PATCH] drm/i915: Always retire residual requests before suspend Chris Wilson
@ 2018-07-17 11:32 ` Patchwork
2018-07-17 13:28 ` ✓ Fi.CI.IGT: " Patchwork
2018-07-18 12:53 ` [PATCH] " Tvrtko Ursulin
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-07-17 11:32 UTC (permalink / raw
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Always retire residual requests before suspend
URL : https://patchwork.freedesktop.org/series/46670/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4501 -> Patchwork_9684 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/46670/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9684:
=== IGT changes ===
==== Possible regressions ====
igt@drv_selftest@live_workarounds:
{fi-cfl-8109u}: NOTRUN -> DMESG-FAIL
== Known issues ==
Here are the changes found in Patchwork_9684 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_hangcheck:
fi-skl-guc: PASS -> DMESG-FAIL (fdo#107174)
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
fi-skl-guc: PASS -> FAIL (fdo#103191)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: DMESG-WARN (fdo#105128, fdo#107139) -> PASS
igt@kms_busy@basic-flip-b:
fi-skl-6700hq: DMESG-WARN (fdo#105998) -> PASS +1
igt@prime_vgem@basic-fence-flip:
fi-ilk-650: FAIL (fdo#104008) -> 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#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
== Participating hosts (46 -> 42) ==
Additional (1): fi-cfl-8109u
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4501 -> Patchwork_9684
CI_DRM_4501: 692d13f7b75baf0bb8c58b9784569c52d68f01e2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4559: 6d341aac2124836443ce74e8e97a4508ac8d5095 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9684: 6c77cc2ad9028069f1fbe3a5d897a3ed2e6bcc58 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
6c77cc2ad902 drm/i915: Always retire residual requests before suspend
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9684/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915: Always retire residual requests before suspend
2018-07-17 8:41 [PATCH] drm/i915: Always retire residual requests before suspend Chris Wilson
2018-07-17 11:32 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-07-17 13:28 ` Patchwork
2018-07-18 12:53 ` [PATCH] " Tvrtko Ursulin
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-07-17 13:28 UTC (permalink / raw
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Always retire residual requests before suspend
URL : https://patchwork.freedesktop.org/series/46670/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4501_full -> Patchwork_9684_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9684_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_9684_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9684_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-blt:
shard-kbl: PASS -> SKIP
igt@gem_exec_schedule@deep-bsd1:
shard-kbl: SKIP -> PASS +1
== Known issues ==
Here are the changes found in Patchwork_9684_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: PASS -> FAIL (fdo#105363)
igt@kms_flip@plain-flip-fb-recreate-interruptible:
shard-glk: PASS -> FAIL (fdo#100368) +2
==== Possible fixes ====
igt@kms_flip@plain-flip-fb-recreate:
shard-glk: FAIL (fdo#100368) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS
shard-kbl: FAIL (fdo#99912) -> PASS
igt@perf_pmu@rc6-runtime-pm-long:
shard-hsw: FAIL (fdo#105010) -> PASS
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#105010 https://bugs.freedesktop.org/show_bug.cgi?id=105010
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4501 -> Patchwork_9684
CI_DRM_4501: 692d13f7b75baf0bb8c58b9784569c52d68f01e2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4559: 6d341aac2124836443ce74e8e97a4508ac8d5095 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9684: 6c77cc2ad9028069f1fbe3a5d897a3ed2e6bcc58 @ 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_9684/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: Always retire residual requests before suspend
2018-07-17 8:41 [PATCH] drm/i915: Always retire residual requests before suspend Chris Wilson
2018-07-17 11:32 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-07-17 13:28 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-07-18 12:53 ` Tvrtko Ursulin
2018-07-18 13:25 ` Chris Wilson
2 siblings, 1 reply; 6+ messages in thread
From: Tvrtko Ursulin @ 2018-07-18 12:53 UTC (permalink / raw
To: Chris Wilson, intel-gfx
On 17/07/2018 09:41, Chris Wilson wrote:
> If the driver is wedged, we skip idling the GPU. However, we may still
> have a few requests still not retired following the wedging (since they
> will be waiting for a background worker trying to acquire struct_mutex).
> As we hold the struct_mutex, always do a quick request retirement in
> order to flush the wedged path.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107257
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 42d24410a98c..cc875e1dc7f6 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -5074,6 +5074,8 @@ int i915_gem_suspend(struct drm_i915_private *i915)
>
> assert_kernel_context_is_current(i915);
> }
> + i915_retire_requests(i915); /* ensure we flush after wedging */
> +
We cannot do this in i915_gem_set_wedged due not having the mutex?
I think it should go in an else block of the !terminally_wedged block to
signify the alternative idling method for that case. And also to make
sure the !terminally_wedged case does not start relying on this extra
retire pass.
Or alternative teach i915_gem_wait_for_idle how to handle the wedged
case and only make switching to kernel context dependant on
terminally_wedged status in i915_gem_suspend?
Simple else block sounds good enough to me. For that option:
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
> mutex_unlock(&i915->drm.struct_mutex);
>
> intel_uc_suspend(i915);
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: Always retire residual requests before suspend
2018-07-18 12:53 ` [PATCH] " Tvrtko Ursulin
@ 2018-07-18 13:25 ` Chris Wilson
2018-07-18 14:57 ` Tvrtko Ursulin
0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2018-07-18 13:25 UTC (permalink / raw
To: Tvrtko Ursulin, intel-gfx
Quoting Tvrtko Ursulin (2018-07-18 13:53:16)
>
> On 17/07/2018 09:41, Chris Wilson wrote:
> > If the driver is wedged, we skip idling the GPU. However, we may still
> > have a few requests still not retired following the wedging (since they
> > will be waiting for a background worker trying to acquire struct_mutex).
> > As we hold the struct_mutex, always do a quick request retirement in
> > order to flush the wedged path.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107257
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> > drivers/gpu/drm/i915/i915_gem.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index 42d24410a98c..cc875e1dc7f6 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -5074,6 +5074,8 @@ int i915_gem_suspend(struct drm_i915_private *i915)
> >
> > assert_kernel_context_is_current(i915);
> > }
> > + i915_retire_requests(i915); /* ensure we flush after wedging */
> > +
>
> We cannot do this in i915_gem_set_wedged due not having the mutex?
Correct.
> I think it should go in an else block of the !terminally_wedged block to
> signify the alternative idling method for that case. And also to make
> sure the !terminally_wedged case does not start relying on this extra
> retire pass.
I liked the safety net and clarity of not making it conditional.
> Or alternative teach i915_gem_wait_for_idle how to handle the wedged
> case and only make switching to kernel context dependant on
> terminally_wedged status in i915_gem_suspend?
Right, it's the checks that actually worry here. Those depend on the gpu
being in a fairly sane state...
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: Always retire residual requests before suspend
2018-07-18 13:25 ` Chris Wilson
@ 2018-07-18 14:57 ` Tvrtko Ursulin
0 siblings, 0 replies; 6+ messages in thread
From: Tvrtko Ursulin @ 2018-07-18 14:57 UTC (permalink / raw
To: Chris Wilson, intel-gfx
On 18/07/2018 14:25, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-07-18 13:53:16)
>>
>> On 17/07/2018 09:41, Chris Wilson wrote:
>>> If the driver is wedged, we skip idling the GPU. However, we may still
>>> have a few requests still not retired following the wedging (since they
>>> will be waiting for a background worker trying to acquire struct_mutex).
>>> As we hold the struct_mutex, always do a quick request retirement in
>>> order to flush the wedged path.
>>>
>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107257
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> ---
>>> drivers/gpu/drm/i915/i915_gem.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
>>> index 42d24410a98c..cc875e1dc7f6 100644
>>> --- a/drivers/gpu/drm/i915/i915_gem.c
>>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>>> @@ -5074,6 +5074,8 @@ int i915_gem_suspend(struct drm_i915_private *i915)
>>>
>>> assert_kernel_context_is_current(i915);
>>> }
>>> + i915_retire_requests(i915); /* ensure we flush after wedging */
>>> +
>>
>> We cannot do this in i915_gem_set_wedged due not having the mutex?
>
> Correct.
>
>> I think it should go in an else block of the !terminally_wedged block to
>> signify the alternative idling method for that case. And also to make
>> sure the !terminally_wedged case does not start relying on this extra
>> retire pass.
>
> I liked the safety net and clarity of not making it conditional.
And I disliked the sweeping under the carpet potential of it. :)
>> Or alternative teach i915_gem_wait_for_idle how to handle the wedged
>> case and only make switching to kernel context dependant on
>> terminally_wedged status in i915_gem_suspend?
>
> Right, it's the checks that actually worry here. Those depend on the gpu
> being in a fairly sane state...
What checks? i915_terminally_wedged cannot be. Request retirement itself?
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-07-18 14:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-17 8:41 [PATCH] drm/i915: Always retire residual requests before suspend Chris Wilson
2018-07-17 11:32 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-07-17 13:28 ` ✓ Fi.CI.IGT: " Patchwork
2018-07-18 12:53 ` [PATCH] " Tvrtko Ursulin
2018-07-18 13:25 ` Chris Wilson
2018-07-18 14:57 ` Tvrtko Ursulin
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.