projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bd11a3
)
drm/i915: Avoid early GPU idling due to race with new request
author
Imre Deak
<
[email protected]
>
Mon, 7 Nov 2016 09:20:03 +0000
(11:20 +0200)
committer
Imre Deak
<
[email protected]
>
Mon, 7 Nov 2016 12:48:04 +0000
(14:48 +0200)
There is a small race where a new request can be submitted and retired
after the idle worker started to run which leads to idling the GPU too
early. Fix this by deferring the idling to the pending instance of the
worker.
This scenario was pointed out by Chris.
Cc: Chris Wilson <
[email protected]
>
Signed-off-by: Imre Deak <
[email protected]
>
Reviewed-by: Chris Wilson <
[email protected]
>
Link:
http://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/i915/i915_gem.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/i915_gem.c
b/drivers/gpu/drm/i915/i915_gem.c
index 490fd302bd1a9676ac3840b513c64a453967763e..82170bcb3bf3d20e8e4023a130c33e9e305d9c36 100644
(file)
--- a/
drivers/gpu/drm/i915/i915_gem.c
+++ b/
drivers/gpu/drm/i915/i915_gem.c
@@
-2766,6
+2766,13
@@
i915_gem_idle_work_handler(struct work_struct *work)
goto out_rearm;
}
+ /*
+ * New request retired after this work handler started, extend active
+ * period until next instance of the work.
+ */
+ if (work_pending(work))
+ goto out_unlock;
+
if (dev_priv->gt.active_requests)
goto out_unlock;