diff options
author | Rob Clark <robdclark@gmail.com> | 2013-11-19 12:10:12 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-06-04 19:54:33 -0400 |
commit | 51fd371bbaf94018a1223b4e2cf20b9880fd92d4 (patch) | |
tree | e86e8ec3ace2fd61111105d39f5eb2d37378e9a8 /drivers/gpu/drm/i915/intel_overlay.c | |
parent | 4f71d0cb76339a10fd445b0b281acc45c71b6271 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_overlay.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index e97ea33e0117..0396d1312b5c 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c | |||
@@ -688,7 +688,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay, | |||
688 | u32 swidth, swidthsw, sheight, ostride; | 688 | u32 swidth, swidthsw, sheight, ostride; |
689 | 689 | ||
690 | BUG_ON(!mutex_is_locked(&dev->struct_mutex)); | 690 | BUG_ON(!mutex_is_locked(&dev->struct_mutex)); |
691 | BUG_ON(!mutex_is_locked(&dev->mode_config.connection_mutex)); | 691 | BUG_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex)); |
692 | BUG_ON(!overlay); | 692 | BUG_ON(!overlay); |
693 | 693 | ||
694 | ret = intel_overlay_release_old_vid(overlay); | 694 | ret = intel_overlay_release_old_vid(overlay); |
@@ -793,7 +793,7 @@ int intel_overlay_switch_off(struct intel_overlay *overlay) | |||
793 | int ret; | 793 | int ret; |
794 | 794 | ||
795 | BUG_ON(!mutex_is_locked(&dev->struct_mutex)); | 795 | BUG_ON(!mutex_is_locked(&dev->struct_mutex)); |
796 | BUG_ON(!mutex_is_locked(&dev->mode_config.connection_mutex)); | 796 | BUG_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex)); |
797 | 797 | ||
798 | ret = intel_overlay_recover_from_interrupt(overlay); | 798 | ret = intel_overlay_recover_from_interrupt(overlay); |
799 | if (ret != 0) | 799 | if (ret != 0) |