From a4cddc6596b30dfa781eb7803de5b60aca50f112 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 3 Jun 2007 18:12:28 +1000 Subject: Revert "drm: add new drm_wait_on function to replace macro" This reverts commit 6e860d08d0f5b1e9a2d711aaf9fd6b982aa8039e. As I said not a good plan - this macro will have to stay for now, trying to do the vbl code with the inline was a bit messy - may need specialised drm wait on functions --- linux-core/drmP.h | 4 +--- linux-core/drm_drv.c | 28 ---------------------------- 2 files changed, 1 insertion(+), 31 deletions(-) (limited to 'linux-core') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index f988db35..94cb4eee 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -1130,9 +1130,7 @@ extern struct drm_sysfs_class *drm_class; extern struct proc_dir_entry *drm_proc_root; extern drm_local_map_t *drm_getsarea(struct drm_device *dev); -extern int drm_wait_on(drm_device_t *dev, wait_queue_head_t *queue, - int timeout, int (*fn)(drm_device_t *dev, void *priv), - void *priv); + /* Proc support (drm_proc.h) */ extern int drm_proc_init(drm_device_t * dev, int minor, diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index f64959fb..1695a792 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -610,34 +610,6 @@ err_i1: } EXPORT_SYMBOL(drm_ioctl); -int drm_wait_on(drm_device_t *dev, wait_queue_head_t *queue, int timeout, - int (*fn)(drm_device_t *dev, void *priv), void *priv) -{ - DECLARE_WAITQUEUE(entry, current); - unsigned long end = jiffies + (timeout); - int ret = 0; - add_wait_queue(queue, &entry); - - for (;;) { - __set_current_state(TASK_INTERRUPTIBLE); - if ((*fn)(dev, priv)) - break; - if (time_after_eq(jiffies, end)) { - ret = -EBUSY; - break; - } - schedule_timeout((HZ/100 > 1) ? HZ/100 : 1); - if (signal_pending(current)) { - ret = -EINTR; - break; - } - } - __set_current_state(TASK_RUNNING); - remove_wait_queue(queue, &entry); - return ret; -} -EXPORT_SYMBOL(drm_wait_on); - drm_local_map_t *drm_getsarea(struct drm_device *dev) { drm_map_list_t *entry; -- cgit v1.2.3