summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2009-02-24 00:22:56 -0600
committerRobert Noland <rnoland@2hip.net>2009-02-24 00:22:56 -0600
commit1c381092a310af9b1b39b3a983ad5760b71a9025 (patch)
tree4d477ca61a0bf99f0714946026878f4440cd6e94 /bsd-core
parent9f94e39f0d5bed48d5ea56767cd92a2509908df0 (diff)
FreeBSD: Rip out the locked task support now that i915 no longer uses it.
Diffstat (limited to 'bsd-core')
-rw-r--r--bsd-core/drmP.h7
-rw-r--r--bsd-core/drm_drv.c4
-rw-r--r--bsd-core/drm_irq.c46
-rw-r--r--bsd-core/drm_lock.c7
4 files changed, 0 insertions, 64 deletions
diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h
index f6739cb0..73487451 100644
--- a/bsd-core/drmP.h
+++ b/bsd-core/drmP.h
@@ -60,7 +60,6 @@ struct drm_file;
#include <sys/signalvar.h>
#include <sys/poll.h>
#include <sys/tree.h>
-#include <sys/taskqueue.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <vm/vm_extern.h>
@@ -631,7 +630,6 @@ struct drm_device {
struct mtx irq_lock; /* protects irq condition checks */
struct mtx dev_lock; /* protects everything else */
DRM_SPINTYPE drw_lock;
- DRM_SPINTYPE tsk_lock;
/* Usage Counters */
int open_count; /* Outstanding files open */
@@ -698,9 +696,6 @@ struct drm_device {
struct unrhdr *drw_unrhdr;
/* RB tree of drawable infos */
RB_HEAD(drawable_tree, bsd_drm_drawable_info) drw_head;
-
- struct task locked_task;
- void (*locked_task_call)(struct drm_device *dev);
};
static __inline__ int drm_core_check_feature(struct drm_device *dev,
@@ -921,8 +916,6 @@ int drm_control(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int drm_wait_vblank(struct drm_device *dev, void *data,
struct drm_file *file_priv);
-void drm_locked_tasklet(struct drm_device *dev,
- void (*tasklet)(struct drm_device *dev));
/* AGP/GART support (drm_agpsupport.c) */
int drm_agp_acquire_ioctl(struct drm_device *dev, void *data,
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index fc8e8149..f4123b9b 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -186,7 +186,6 @@ int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist)
mtx_init(&dev->irq_lock, "drmirq", NULL, MTX_DEF);
mtx_init(&dev->vbl_lock, "drmvbl", NULL, MTX_DEF);
mtx_init(&dev->drw_lock, "drmdrw", NULL, MTX_DEF);
- mtx_init(&dev->tsk_lock, "drmtsk", NULL, MTX_DEF);
id_entry = drm_find_description(pci_get_vendor(dev->device),
pci_get_device(dev->device), idlist);
@@ -433,7 +432,6 @@ error:
DRM_UNLOCK();
destroy_dev(dev->devnode);
- mtx_destroy(&dev->tsk_lock);
mtx_destroy(&dev->drw_lock);
mtx_destroy(&dev->vbl_lock);
mtx_destroy(&dev->irq_lock);
@@ -496,14 +494,12 @@ static void drm_unload(struct drm_device *dev)
if (pci_disable_busmaster(dev->device))
DRM_ERROR("Request to disable bus-master failed.\n");
- mtx_destroy(&dev->tsk_lock);
mtx_destroy(&dev->drw_lock);
mtx_destroy(&dev->vbl_lock);
mtx_destroy(&dev->irq_lock);
mtx_destroy(&dev->dev_lock);
}
-
int drm_version(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
struct drm_version *version = data;
diff --git a/bsd-core/drm_irq.c b/bsd-core/drm_irq.c
index 5e99bb33..afa3fadb 100644
--- a/bsd-core/drm_irq.c
+++ b/bsd-core/drm_irq.c
@@ -33,8 +33,6 @@
#include "drmP.h"
#include "drm.h"
-static void drm_locked_task(void *context, int pending __unused);
-
int drm_irq_by_busid(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
@@ -195,7 +193,6 @@ int drm_irq_install(struct drm_device *dev)
dev->driver->irq_postinstall(dev);
DRM_UNLOCK();
- TASK_INIT(&dev->locked_task, 0, drm_locked_task, dev);
return 0;
err:
DRM_LOCK();
@@ -504,46 +501,3 @@ void drm_handle_vblank(struct drm_device *dev, int crtc)
drm_vbl_send_signals(dev, crtc);
}
-static void drm_locked_task(void *context, int pending __unused)
-{
- struct drm_device *dev = context;
-
- DRM_SPINLOCK(&dev->tsk_lock);
-
- DRM_LOCK(); /* XXX drm_lock_take() should do it's own locking */
- if (dev->locked_task_call == NULL ||
- drm_lock_take(&dev->lock, DRM_KERNEL_CONTEXT) == 0) {
- DRM_UNLOCK();
- DRM_SPINUNLOCK(&dev->tsk_lock);
- return;
- }
-
- dev->lock.file_priv = NULL; /* kernel owned */
- dev->lock.lock_time = jiffies;
- atomic_inc(&dev->counts[_DRM_STAT_LOCKS]);
-
- DRM_UNLOCK();
-
- dev->locked_task_call(dev);
-
- drm_lock_free(&dev->lock, DRM_KERNEL_CONTEXT);
-
- dev->locked_task_call = NULL;
-
- DRM_SPINUNLOCK(&dev->tsk_lock);
-}
-
-void
-drm_locked_tasklet(struct drm_device *dev,
- void (*tasklet)(struct drm_device *dev))
-{
- 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);
- taskqueue_enqueue(taskqueue_swi, &dev->locked_task);
-}
diff --git a/bsd-core/drm_lock.c b/bsd-core/drm_lock.c
index dec7281a..94b3f8bb 100644
--- a/bsd-core/drm_lock.c
+++ b/bsd-core/drm_lock.c
@@ -112,13 +112,6 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
return EINVAL;
}
- DRM_SPINLOCK(&dev->tsk_lock);
- if (dev->locked_task_call != NULL) {
- dev->locked_task_call(dev);
- dev->locked_task_call = NULL;
- }
- DRM_SPINUNLOCK(&dev->tsk_lock);
-
atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]);
DRM_LOCK();