Commit 62e63007 authored by Chris Wilson's avatar Chris Wilson

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=95634Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1466776558-21516-1-git-send-email-chris@chris-wilson.co.uk
parent a09d0ba1
...@@ -3677,8 +3677,10 @@ int i915_gpu_idle(struct drm_device *dev) ...@@ -3677,8 +3677,10 @@ int i915_gpu_idle(struct drm_device *dev)
struct intel_engine_cs *engine; struct intel_engine_cs *engine;
int ret; int ret;
/* Flush everything onto the inactive list. */
for_each_engine(engine, dev_priv) { for_each_engine(engine, dev_priv) {
if (engine->last_context == NULL)
continue;
if (!i915.enable_execlists) { if (!i915.enable_execlists) {
struct drm_i915_gem_request *req; struct drm_i915_gem_request *req;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment