All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 1/4] drm/i915: Avoid early GPU idling due to already pending idle work
@ 2016-11-07  9:20 Imre Deak
  2016-11-07  9:20 ` [PATCH v5 2/4] drm/i915: Avoid early GPU idling due to race with new request Imre Deak
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Imre Deak @ 2016-11-07  9:20 UTC (permalink / raw)
  To: intel-gfx

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 idle period
as required, rather simply leaves the pending 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>
---
 drivers/gpu/drm/i915/i915_gem_request.c | 6 +++---
 1 file 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 79b0046..0b3b051 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));
 }
-- 
2.5.0

_______________________________________________
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

end of thread, other threads:[~2016-11-07 12:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-07  9:20 [PATCH v5 1/4] drm/i915: Avoid early GPU idling due to already pending idle work Imre Deak
2016-11-07  9:20 ` [PATCH v5 2/4] drm/i915: Avoid early GPU idling due to race with new request Imre Deak
2016-11-07  9:20 ` [PATCH v5 3/4] drm/i915: Make sure engines are idle during GPU idling in LR mode Imre Deak
2016-11-07  9:20 ` [PATCH v5 4/4] drm/i915: Add assert for no pending GPU requests during suspend/resume " Imre Deak
2016-11-07  9:44 ` [PATCH v5 1/4] drm/i915: Avoid early GPU idling due to already pending idle work Chris Wilson
2016-11-07 10:15 ` ✗ Fi.CI.BAT: warning for series starting with [v5,1/4] " Patchwork
2016-11-07 12:55   ` Imre Deak

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.