-/* $OpenBSD: drm_linux.h,v 1.18 2015/04/11 02:59:05 jsg Exp $ */
+/* $OpenBSD: drm_linux.h,v 1.19 2015/04/11 05:10:13 jsg Exp $ */
/*
* Copyright (c) 2013, 2014 Mark Kettenis
*
#endif
typedef struct mutex spinlock_t;
+#define DEFINE_SPINLOCK(x) struct mutex x
static inline void
spin_lock_irqsave(struct mutex *mtxp, __unused unsigned long flags)
-/* $OpenBSD: i915_drv.h,v 1.59 2015/04/11 02:24:43 jsg Exp $ */
+/* $OpenBSD: i915_drv.h,v 1.60 2015/04/11 05:10:13 jsg Exp $ */
/* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-
*/
/*
u32 pm_iir;
/* lock - irqsave spinlock that protectects the work_struct and
* pm_iir. */
- struct mutex lock;
+ spinlock_t lock;
/* The below variables an all the rps hw state are protected by
* dev->struct mutext. */
-/* $OpenBSD: i915_irq.c,v 1.22 2015/04/06 05:35:29 jsg Exp $ */
+/* $OpenBSD: i915_irq.c,v 1.23 2015/04/11 05:10:13 jsg Exp $ */
/* i915_irq.c -- IRQ support for the I915 -*- linux-c -*-
*/
/*
}
/* defined intel_pm.c */
-extern struct mutex mchdev_lock;
+extern spinlock_t mchdev_lock;
static void ironlake_handle_rps_change(struct drm_device *dev)
{
-/* $OpenBSD: intel_pm.c,v 1.30 2015/04/08 04:24:40 jsg Exp $ */
+/* $OpenBSD: intel_pm.c,v 1.31 2015/04/11 05:10:13 jsg Exp $ */
/*
* Copyright © 2012 Intel Corporation
*
/**
* Lock protecting IPS related data structures
*/
-struct mutex mchdev_lock;
+DEFINE_SPINLOCK(mchdev_lock);
/* Global for IPS driver to get at the current i915 device. Protected by
* mchdev_lock. */
-/* $OpenBSD: radeon.h,v 1.12 2015/04/06 07:38:49 jsg Exp $ */
+/* $OpenBSD: radeon.h,v 1.13 2015/04/11 05:10:13 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
struct radeon_irq {
bool installed;
- struct mutex lock;
+ spinlock_t lock;
atomic_t ring_int[RADEON_NUM_RINGS];
bool crtc_vblank_int[RADEON_MAX_CRTCS];
atomic_t pflip[RADEON_MAX_CRTCS];
bus_addr_t rmmio_base;
bus_size_t rmmio_size;
/* protects concurrent MM_INDEX/DATA based register access */
- struct mutex mmio_idx_lock;
+ spinlock_t mmio_idx_lock;
bus_space_handle_t rmmio;
radeon_rreg_t mc_rreg;
radeon_wreg_t mc_wreg;
-/* $OpenBSD: ttm_bo_manager.c,v 1.3 2015/02/10 10:50:49 jsg Exp $ */
+/* $OpenBSD: ttm_bo_manager.c,v 1.4 2015/04/11 05:10:13 jsg Exp $ */
/**************************************************************************
*
* Copyright (c) 2007-2010 VMware, Inc., Palo Alto, CA., USA
struct ttm_range_manager {
struct drm_mm mm;
- struct mutex lock;
+ spinlock_t lock;
};
static int ttm_bo_man_get_node(struct ttm_mem_type_manager *man,
-/* $OpenBSD: ttm_object.c,v 1.6 2015/02/12 06:52:11 jsg Exp $ */
+/* $OpenBSD: ttm_object.c,v 1.7 2015/04/11 05:10:13 jsg Exp $ */
/**************************************************************************
*
* Copyright (c) 2009 VMware, Inc., Palo Alto, CA., USA
*/
struct ttm_object_device {
- struct mutex object_lock;
+ spinlock_t object_lock;
struct drm_open_hash object_hash;
atomic_t object_count;
struct ttm_mem_global *mem_glob;
-/* $OpenBSD: ttm_page_alloc.c,v 1.8 2015/02/11 07:01:37 jsg Exp $ */
+/* $OpenBSD: ttm_page_alloc.c,v 1.9 2015/04/11 05:10:13 jsg Exp $ */
/*
* Copyright (c) Red Hat Inc.
* @npages: Number of pages in pool.
*/
struct ttm_page_pool {
- struct mutex lock;
+ spinlock_t lock;
bool fill_lock;
struct pglist list;
int ttm_page_alloc_flags;