summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-11-06 14:25:22 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-11-06 14:25:22 +0000
commitabf5f1d4b7d40778eb2602b330302040dc5779c0 (patch)
treeb18a402fbc01a15743d1e7aa124ca971e6eb743d /sys/dev/pci
parentfa394b24c2e8f15ecab7e5c278cb1dfa0169dc47 (diff)
Remove the drm_locked_tasklet interface. The only consumer that used it
was the i915 vblank swap ioctl, which just went kaput.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/drm_drv.c1
-rw-r--r--sys/dev/pci/drm/drm_irq.c44
-rw-r--r--sys/dev/pci/drm/drm_lock.c8
3 files changed, 0 insertions, 53 deletions
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c
index ce21f383d5a..367c317f7f7 100644
--- a/sys/dev/pci/drm/drm_drv.c
+++ b/sys/dev/pci/drm/drm_drv.c
@@ -203,7 +203,6 @@ drm_attach(struct device *parent, struct device *kdev,
rw_init(&dev->dev_lock, "drmdevlk");
mtx_init(&dev->drw_lock, IPL_NONE);
- mtx_init(&dev->tsk_lock, IPL_BIO);
mtx_init(&dev->lock.spinlock, IPL_NONE);
id_entry = drm_find_description(PCI_VENDOR(pa->pa_id),
diff --git a/sys/dev/pci/drm/drm_irq.c b/sys/dev/pci/drm/drm_irq.c
index 2e749dc58d6..c2afd1a3972 100644
--- a/sys/dev/pci/drm/drm_irq.c
+++ b/sys/dev/pci/drm/drm_irq.c
@@ -36,7 +36,6 @@
#include "drm.h"
irqreturn_t drm_irq_handler_wrap(DRM_IRQ_ARGS);
-void drm_locked_task(void *, void *);
void drm_update_vblank_count(struct drm_device *, int);
void vblank_disable(void *);
@@ -404,46 +403,3 @@ drm_handle_vblank(struct drm_device *dev, int crtc)
atomic_inc(&dev->vblank[crtc].vbl_count);
wakeup(&dev->vblank[crtc]);
}
-
-void
-drm_locked_task(void *context, void *pending)
-{
- struct drm_device *dev = context;
- void (*func)(struct drm_device *);
-
- DRM_SPINLOCK(&dev->tsk_lock);
- mtx_enter(&dev->lock.spinlock);
- func = dev->locked_task_call;
- if (func == NULL ||
- drm_lock_take(&dev->lock, DRM_KERNEL_CONTEXT) == 0) {
- mtx_leave(&dev->lock.spinlock);
- DRM_SPINUNLOCK(&dev->tsk_lock);
- return;
- }
-
- dev->lock.file_priv = NULL; /* kernel owned */
- dev->lock.lock_time = jiffies;
- mtx_leave(&dev->lock.spinlock);
- dev->locked_task_call = NULL;
- DRM_SPINUNLOCK(&dev->tsk_lock);
-
- (*func)(dev);
-
- drm_lock_free(&dev->lock, DRM_KERNEL_CONTEXT);
-}
-
-void
-drm_locked_tasklet(struct drm_device *dev, void (*tasklet)(struct drm_device *))
-{
- DRM_SPINLOCK(&dev->tsk_lock);
- if (dev->locked_task_call != NULL) {
- DRM_SPINUNLOCK(&dev->tsk_lock);
- return;
- }
-
- dev->locked_task_call = tasklet;
- DRM_SPINUNLOCK(&dev->tsk_lock);
-
- if (workq_add_task(NULL, 0, drm_locked_task, dev, NULL) == ENOMEM)
- DRM_ERROR("error adding task to workq\n");
-}
diff --git a/sys/dev/pci/drm/drm_lock.c b/sys/dev/pci/drm/drm_lock.c
index 17552372f37..d949de2ef38 100644
--- a/sys/dev/pci/drm/drm_lock.c
+++ b/sys/dev/pci/drm/drm_lock.c
@@ -154,7 +154,6 @@ int
drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
struct drm_lock *lock = data;
- void (*func)(struct drm_device *);
if (lock->context == DRM_KERNEL_CONTEXT) {
DRM_ERROR("Process %d using kernel context %d\n",
@@ -168,13 +167,6 @@ drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
_DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock) != lock->context)
return EINVAL;
- mtx_enter(&dev->tsk_lock);
- func = dev->locked_task_call;
- dev->locked_task_call = NULL;
- mtx_leave(&dev->tsk_lock);
- if (func != NULL)
- (*func)(dev);
-
if (drm_lock_free(&dev->lock, lock->context)) {
DRM_ERROR("\n");
}