]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Protect DSPARB registers with a spinlock
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 5 Dec 2016 14:13:28 +0000 (16:13 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 7 Dec 2016 15:50:21 +0000 (17:50 +0200)
commitf2e7a51e0fcff64f1e7032e134b20903198731c8
tree28937b8039de5c31fc77f0cdd4b339f31d17fed1
parent1f983cc8905d767b2f228e0988a0097965dca3bd
drm/i915: Protect DSPARB registers with a spinlock

Each DSPARB register can house bits for two separate pipes, hence
we must protect the registers during reprogramming so that parallel
FIFO reconfigurations happening simultaneosly on multiple pipes won't
corrupt each others values.

We'll use a new spinlock for this instead of the wm_mutex since we'll
have to move the DSPARB programming to happen from the vblank evade
critical section, and we can't use mutexes in there.

v2: Document why we use a spinlock instead of a mutex (Maarten)

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1480947208-18468-1-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_pm.c