]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Do not keep postponing the idle-work
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 4 Jul 2016 07:08:32 +0000 (08:08 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 4 Jul 2016 07:18:20 +0000 (08:18 +0100)
commita373432632c04a80e9cc7f67e1966c414ff6ba66
tree7e2be25270358d43f83c08f3156156ee8642bc46
parent3a0eea1e3ef52b2ac3d2dcfdda074198805cb155
drm/i915: Do not keep postponing the idle-work

Rather than persistently postponing the idle-work everytime somebody
calls i915_gem_retire_requests() (potentially ensuring that we never
reach the idle state), queue the work the first time we detect all
requests are complete. Then if in 100ms, more requests have been queued,
we will abort the idle-worker and wait again until all the new requests
have been completed.

Of course, this does depend upon the idle worker cancelling itself
gracefully from the previous patch.

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/1467616119-4093-2-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c