summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_request.c
diff options
context:
space:
mode:
authorImre Deak2016-11-07 10:20:02 +0100
committerImre Deak2016-11-07 13:48:04 +0100
commit5bd11a34e46afa1048bd5330673fb1508183f6a5 (patch)
tree540f2ab7d664d0d50613c5c25982113273b5dabe /drivers/gpu/drm/i915/i915_gem_request.c
parentdrm/i915: Limit Valleyview and earlier to only using mappable scanout (diff)
downloadkernel-qcow2-linux-5bd11a34e46afa1048bd5330673fb1508183f6a5.tar.gz
kernel-qcow2-linux-5bd11a34e46afa1048bd5330673fb1508183f6a5.tar.xz
kernel-qcow2-linux-5bd11a34e46afa1048bd5330673fb1508183f6a5.zip
drm/i915: Avoid early GPU idling due to already pending idle work
Atm, in case an idle work handler is already pending but haven't yet started to run, retiring a new request will not extend the active period as required, rather simply leaves the pending idle work to be scheduled at the original expiration time. This may lead to idling the GPU too early. Fix this by using the delayed-work scheduler alternative which makes sure the handler's expiration time is extended in this case. Cc: Chris Wilson <chris@chris-wilson.co.uk> Requested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/1478510405-11799-1-git-send-email-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_request.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_request.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
index 79b0046d9a57..0b3b051a5683 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_request.c
@@ -1019,7 +1019,7 @@ void i915_gem_retire_requests(struct drm_i915_private *dev_priv)
engine_retire_requests(engine);
if (!dev_priv->gt.active_requests)
- queue_delayed_work(dev_priv->wq,
- &dev_priv->gt.idle_work,
- msecs_to_jiffies(100));
+ mod_delayed_work(dev_priv->wq,
+ &dev_priv->gt.idle_work,
+ msecs_to_jiffies(100));
}