Commit e9f1867d authored by Linus Torvalds's avatar Linus Torvalds

Merge with DRI CVS tree - which added a reminder to the DRI

people not to remove the HAVE_KERNEL_CTX_SWITCH support that
the sparc drivers require.

Fix a FIXME.
parent 51544df2
...@@ -88,6 +88,10 @@ ...@@ -88,6 +88,10 @@
#ifndef __HAVE_SG #ifndef __HAVE_SG
#define __HAVE_SG 0 #define __HAVE_SG 0
#endif #endif
/* __HAVE_KERNEL_CTX_SWITCH isn't used by any of the drm modules in
* the DRI cvs tree, but it is required by the kernel tree's sparc
* driver.
*/
#ifndef __HAVE_KERNEL_CTX_SWITCH #ifndef __HAVE_KERNEL_CTX_SWITCH
#define __HAVE_KERNEL_CTX_SWITCH 0 #define __HAVE_KERNEL_CTX_SWITCH 0
#endif #endif
...@@ -1108,6 +1112,10 @@ int DRM(lock)( struct inode *inode, struct file *filp, ...@@ -1108,6 +1112,10 @@ int DRM(lock)( struct inode *inode, struct file *filp,
DRIVER_DMA_QUIESCENT(); DRIVER_DMA_QUIESCENT();
} }
#endif #endif
/* __HAVE_KERNEL_CTX_SWITCH isn't used by any of the
* drm modules in the DRI cvs tree, but it is required
* by the Sparc driver.
*/
#if __HAVE_KERNEL_CTX_SWITCH #if __HAVE_KERNEL_CTX_SWITCH
if ( dev->last_context != lock.context ) { if ( dev->last_context != lock.context ) {
DRM(context_switch)(dev, dev->last_context, DRM(context_switch)(dev, dev->last_context,
...@@ -1150,6 +1158,10 @@ int DRM(unlock)( struct inode *inode, struct file *filp, ...@@ -1150,6 +1158,10 @@ int DRM(unlock)( struct inode *inode, struct file *filp,
atomic_inc( &dev->counts[_DRM_STAT_UNLOCKS] ); atomic_inc( &dev->counts[_DRM_STAT_UNLOCKS] );
/* __HAVE_KERNEL_CTX_SWITCH isn't used by any of the drm
* modules in the DRI cvs tree, but it is required by the
* Sparc driver.
*/
#if __HAVE_KERNEL_CTX_SWITCH #if __HAVE_KERNEL_CTX_SWITCH
/* We no longer really hold it, but if we are the next /* We no longer really hold it, but if we are the next
* agent to request it then we should just be able to * agent to request it then we should just be able to
...@@ -1175,14 +1187,10 @@ int DRM(unlock)( struct inode *inode, struct file *filp, ...@@ -1175,14 +1187,10 @@ int DRM(unlock)( struct inode *inode, struct file *filp,
DRM(dma_schedule)( dev, 1 ); DRM(dma_schedule)( dev, 1 );
#endif #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, if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock,
DRM_KERNEL_CONTEXT ) ) { DRM_KERNEL_CONTEXT ) ) {
DRM_ERROR( "\n" ); DRM_ERROR( "\n" );
} }
}
#endif /* !__HAVE_KERNEL_CTX_SWITCH */ #endif /* !__HAVE_KERNEL_CTX_SWITCH */
unblock_all_signals(); unblock_all_signals();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment