drm/i915: Hold rpm wakeref for printing the engine's register state
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 12 Feb 2018 10:24:15 +0000 (10:24 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 12 Feb 2018 13:33:33 +0000 (13:33 +0000)
commit3ceda3a4a856336c5c902a6cfbacff2c4effaa21
tree134d0ef4520aaf90dc5598bfe70c9a2f4e6cc276
parent74d00d28a15c8452f65de0a9477b52d95639cc63
drm/i915: Hold rpm wakeref for printing the engine's register state

When dumping the engine, we print out the current register values. This
requires the rpm wakeref. If the device is alseep, we can assume the
engine is asleep (and the register state is uninteresting) so skip and
only acquire the rpm wakeref if the device is already awake.

Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180212102415.24246-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_ringbuffer.h