drm/i915: Hold gt_lock across forcewake register reads
authorKeith Packard <keithp@keithp.com>
Fri, 6 Jan 2012 19:48:38 +0000 (11:48 -0800)
committerKeith Packard <keithp@keithp.com>
Thu, 19 Jan 2012 20:28:53 +0000 (12:28 -0800)
commitc937504e2b96af3b281b1ef859e063ef4af656c1
tree16c90e4028f09fb52bedc27d7b4fe0b15eb5d742
parent286fed412a134e76be55899bc628c6fa59cb70da
drm/i915: Hold gt_lock across forcewake register reads

Along with the previous patch to make the reset operation protected by
the gt_lock as well, this ensures that all register read operations
will occur with the forcewake hardware enabled. As an added bonus,
this makes read operations more efficient by taking the spinlock only
once per read instead of twice.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c