From c167416fc15ca7a2bda326257804173c37f601d6 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Tue, 10 Feb 2015 01:39:33 +0000 Subject: Remove DRM_LOCK macros, rename dev_lock to struct_mutex and directly call linux style lock functions where these macros were used. --- sys/dev/pci/drm/i915/i915_drv.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sys/dev/pci/drm/i915/i915_drv.c') diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c index c1b0c1a0eaf..ddeba9450d0 100644 --- a/sys/dev/pci/drm/i915/i915_drv.c +++ b/sys/dev/pci/drm/i915/i915_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_drv.c,v 1.71 2015/02/09 03:15:41 dlg Exp $ */ +/* $OpenBSD: i915_drv.c,v 1.72 2015/02/10 01:39:32 jsg Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth * @@ -539,11 +539,11 @@ __i915_drm_thaw(struct drm_device *dev) if (drm_core_check_feature(dev, DRIVER_MODESET)) { intel_init_pch_refclk(dev); - DRM_LOCK(); + mutex_lock(&dev->struct_mutex); dev_priv->mm.suspended = 0; error = i915_gem_init_hw(dev); - DRM_UNLOCK(); + mutex_unlock(&dev->struct_mutex); intel_modeset_init_hw(dev); drm_mode_config_reset(dev); @@ -566,9 +566,9 @@ i915_drm_thaw(struct drm_device *dev) intel_gt_sanitize(dev); if (drm_core_check_feature(dev, DRIVER_MODESET)) { - DRM_LOCK(); + mutex_lock(&dev->struct_mutex); i915_gem_restore_gtt_mappings(dev); - DRM_UNLOCK(); + mutex_unlock(&dev->struct_mutex); } __i915_drm_thaw(dev); @@ -1584,7 +1584,7 @@ int i915_reset(struct drm_device *dev) return 0; #endif - DRM_LOCK(); + mutex_lock(&dev->struct_mutex); i915_gem_reset(dev); @@ -1597,7 +1597,7 @@ int i915_reset(struct drm_device *dev) dev_priv->last_gpu_reset = time_second; if (ret) { DRM_ERROR("Failed to reset chip.\n"); - DRM_UNLOCK(); + mutex_unlock(&dev->struct_mutex); return ret; } @@ -1638,12 +1638,12 @@ int i915_reset(struct drm_device *dev) * some unknown reason, this blows up my ilk, so don't. */ - DRM_UNLOCK(); + mutex_unlock(&dev->struct_mutex); drm_irq_uninstall(dev); drm_irq_install(dev); } else { - DRM_UNLOCK(); + mutex_unlock(&dev->struct_mutex); } return 0; -- cgit v1.2.3