diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2003-07-08 17:10:13 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2003-07-08 17:10:13 +0000 |
commit | 2daf14765214c50088c16e3538d24e157578d000 (patch) | |
tree | 1bf6499e7ce1b715a937f9d5ffbd032fd8182e7d | |
parent | 39e1c534c0730e451062a9dbcbdf5ab95d1c5c50 (diff) |
Removed unused __HAVE_KERNEL_CTX_SWITCH, whatever that was.
-rw-r--r-- | linux-core/drm_drv.c | 39 | ||||
-rw-r--r-- | linux/drm_drv.h | 39 |
2 files changed, 6 insertions, 72 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 90c2d18b..30a6b6e4 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -88,9 +88,6 @@ #ifndef __HAVE_SG #define __HAVE_SG 0 #endif -#ifndef __HAVE_KERNEL_CTX_SWITCH -#define __HAVE_KERNEL_CTX_SWITCH 0 -#endif #ifndef __HAVE_DRIVER_FOPS_READ #define __HAVE_DRIVER_FOPS_READ 0 #endif @@ -1108,12 +1105,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" ); @@ -1150,40 +1141,16 @@ 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 DRM(dma_schedule)( dev, 1 ); #endif - /* FIXME: Do we ever really need to check this??? - */ - if ( 1 /* !dev->context_flag */ ) { - if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock, - DRM_KERNEL_CONTEXT ) ) { - DRM_ERROR( "\n" ); - } + if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock, + DRM_KERNEL_CONTEXT ) ) { + DRM_ERROR( "\n" ); } -#endif /* !__HAVE_KERNEL_CTX_SWITCH */ unblock_all_signals(); return 0; diff --git a/linux/drm_drv.h b/linux/drm_drv.h index 90c2d18b..30a6b6e4 100644 --- a/linux/drm_drv.h +++ b/linux/drm_drv.h @@ -88,9 +88,6 @@ #ifndef __HAVE_SG #define __HAVE_SG 0 #endif -#ifndef __HAVE_KERNEL_CTX_SWITCH -#define __HAVE_KERNEL_CTX_SWITCH 0 -#endif #ifndef __HAVE_DRIVER_FOPS_READ #define __HAVE_DRIVER_FOPS_READ 0 #endif @@ -1108,12 +1105,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" ); @@ -1150,40 +1141,16 @@ 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 DRM(dma_schedule)( dev, 1 ); #endif - /* FIXME: Do we ever really need to check this??? - */ - if ( 1 /* !dev->context_flag */ ) { - if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock, - DRM_KERNEL_CONTEXT ) ) { - DRM_ERROR( "\n" ); - } + if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock, + DRM_KERNEL_CONTEXT ) ) { + DRM_ERROR( "\n" ); } -#endif /* !__HAVE_KERNEL_CTX_SWITCH */ unblock_all_signals(); return 0; |