drm: convert crtc and connection_mutex to ww_mutex (v5)
authorRob Clark <robdclark@gmail.com>
Tue, 19 Nov 2013 17:10:12 +0000 (12:10 -0500)
committerDave Airlie <airlied@redhat.com>
Wed, 4 Jun 2014 23:54:33 +0000 (09:54 +1000)
commit51fd371bbaf94018a1223b4e2cf20b9880fd92d4
treee86e8ec3ace2fd61111105d39f5eb2d37378e9a8
parent4f71d0cb76339a10fd445b0b281acc45c71b6271
drm: convert crtc and connection_mutex to ww_mutex (v5)

For atomic, it will be quite necessary to not need to care so much
about locking order.  And 'state' gives us a convenient place to stash a
ww_ctx for any sort of update that needs to grab multiple crtc locks.

Because we will want to eventually make locking even more fine grained
(giving locks to planes, connectors, etc), split out drm_modeset_lock
and drm_modeset_acquire_ctx to track acquired locks.

Atomic will use this to keep track of which locks have been acquired
in a transaction.

v1: original
v2: remove a few things not needed until atomic, for now
v3: update for v3 of connection_mutex patch..
v4: squash in docbook
v5: doc tweaks/fixes

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
21 files changed:
Documentation/DocBook/drm.tmpl
drivers/gpu/drm/Makefile
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/drm_crtc_helper.c
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/drm_modeset_lock.c [new file with mode: 0644]
drivers/gpu/drm/drm_plane_helper.c
drivers/gpu/drm/i915/intel_crt.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_opregion.c
drivers/gpu/drm/i915/intel_overlay.c
drivers/gpu/drm/i915/intel_panel.c
drivers/gpu/drm/i915/intel_sprite.c
drivers/gpu/drm/i915/intel_tv.c
drivers/gpu/drm/omapdrm/omap_crtc.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
include/drm/drmP.h
include/drm/drm_crtc.h
include/drm/drm_modeset_lock.h [new file with mode: 0644]