drm/i915: add i915_reset_count
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Tue, 12 Nov 2013 12:44:19 +0000 (14:44 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 12 Nov 2013 13:15:40 +0000 (14:15 +0100)
commit2ac0f45099d2d3b8918d63e1bac698b5cb272aa1
tree9f7050823bae9f20ad5ce702ab4eb4a2d215cb59
parentf2d91a2c556479713abbefec237cad4bc1d54b0d
drm/i915: add i915_reset_count

reset_counter will be incremented twice per successful
reset. Odd values mean reset is in progress and even values
mean that reset has completed.

Reset status ioctl introduced in following commit
needs to deliver global reset count to userspace so
use reset_counter to derive the actual reset count
for the gpu

Note that reset in progress is enough to increment
the counter.

v2: wedged equals reset in progress (Daniel Vetter)

v3: Fixed stale comments (Damien Lespiau)

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c