summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-06-24 14:55:52 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-06-24 15:02:16 +0100
commit62e6300768f6550ba24fa3ba2d4c66d725e3c890 (patch)
tree4028727b7d2aa62d6161918df31294bbc5966693 /drivers/gpu/drm/i915/i915_gem.c
parenta09d0ba1745b607070a937083ecf9ec616178768 (diff)
downloadtalos-op-linux-62e6300768f6550ba24fa3ba2d4c66d725e3c890.tar.gz
talos-op-linux-62e6300768f6550ba24fa3ba2d4c66d725e3c890.zip
drm/i915: Skip idling an idle engine
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> Link: http://patchwork.freedesktop.org/patch/msgid/1466776558-21516-1-git-send-email-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c4
1 files changed, 3 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud