All of lore.kernel.org
 help / color / mirror / Atom feed
* [CI 1/7] drm/i915: Skip idling an idle engine
@ 2016-06-24 13:55 Chris Wilson
  2016-06-24 13:55 ` [CI 2/7] drm/i915: Move legacy kernel context pinning to intel_ringbuffer.c Chris Wilson
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Chris Wilson @ 2016-06-24 13:55 UTC (permalink / raw)
  To: intel-gfx

During suspend (or module unload), if we have never accessed the engine
(i.e. userspace never submitted a batch to it), the engine is idle. Then
we attempt to idle the engine by forcing it to the default context,
which actually means we submit a render batch to setup the golden
context state and then wait for it to complete. We can skip this
entirely as we know the engine is idle.

v2: Drop incorrect comment.

References: https://bugs.freedesktop.org/show_bug.cgi?id=95634
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6abd5e590373..a0533ca089c5 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3677,8 +3677,10 @@ int i915_gpu_idle(struct drm_device *dev)
 	struct intel_engine_cs *engine;
 	int ret;
 
-	/* Flush everything onto the inactive list. */
 	for_each_engine(engine, dev_priv) {
+		if (engine->last_context == NULL)
+			continue;
+
 		if (!i915.enable_execlists) {
 			struct drm_i915_gem_request *req;
 
-- 
2.8.1

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

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

end of thread, other threads:[~2016-06-24 15:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-24 13:55 [CI 1/7] drm/i915: Skip idling an idle engine Chris Wilson
2016-06-24 13:55 ` [CI 2/7] drm/i915: Move legacy kernel context pinning to intel_ringbuffer.c Chris Wilson
2016-06-24 13:55 ` [CI 3/7] drm/i915: Treat kernel context as initialised Chris Wilson
2016-06-24 13:55 ` [CI 4/7] drm/i915: Mark all default contexts as uninitialised after context loss Chris Wilson
2016-06-24 13:55 ` [CI 5/7] drm/i915: No need to wait for idle on L3 remap Chris Wilson
2016-06-24 13:55 ` [CI 6/7] drm/i915: Split idling from forcing context switch Chris Wilson
2016-06-24 13:55 ` [CI 7/7] drm/i915: Only switch to default context when evicting from GGTT Chris Wilson
2016-06-24 15:04 ` ✗ Ro.CI.BAT: failure for series starting with [CI,1/7] drm/i915: Skip idling an idle engine Patchwork

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.