diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-02-10 03:39:42 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-02-10 03:39:42 +0000 |
commit | 248d41c3528c9109f9759f660b36deafd00259e9 (patch) | |
tree | 4b6a69e69670a8e9570d857cdb580ab27f3773af /sys/dev/pci/drm/i915 | |
parent | 014b6e2fd7df6b10a66841ddb585125fdf710cf9 (diff) |
use linux function names when locking mode config
Diffstat (limited to 'sys/dev/pci/drm/i915')
-rw-r--r-- | sys/dev/pci/drm/i915/i915_irq.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_dp.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_fb.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_lvds.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_overlay.c | 20 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_sprite.c | 10 |
6 files changed, 27 insertions, 27 deletions
diff --git a/sys/dev/pci/drm/i915/i915_irq.c b/sys/dev/pci/drm/i915/i915_irq.c index 75c2de3b944..9ae017fe4cc 100644 --- a/sys/dev/pci/drm/i915/i915_irq.c +++ b/sys/dev/pci/drm/i915/i915_irq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_irq.c,v 1.15 2015/02/10 01:39:32 jsg Exp $ */ +/* $OpenBSD: i915_irq.c,v 1.16 2015/02/10 03:39:41 jsg Exp $ */ /* i915_irq.c -- IRQ support for the I915 -*- linux-c -*- */ /* @@ -285,14 +285,14 @@ static void i915_hotplug_work_func(void *arg1) struct drm_mode_config *mode_config = &dev->mode_config; struct intel_encoder *encoder; - rw_enter_write(&mode_config->rwl); + mutex_lock(&mode_config->mutex); DRM_DEBUG_KMS("running encoder hotplug functions\n"); list_for_each_entry(encoder, &mode_config->encoder_list, base.head) if (encoder->hot_plug) encoder->hot_plug(encoder); - rw_exit_write(&mode_config->rwl); + mutex_unlock(&mode_config->mutex); /* Just fire off a uevent and let userspace tell us what to do */ drm_helper_hpd_irq_event(dev); diff --git a/sys/dev/pci/drm/i915/intel_dp.c b/sys/dev/pci/drm/i915/intel_dp.c index fa28a84e327..a152d04827b 100644 --- a/sys/dev/pci/drm/i915/intel_dp.c +++ b/sys/dev/pci/drm/i915/intel_dp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intel_dp.c,v 1.21 2015/01/27 03:17:36 dlg Exp $ */ +/* $OpenBSD: intel_dp.c,v 1.22 2015/02/10 03:39:41 jsg Exp $ */ /* * Copyright © 2008 Intel Corporation * @@ -1114,9 +1114,9 @@ static void ironlake_panel_vdd_work(void *arg1) struct intel_dp *intel_dp = arg1; struct drm_device *dev = intel_dp_to_dev(intel_dp); - rw_enter_write(&dev->mode_config.rwl); + mutex_lock(&dev->mode_config.mutex); ironlake_panel_vdd_off_sync(intel_dp); - rw_exit_write(&dev->mode_config.rwl); + mutex_unlock(&dev->mode_config.mutex); } static void diff --git a/sys/dev/pci/drm/i915/intel_fb.c b/sys/dev/pci/drm/i915/intel_fb.c index 9a349e85de5..e06af785015 100644 --- a/sys/dev/pci/drm/i915/intel_fb.c +++ b/sys/dev/pci/drm/i915/intel_fb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intel_fb.c,v 1.11 2015/02/10 01:39:32 jsg Exp $ */ +/* $OpenBSD: intel_fb.c,v 1.12 2015/02/10 03:39:41 jsg Exp $ */ /* * Copyright © 2007 David Airlie * @@ -292,7 +292,7 @@ void intel_fb_restore_mode(struct drm_device *dev) struct drm_mode_config *config = &dev->mode_config; struct drm_plane *plane; - rw_enter_write(&dev->mode_config.rwl); + mutex_lock(&dev->mode_config.mutex); ret = drm_fb_helper_restore_fbdev_mode(&dev_priv->fbdev->helper); if (ret) @@ -302,5 +302,5 @@ void intel_fb_restore_mode(struct drm_device *dev) list_for_each_entry(plane, &config->plane_list, head) plane->funcs->disable_plane(plane); - rw_exit_write(&dev->mode_config.rwl); + mutex_unlock(&dev->mode_config.mutex); } diff --git a/sys/dev/pci/drm/i915/intel_lvds.c b/sys/dev/pci/drm/i915/intel_lvds.c index 6c18e639ef4..e400c8ddc45 100644 --- a/sys/dev/pci/drm/i915/intel_lvds.c +++ b/sys/dev/pci/drm/i915/intel_lvds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intel_lvds.c,v 1.11 2014/01/22 22:33:24 jsg Exp $ */ +/* $OpenBSD: intel_lvds.c,v 1.12 2015/02/10 03:39:41 jsg Exp $ */ /* * Copyright © 2006-2007 Intel Corporation * Copyright (c) 2006 Dave Airlie <airlied@linux.ie> @@ -542,9 +542,9 @@ static int intel_lid_notify(struct notifier_block *nb, unsigned long val, dev_priv->modeset_on_lid = 0; - rw_enter_write(&dev->mode_config.rwl); + mutex_lock(&dev->mode_config.mutex); intel_modeset_setup_hw_state(dev, true); - rw_exit_write(&dev->mode_config.rwl); + mutex_unlock(&dev->mode_config.mutex); return NOTIFY_OK; } diff --git a/sys/dev/pci/drm/i915/intel_overlay.c b/sys/dev/pci/drm/i915/intel_overlay.c index 69a01cf2315..55efee12602 100644 --- a/sys/dev/pci/drm/i915/intel_overlay.c +++ b/sys/dev/pci/drm/i915/intel_overlay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intel_overlay.c,v 1.10 2015/02/10 01:39:32 jsg Exp $ */ +/* $OpenBSD: intel_overlay.c,v 1.11 2015/02/10 03:39:41 jsg Exp $ */ /* * Copyright © 2009 * @@ -710,7 +710,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay, #ifdef notyet BUG_ON(!mutex_is_locked(&dev->struct_mutex)); #endif - rw_assert_wrlock(&dev->mode_config.rwl); + rw_assert_wrlock(&dev->mode_config.mutex); BUG_ON(!overlay); ret = intel_overlay_release_old_vid(overlay); @@ -817,7 +817,7 @@ int intel_overlay_switch_off(struct intel_overlay *overlay) #ifdef notyet BUG_ON(!mutex_is_locked(&dev->struct_mutex)); #endif - rw_assert_wrlock(&dev->mode_config.rwl); + rw_assert_wrlock(&dev->mode_config.mutex); ret = intel_overlay_recover_from_interrupt(overlay); if (ret != 0) @@ -1069,13 +1069,13 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, } if (!(put_image_rec->flags & I915_OVERLAY_ENABLE)) { - rw_enter_write(&dev->mode_config.rwl); + mutex_lock(&dev->mode_config.mutex); mutex_lock(&dev->struct_mutex); ret = intel_overlay_switch_off(overlay); mutex_unlock(&dev->struct_mutex); - rw_exit_write(&dev->mode_config.rwl); + mutex_unlock(&dev->mode_config.mutex); return ret; } @@ -1099,7 +1099,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, goto out_free; } - rw_enter_write(&dev->mode_config.rwl); + mutex_lock(&dev->mode_config.mutex); mutex_lock(&dev->struct_mutex); if (new_bo->tiling_mode) { @@ -1181,7 +1181,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, goto out_unlock; mutex_unlock(&dev->struct_mutex); - rw_exit_write(&dev->mode_config.rwl); + mutex_unlock(&dev->mode_config.mutex); kfree(params); @@ -1189,7 +1189,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, out_unlock: mutex_unlock(&dev->struct_mutex); - rw_exit_write(&dev->mode_config.rwl); + mutex_unlock(&dev->mode_config.mutex); drm_gem_object_unreference_unlocked(&new_bo->base); out_free: kfree(params); @@ -1264,7 +1264,7 @@ int intel_overlay_attrs(struct drm_device *dev, void *data, return -ENODEV; } - rw_enter_write(&dev->mode_config.rwl); + mutex_lock(&dev->mode_config.mutex); mutex_lock(&dev->struct_mutex); ret = -EINVAL; @@ -1330,7 +1330,7 @@ int intel_overlay_attrs(struct drm_device *dev, void *data, ret = 0; out_unlock: mutex_unlock(&dev->struct_mutex); - rw_exit_write(&dev->mode_config.rwl); + mutex_unlock(&dev->mode_config.mutex); return ret; } diff --git a/sys/dev/pci/drm/i915/intel_sprite.c b/sys/dev/pci/drm/i915/intel_sprite.c index d61caf0e5bd..906c669709f 100644 --- a/sys/dev/pci/drm/i915/intel_sprite.c +++ b/sys/dev/pci/drm/i915/intel_sprite.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intel_sprite.c,v 1.5 2015/02/10 01:39:32 jsg Exp $ */ +/* $OpenBSD: intel_sprite.c,v 1.6 2015/02/10 03:39:41 jsg Exp $ */ /* * Copyright © 2011 Intel Corporation * @@ -594,7 +594,7 @@ int intel_sprite_set_colorkey(struct drm_device *dev, void *data, if ((set->flags & (I915_SET_COLORKEY_DESTINATION | I915_SET_COLORKEY_SOURCE)) == (I915_SET_COLORKEY_DESTINATION | I915_SET_COLORKEY_SOURCE)) return -EINVAL; - rw_enter_write(&dev->mode_config.rwl); + mutex_lock(&dev->mode_config.mutex); obj = drm_mode_object_find(dev, set->plane_id, DRM_MODE_OBJECT_PLANE); if (!obj) { @@ -607,7 +607,7 @@ int intel_sprite_set_colorkey(struct drm_device *dev, void *data, ret = intel_plane->update_colorkey(plane, set); out_unlock: - rw_exit_write(&dev->mode_config.rwl); + mutex_unlock(&dev->mode_config.mutex); return ret; } @@ -623,7 +623,7 @@ int intel_sprite_get_colorkey(struct drm_device *dev, void *data, if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -ENODEV; - rw_enter_write(&dev->mode_config.rwl); + mutex_lock(&dev->mode_config.mutex); obj = drm_mode_object_find(dev, get->plane_id, DRM_MODE_OBJECT_PLANE); if (!obj) { @@ -636,7 +636,7 @@ int intel_sprite_get_colorkey(struct drm_device *dev, void *data, intel_plane->get_colorkey(plane, get); out_unlock: - rw_exit_write(&dev->mode_config.rwl); + mutex_unlock(&dev->mode_config.mutex); return ret; } |