summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2013-03-16 16:02:38 +1100
committerJonathan Gray <jsg@jsg.id.au>2013-03-16 16:02:38 +1100
commitb2afd31248107652f16cb3c6771ca495f5ad5e2b (patch)
tree544cbe8b5bd6454c583abb07bb95c9301ee816cd /sys
parente3daa4cc5e27c36b55d04a1bbeee0a9aa75034bb (diff)
convert some commented out users of the mode_config lock from mutex to rwlock
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915/intel_lvds.c4
-rw-r--r--sys/dev/pci/drm/i915/intel_overlay.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/pci/drm/i915/intel_lvds.c b/sys/dev/pci/drm/i915/intel_lvds.c
index 243b0840d8c..bcc38e293f2 100644
--- a/sys/dev/pci/drm/i915/intel_lvds.c
+++ b/sys/dev/pci/drm/i915/intel_lvds.c
@@ -586,9 +586,9 @@ intel_lid_notify(struct notifier_block *nb, unsigned long val,
dev_priv->modeset_on_lid = 0;
- mtx_enter(&dev->mode_config.mutex);
+ rw_enter_write(&dev->mode_config.rwl);
intel_modeset_setup_hw_state(dev, true);
- mtx_leave(&dev->mode_config.mutex);
+ rw_exit_write(&dev->mode_config.rwl);
return NOTIFY_OK;
}
diff --git a/sys/dev/pci/drm/i915/intel_overlay.c b/sys/dev/pci/drm/i915/intel_overlay.c
index d20ec9165df..63a1179c07d 100644
--- a/sys/dev/pci/drm/i915/intel_overlay.c
+++ b/sys/dev/pci/drm/i915/intel_overlay.c
@@ -756,13 +756,13 @@ intel_overlay_do_put_image(struct intel_overlay *overlay,
int ret, tmp_width;
struct overlay_registers *regs;
bool scale_changed = false;
-// struct drm_device *dev = overlay->dev;
+ struct drm_device *dev = overlay->dev;
u32 swidth, swidthsw, sheight, ostride;
#ifdef notyet
BUG_ON(!mutex_is_locked(&dev->struct_mutex));
- BUG_ON(!mutex_is_locked(&dev->mode_config.mutex));
#endif
+ rw_assert_wrlock(&dev->mode_config.rwl);
BUG_ON(!overlay);
ret = intel_overlay_release_old_vid(overlay);
@@ -864,13 +864,13 @@ int
intel_overlay_switch_off(struct intel_overlay *overlay)
{
struct overlay_registers *regs;
-// struct drm_device *dev = overlay->dev;
+ struct drm_device *dev = overlay->dev;
int ret;
#ifdef notyet
BUG_ON(!mutex_is_locked(&dev->struct_mutex));
- BUG_ON(!mutex_is_locked(&dev->mode_config.mutex));
#endif
+ rw_assert_wrlock(&dev->mode_config.rwl);
ret = intel_overlay_recover_from_interrupt(overlay);
if (ret != 0)