drm/i915: rework dev->first_error locking
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 27 Apr 2012 13:17:39 +0000 (15:17 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 5 May 2012 17:46:16 +0000 (19:46 +0200)
commit742cbee8049f434d8ae7908ee56fe4cad3db2658
tree513e556a980b4cd53b08a5cf90815288d9b34c81
parente5eb3d63c6182d3f21fbfc836ded748d49d521f9
drm/i915: rework dev->first_error locking

- reduce the irq disabled section, even for a debugfs file this was
  way too long.
- always disable irqs when taking the lock.

v2: Thou shalt not mistake locking for reference counting, so:
- reference count the error_state to protect from concurent freeeing.
  This will be only really used in the next patch.

Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c