* [PATCH 1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound
@ 2018-03-06 13:01 Chris Wilson
2018-03-06 13:01 ` [PATCH 2/2] drm/i915: Flush waiters " Chris Wilson
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Chris Wilson @ 2018-03-06 13:01 UTC (permalink / raw)
To: intel-gfx
Since commit fd10e2ce9905 ("drm/i915/breadcrumbs: Ignore unsubmitted
signalers"), we cancel the signaler when retiring the request and so
upon wraparound, where we wait for all requests to be retired, we no
longer need to spin waiting for the signaling thread to release its
references to the in-flight requests, and so we can assert that the
signaler is idle.
References: fd10e2ce9905 ("drm/i915/breadcrumbs: Ignore unsubmitted signalers")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
drivers/gpu/drm/i915/i915_request.c | 2 ++
drivers/gpu/drm/i915/intel_breadcrumbs.c | 5 -----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index 2265bb8ff4fa..d34a3e5800b7 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -220,6 +220,8 @@ static int reset_all_global_seqno(struct drm_i915_private *i915, u32 seqno)
/* spin until threads are complete */
while (intel_breadcrumbs_busy(engine))
cond_resched();
+
+ GEM_BUG_ON(!list_empty(&engine->breadcrumbs.signals));
}
/* Check we are idle before we fiddle with hw state! */
diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index 6a740618863c..bab74c3ee81a 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -889,11 +889,6 @@ bool intel_breadcrumbs_busy(struct intel_engine_cs *engine)
spin_unlock_irq(&b->irq_lock);
}
- if (!busy && !list_empty(&b->signals)) {
- wake_up_process(b->signaler);
- busy = true;
- }
-
return busy;
}
--
2.16.2
_______________________________________________
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: Flush waiters on seqno wraparound
2018-03-06 13:01 [PATCH 1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound Chris Wilson
@ 2018-03-06 13:01 ` Chris Wilson
2018-03-06 15:05 ` Joonas Lahtinen
2018-03-06 13:59 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Stop kicking the signaling thread " Patchwork
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2018-03-06 13:01 UTC (permalink / raw)
To: intel-gfx
Previously, we would spin waiting for all waiters to wake up and notice
their request had completed before we would reset the seqno upon
wraparound. However, we can mark their waits as complete and wake them
up directly using the existing machinery for handling the flushing of
missed wakeups when idling.
Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
drivers/gpu/drm/i915/i915_request.c | 6 ++----
drivers/gpu/drm/i915/intel_breadcrumbs.c | 19 -------------------
drivers/gpu/drm/i915/intel_ringbuffer.h | 1 -
3 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index d34a3e5800b7..d437beac3969 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -217,10 +217,8 @@ static int reset_all_global_seqno(struct drm_i915_private *i915, u32 seqno)
struct intel_timeline *tl = engine->timeline;
if (!i915_seqno_passed(seqno, tl->seqno)) {
- /* spin until threads are complete */
- while (intel_breadcrumbs_busy(engine))
- cond_resched();
-
+ /* Flush any waiters before we reuse the seqno */
+ intel_engine_disarm_breadcrumbs(engine);
GEM_BUG_ON(!list_empty(&engine->breadcrumbs.signals));
}
diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index bab74c3ee81a..1f79e7a47433 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -873,25 +873,6 @@ void intel_engine_fini_breadcrumbs(struct intel_engine_cs *engine)
cancel_fake_irq(engine);
}
-bool intel_breadcrumbs_busy(struct intel_engine_cs *engine)
-{
- struct intel_breadcrumbs *b = &engine->breadcrumbs;
- bool busy = false;
-
- if (b->irq_wait) {
- spin_lock_irq(&b->irq_lock);
-
- if (b->irq_wait) {
- wake_up_process(b->irq_wait->tsk);
- busy = true;
- }
-
- spin_unlock_irq(&b->irq_lock);
- }
-
- return busy;
-}
-
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "selftests/intel_breadcrumbs.c"
#endif
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index e7526a4f05e5..26605f39bbfd 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -951,7 +951,6 @@ void intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine);
void intel_engine_reset_breadcrumbs(struct intel_engine_cs *engine);
void intel_engine_fini_breadcrumbs(struct intel_engine_cs *engine);
-bool intel_breadcrumbs_busy(struct intel_engine_cs *engine);
static inline u32 *gen8_emit_pipe_control(u32 *batch, u32 flags, u32 offset)
{
--
2.16.2
_______________________________________________
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
* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound
2018-03-06 13:01 [PATCH 1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound Chris Wilson
2018-03-06 13:01 ` [PATCH 2/2] drm/i915: Flush waiters " Chris Wilson
@ 2018-03-06 13:59 ` Patchwork
2018-03-06 15:04 ` [PATCH 1/2] " Joonas Lahtinen
2018-03-06 18:53 ` ✗ Fi.CI.IGT: warning for series starting with [1/2] " Patchwork
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-03-06 13:59 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound
URL : https://patchwork.freedesktop.org/series/39448/
State : success
== Summary ==
Series 39448v1 series starting with [1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound
https://patchwork.freedesktop.org/api/1.0/series/39448/revisions/1/mbox/
---- Known issues:
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail -> PASS (fi-gdg-551) fdo#102575
Test kms_chamelium:
Subgroup dp-edid-read:
pass -> FAIL (fi-kbl-7500u) fdo#102505
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#102505 https://bugs.freedesktop.org/show_bug.cgi?id=102505
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:430s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:423s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:373s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:497s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:277s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:487s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:494s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:487s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:467s
fi-cfl-8700k total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:405s
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:571s
fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:597s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:412s
fi-gdg-551 total:288 pass:180 dwarn:0 dfail:0 fail:0 skip:108 time:290s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:514s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:397s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:411s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:455s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:417s
fi-kbl-7500u total:288 pass:262 dwarn:1 dfail:0 fail:1 skip:24 time:466s
fi-kbl-7560u total:108 pass:104 dwarn:0 dfail:0 fail:0 skip:3
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:461s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:504s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:583s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:438s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:515s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:536s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:503s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:481s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:423s
fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:520s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:394s
3d35bb0a8966cf81f0e7b13a9ba796d0b65f98c5 drm-tip: 2018y-03m-06d-12h-23m-04s UTC integration manifest
b5dbb9aefd0b drm/i915: Flush waiters on seqno wraparound
2c8037c10324 drm/i915: Stop kicking the signaling thread on seqno wraparound
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8244/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
* Re: [PATCH 1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound
2018-03-06 13:01 [PATCH 1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound Chris Wilson
2018-03-06 13:01 ` [PATCH 2/2] drm/i915: Flush waiters " Chris Wilson
2018-03-06 13:59 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Stop kicking the signaling thread " Patchwork
@ 2018-03-06 15:04 ` Joonas Lahtinen
2018-03-06 18:53 ` ✗ Fi.CI.IGT: warning for series starting with [1/2] " Patchwork
3 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2018-03-06 15:04 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Tue, 2018-03-06 at 13:01 +0000, Chris Wilson wrote:
> Since commit fd10e2ce9905 ("drm/i915/breadcrumbs: Ignore unsubmitted
> signalers"), we cancel the signaler when retiring the request and so
> upon wraparound, where we wait for all requests to be retired, we no
> longer need to spin waiting for the signaling thread to release its
> references to the in-flight requests, and so we can assert that the
> signaler is idle.
>
> References: fd10e2ce9905 ("drm/i915/breadcrumbs: Ignore unsubmitted signalers")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@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: Flush waiters on seqno wraparound
2018-03-06 13:01 ` [PATCH 2/2] drm/i915: Flush waiters " Chris Wilson
@ 2018-03-06 15:05 ` Joonas Lahtinen
0 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2018-03-06 15:05 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Tue, 2018-03-06 at 13:01 +0000, Chris Wilson wrote:
> Previously, we would spin waiting for all waiters to wake up and notice
> their request had completed before we would reset the seqno upon
> wraparound. However, we can mark their waits as complete and wake them
> up directly using the existing machinery for handling the flushing of
> missed wakeups when idling.
>
> Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@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
* ✗ Fi.CI.IGT: warning for series starting with [1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound
2018-03-06 13:01 [PATCH 1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound Chris Wilson
` (2 preceding siblings ...)
2018-03-06 15:04 ` [PATCH 1/2] " Joonas Lahtinen
@ 2018-03-06 18:53 ` Patchwork
2018-03-06 19:11 ` Chris Wilson
3 siblings, 1 reply; 7+ messages in thread
From: Patchwork @ 2018-03-06 18:53 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound
URL : https://patchwork.freedesktop.org/series/39448/
State : warning
== Summary ==
---- Possible new issues:
Test kms_chv_cursor_fail:
Subgroup pipe-a-128x128-left-edge:
pass -> DMESG-WARN (shard-hsw)
---- Known issues:
Test gem_eio:
Subgroup in-flight:
incomplete -> PASS (shard-apl) fdo#105341 +1
Test gem_softpin:
Subgroup noreloc-s3:
skip -> PASS (shard-snb) fdo#103375
Test kms_flip:
Subgroup 2x-plain-flip-fb-recreate:
pass -> FAIL (shard-hsw) fdo#100368
Subgroup flip-vs-expired-vblank:
fail -> PASS (shard-hsw) fdo#102887
Test kms_plane:
Subgroup plane-panning-bottom-right-suspend-pipe-b-planes:
incomplete -> PASS (shard-hsw) fdo#103540
Test kms_rotation_crc:
Subgroup sprite-rotation-180:
pass -> FAIL (shard-hsw) fdo#105185 +1
Subgroup sprite-rotation-90-pos-100-0:
dmesg-warn -> PASS (shard-apl) fdo#103356
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047
fdo#105341 https://bugs.freedesktop.org/show_bug.cgi?id=105341
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#105185 https://bugs.freedesktop.org/show_bug.cgi?id=105185
fdo#103356 https://bugs.freedesktop.org/show_bug.cgi?id=103356
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
shard-apl total:3467 pass:1826 dwarn:1 dfail:0 fail:8 skip:1632 time:12333s
shard-hsw total:3467 pass:1770 dwarn:2 dfail:0 fail:3 skip:1691 time:11893s
shard-snb total:3467 pass:1364 dwarn:1 dfail:0 fail:2 skip:2100 time:7077s
Blacklisted hosts:
shard-kbl total:3467 pass:1947 dwarn:2 dfail:0 fail:8 skip:1510 time:9373s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8244/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: ✗ Fi.CI.IGT: warning for series starting with [1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound
2018-03-06 18:53 ` ✗ Fi.CI.IGT: warning for series starting with [1/2] " Patchwork
@ 2018-03-06 19:11 ` Chris Wilson
0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2018-03-06 19:11 UTC (permalink / raw)
To: Patchwork; +Cc: intel-gfx
Quoting Patchwork (2018-03-06 18:53:28)
> == Series Details ==
>
> Series: series starting with [1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound
> URL : https://patchwork.freedesktop.org/series/39448/
> State : warning
>
> == Summary ==
>
> ---- Possible new issues:
>
> Test kms_chv_cursor_fail:
> Subgroup pipe-a-128x128-left-edge:
> pass -> DMESG-WARN (shard-hsw)
And pushed. Thanks for the suggestion and review,
-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
end of thread, other threads:[~2018-03-06 19:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-06 13:01 [PATCH 1/2] drm/i915: Stop kicking the signaling thread on seqno wraparound Chris Wilson
2018-03-06 13:01 ` [PATCH 2/2] drm/i915: Flush waiters " Chris Wilson
2018-03-06 15:05 ` Joonas Lahtinen
2018-03-06 13:59 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Stop kicking the signaling thread " Patchwork
2018-03-06 15:04 ` [PATCH 1/2] " Joonas Lahtinen
2018-03-06 18:53 ` ✗ Fi.CI.IGT: warning for series starting with [1/2] " Patchwork
2018-03-06 19:11 ` 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.