drm/i915: Bump wait-times for the final CS interrupt before parking
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Oct 2017 21:32:34 +0000 (22:32 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Oct 2017 14:44:48 +0000 (15:44 +0100)
commit5427f207852d5b905e251a5a728c8604d3594d58
tree1d48d2d73826fe03685e4ff86fc52ecc19678046
parentcdc1cdca2d91c477ce33d5c02dc6be0d2b939247
drm/i915: Bump wait-times for the final CS interrupt before parking

In the idle worker we drop the prolonged GT wakeref used to cover such
essentials as interrupt delivery. (When a CS interrupt arrives, we also
assert that the GT is awake.) However, it turns out that 10ms is not
long enough to be assured that the last CS interrupt has been delivered,
so bump that to 200ms, and move the entirety of that wait to before we
take the struct_mutex to avoid blocking. As this is now a potentially
long wait, restore the earlier behaviour of bailing out early when a new
request arrives.

v2: Break out the repeated check for new requests into its own little
helper to try and improve the self-commentary.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171023213237.26536-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c