summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-04-22 11:39:34 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-04-22 11:39:34 +0000
commitaba6bf7eb3cd53137fab4424ff39e2d68b83dc2a (patch)
tree31c5674f08740e06337f741756eac4b0282738c3 /linux-core
parenta1780925fb461c736bae7e51de0d3a1e909548f2 (diff)
remove unused __HAVE_KERNEL_CTX_SWITCH code
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_drv.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 78cd3782c..3d369b286 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -84,9 +84,6 @@
#ifndef __HAVE_SG
#define __HAVE_SG 0
#endif
-#ifndef __HAVE_KERNEL_CTX_SWITCH
-#define __HAVE_KERNEL_CTX_SWITCH 0
-#endif
#ifndef DRIVER_PREINIT
#define DRIVER_PREINIT()
@@ -1006,12 +1003,6 @@ int DRM(lock)( struct inode *inode, struct file *filp,
DRIVER_DMA_QUIESCENT();
}
#endif
-#if __HAVE_KERNEL_CTX_SWITCH
- if ( dev->last_context != lock.context ) {
- DRM(context_switch)(dev, dev->last_context,
- lock.context);
- }
-#endif
}
DRM_DEBUG( "%d %s\n", lock.context, ret ? "interrupted" : "has lock" );
@@ -1038,25 +1029,6 @@ int DRM(unlock)( struct inode *inode, struct file *filp,
atomic_inc( &dev->counts[_DRM_STAT_UNLOCKS] );
-#if __HAVE_KERNEL_CTX_SWITCH
- /* We no longer really hold it, but if we are the next
- * agent to request it then we should just be able to
- * take it immediately and not eat the ioctl.
- */
- dev->lock.filp = 0;
- {
- __volatile__ unsigned int *plock = &dev->lock.hw_lock->lock;
- unsigned int old, new, prev, ctx;
-
- ctx = lock.context;
- do {
- old = *plock;
- new = ctx;
- prev = cmpxchg(plock, old, new);
- } while (prev != old);
- }
- wake_up_interruptible(&dev->lock.lock_queue);
-#else
DRM(lock_transfer)( dev, &dev->lock.hw_lock->lock,
DRM_KERNEL_CONTEXT );
#if __HAVE_DMA_SCHEDULE
@@ -1071,7 +1043,6 @@ int DRM(unlock)( struct inode *inode, struct file *filp,
DRM_ERROR( "\n" );
}
}
-#endif /* !__HAVE_KERNEL_CTX_SWITCH */
unblock_all_signals();
return 0;