drm/i915: protect backlight registers and data with a spinlock
authorJani Nikula <jani.nikula@intel.com>
Fri, 12 Apr 2013 12:18:37 +0000 (15:18 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 25 Apr 2013 12:10:10 +0000 (14:10 +0200)
commit8ba2d18520ce380cf572e9902d9b3b91ece6c2c0
treeeb1ecb47ee2f713bc2980e97db7a0b566334ff90
parentd65406327345e5a5e0f697a3ffe3e53bc9b5d7c6
drm/i915: protect backlight registers and data with a spinlock

Backlight data and registers are fiddled through LVDS/eDP modeset
enable/disable hooks, backlight sysfs files, asle interrupts, and register
save/restore. Protect the backlight related registers and driver private
fields using a spinlock.

The locking in register save/restore covers a little more than is strictly
necessary, including non-modeset case, for simplicity.

v2: Cover register access, save/restore, i915_read_blc_pwm_ctl() and code
    paths leading there.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_suspend.c
drivers/gpu/drm/i915/intel_panel.c