* [PATCH 1/2] drm/i915: Bump timeout for wait_for_engines()
@ 2017-12-11 19:41 Chris Wilson
2017-12-11 19:41 ` [PATCH 2/2] drm/i915: Dump the engine state before declaring wedged from wait_for_engines() Chris Wilson
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Chris Wilson @ 2017-12-11 19:41 UTC (permalink / raw)
To: intel-gfx
Extract the timeout we use in i915_gem_idle_work_handler() and reuse it
for wait_for_engines() in i915_gem_wait_for_idle(). It too has the same
problem in sometimes having to wait for an extended period before the HW
settles, so make use of the same timeout.
References: 5427f207852d ("drm/i915: Bump wait-times for the final CS interrupt before parking")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 2 ++
drivers/gpu/drm/i915/i915_gem.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index d57859cfad8e..45640bb7bfce 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1589,6 +1589,8 @@ struct drm_i915_error_state_buf {
loff_t pos;
};
+#define I915_IDLE_ENGINES_TIMEOUT (200) /* in ms */
+
#define I915_RESET_TIMEOUT (10 * HZ) /* 10s */
#define I915_FENCE_TIMEOUT (10 * HZ) /* 10s */
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0179fdcaef11..694f0551a66e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3333,7 +3333,7 @@ i915_gem_idle_work_handler(struct work_struct *work)
* Wait for last execlists context complete, but bail out in case a
* new request is submitted.
*/
- end = ktime_add_ms(ktime_get(), 200);
+ end = ktime_add_ms(ktime_get(), I915_IDLE_ENGINES_TIMEOUT);
do {
if (new_requests_since_last_retire(dev_priv))
return;
@@ -3533,7 +3533,7 @@ static int wait_for_timeline(struct i915_gem_timeline *tl, unsigned int flags)
static int wait_for_engines(struct drm_i915_private *i915)
{
- if (wait_for(intel_engines_are_idle(i915), 50)) {
+ if (wait_for(intel_engines_are_idle(i915), I915_IDLE_ENGINES_TIMEOUT)) {
DRM_ERROR("Failed to idle engines, declaring wedged!\n");
i915_gem_set_wedged(i915);
return -EIO;
--
2.15.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/2] drm/i915: Dump the engine state before declaring wedged from wait_for_engines()
2017-12-11 19:41 [PATCH 1/2] drm/i915: Bump timeout for wait_for_engines() Chris Wilson
@ 2017-12-11 19:41 ` Chris Wilson
2017-12-12 13:40 ` Joonas Lahtinen
2017-12-12 5:21 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump timeout for wait_for_engines() Patchwork
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2017-12-11 19:41 UTC (permalink / raw)
To: intel-gfx
If wait_for_engines() fails and we resort to declaring the HW wedged,
dump the engine state for debugging.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 694f0551a66e..9e957b213fdb 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3534,7 +3534,18 @@ static int wait_for_timeline(struct i915_gem_timeline *tl, unsigned int flags)
static int wait_for_engines(struct drm_i915_private *i915)
{
if (wait_for(intel_engines_are_idle(i915), I915_IDLE_ENGINES_TIMEOUT)) {
- DRM_ERROR("Failed to idle engines, declaring wedged!\n");
+ dev_err(i915->drm.dev,
+ "Failed to idle engines, declaring wedged!\n");
+ if (drm_debug & DRM_UT_DRIVER) {
+ struct drm_printer p = drm_debug_printer(__func__);
+ struct intel_engine_cs *engine;
+ enum intel_engine_id id;
+
+ for_each_engine(engine, i915, id)
+ intel_engine_dump(engine, &p,
+ "%s", engine->name);
+ }
+
i915_gem_set_wedged(i915);
return -EIO;
}
--
2.15.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 2/2] drm/i915: Dump the engine state before declaring wedged from wait_for_engines()
2017-12-11 19:41 ` [PATCH 2/2] drm/i915: Dump the engine state before declaring wedged from wait_for_engines() Chris Wilson
@ 2017-12-12 13:40 ` Joonas Lahtinen
2017-12-12 21:40 ` Chris Wilson
0 siblings, 1 reply; 7+ messages in thread
From: Joonas Lahtinen @ 2017-12-12 13:40 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Mon, 2017-12-11 at 19:41 +0000, Chris Wilson wrote:
> If wait_for_engines() fails and we resort to declaring the HW wedged,
> dump the engine state for debugging.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] drm/i915: Dump the engine state before declaring wedged from wait_for_engines()
2017-12-12 13:40 ` Joonas Lahtinen
@ 2017-12-12 21:40 ` Chris Wilson
0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-12-12 21:40 UTC (permalink / raw)
To: Joonas Lahtinen, intel-gfx
Quoting Joonas Lahtinen (2017-12-12 13:40:25)
> On Mon, 2017-12-11 at 19:41 +0000, Chris Wilson wrote:
> > If wait_for_engines() fails and we resort to declaring the HW wedged,
> > dump the engine state for debugging.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Ta for the review. I've worked through to the immediate cause of the
problem, so if you would like to review
drm/i915: Don't check #active_requests from i915_gem_wait_for_idle()
drm/i915: Mark up potential allocation paths within i915_sw_fence as might_sleep
drm/i915: Allow fence allocations to fail
drm/i915: Ratelimit request allocation under oom
and
igt/gem_shrink: Exercise allocations in the middle of execbuf under oom-pressure
next, that would be grand. A fine piece of cheese, Gromit.
I'm still puzzling how such a simple piece of code managed to get into
so much trouble in the first place. I suppose it was able to fill 3
rings with a few 10k requests each, which is definitely more than enough
to run into oom on that machine. Ok, not such a mystery after all.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump timeout for wait_for_engines()
2017-12-11 19:41 [PATCH 1/2] drm/i915: Bump timeout for wait_for_engines() Chris Wilson
2017-12-11 19:41 ` [PATCH 2/2] drm/i915: Dump the engine state before declaring wedged from wait_for_engines() Chris Wilson
@ 2017-12-12 5:21 ` Patchwork
2017-12-12 6:25 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-12-12 13:39 ` [PATCH 1/2] " Joonas Lahtinen
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-12-12 5:21 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915: Bump timeout for wait_for_engines()
URL : https://patchwork.freedesktop.org/series/35189/
State : success
== Summary ==
Series 35189v1 series starting with [1/2] drm/i915: Bump timeout for wait_for_engines()
https://patchwork.freedesktop.org/api/1.0/series/35189/revisions/1/mbox/
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:439s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:443s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:383s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:522s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:280s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:501s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:508s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:490s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:481s
fi-elk-e7500 total:224 pass:163 dwarn:15 dfail:0 fail:0 skip:45
fi-gdg-551 total:288 pass:178 dwarn:1 dfail:0 fail:1 skip:108 time:270s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:542s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:358s
fi-hsw-4770r total:288 pass:224 dwarn:0 dfail:0 fail:0 skip:64 time:259s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:392s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:478s
fi-ivb-3770 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:447s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:495s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:522s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:471s
fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:532s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:592s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:455s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:543s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:567s
fi-skl-6700k total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:518s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:502s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:441s
fi-snb-2520m total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:549s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:421s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:597s
fi-cnl-y total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:639s
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:495s
39419b521a0f0e947977cd98a0662fb4316a6509 drm-tip: 2017y-12m-11d-17h-25m-05s UTC integration manifest
4f573cc29485 drm/i915: Dump the engine state before declaring wedged from wait_for_engines()
d088f37e866f drm/i915: Bump timeout for wait_for_engines()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7469/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread* ✗ Fi.CI.IGT: failure for series starting with [1/2] drm/i915: Bump timeout for wait_for_engines()
2017-12-11 19:41 [PATCH 1/2] drm/i915: Bump timeout for wait_for_engines() Chris Wilson
2017-12-11 19:41 ` [PATCH 2/2] drm/i915: Dump the engine state before declaring wedged from wait_for_engines() Chris Wilson
2017-12-12 5:21 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump timeout for wait_for_engines() Patchwork
@ 2017-12-12 6:25 ` Patchwork
2017-12-12 13:39 ` [PATCH 1/2] " Joonas Lahtinen
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-12-12 6:25 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915: Bump timeout for wait_for_engines()
URL : https://patchwork.freedesktop.org/series/35189/
State : failure
== Summary ==
Test pm_rc6_residency:
Subgroup rc6-accuracy:
pass -> SKIP (shard-snb)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
skip -> PASS (shard-hsw) fdo#103375 +1
Test kms_flip:
Subgroup vblank-vs-dpms-suspend-interruptible:
pass -> SKIP (shard-hsw) fdo#103706 +1
Subgroup vblank-vs-modeset-suspend:
pass -> INCOMPLETE (shard-hsw)
Subgroup wf_vblank-vs-modeset-interruptible:
dmesg-warn -> PASS (shard-hsw) fdo#102614
Test perf:
Subgroup blocking:
pass -> FAIL (shard-hsw) fdo#102252
Test gem_tiled_swapping:
Subgroup non-threaded:
pass -> DMESG-WARN (shard-hsw) fdo#104009
Test gem_eio:
Subgroup in-flight-suspend:
pass -> SKIP (shard-snb)
Test kms_plane:
Subgroup plane-panning-bottom-right-suspend-pipe-a-planes:
pass -> INCOMPLETE (shard-hsw) fdo#103540
Test kms_atomic:
Subgroup crtc_invalid_params_fence:
pass -> SKIP (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-rgb565-draw-mmap-gtt:
pass -> SKIP (shard-hsw) fdo#103167
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-legacy:
pass -> SKIP (shard-hsw) fdo#102670
Test kms_plane_lowres:
Subgroup pipe-a-tiling-x:
pass -> SKIP (shard-hsw) fdo#103181
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103706 https://bugs.freedesktop.org/show_bug.cgi?id=103706
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#104009 https://bugs.freedesktop.org/show_bug.cgi?id=104009
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#103181 https://bugs.freedesktop.org/show_bug.cgi?id=103181
shard-hsw total:2473 pass:1408 dwarn:2 dfail:0 fail:10 skip:1049 time:8209s
shard-snb total:2692 pass:1307 dwarn:1 dfail:1 fail:11 skip:1372 time:8102s
Blacklisted hosts:
shard-apl total:2670 pass:1663 dwarn:1 dfail:0 fail:24 skip:981 time:13466s
shard-kbl total:2692 pass:1787 dwarn:21 dfail:0 fail:24 skip:860 time:11133s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7469/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] drm/i915: Bump timeout for wait_for_engines()
2017-12-11 19:41 [PATCH 1/2] drm/i915: Bump timeout for wait_for_engines() Chris Wilson
` (2 preceding siblings ...)
2017-12-12 6:25 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2017-12-12 13:39 ` Joonas Lahtinen
3 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2017-12-12 13:39 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Mon, 2017-12-11 at 19:41 +0000, Chris Wilson wrote:
> Extract the timeout we use in i915_gem_idle_work_handler() and reuse it
> for wait_for_engines() in i915_gem_wait_for_idle(). It too has the same
> problem in sometimes having to wait for an extended period before the HW
> settles, so make use of the same timeout.
>
> References: 5427f207852d ("drm/i915: Bump wait-times for the final CS interrupt before parking")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-12-12 21:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-11 19:41 [PATCH 1/2] drm/i915: Bump timeout for wait_for_engines() Chris Wilson
2017-12-11 19:41 ` [PATCH 2/2] drm/i915: Dump the engine state before declaring wedged from wait_for_engines() Chris Wilson
2017-12-12 13:40 ` Joonas Lahtinen
2017-12-12 21:40 ` Chris Wilson
2017-12-12 5:21 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Bump timeout for wait_for_engines() Patchwork
2017-12-12 6:25 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-12-12 13:39 ` [PATCH 1/2] " Joonas Lahtinen
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.