git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
drivers
/
char
/
drm
/
drm_bufs.h
diff --git
a/drivers/char/drm/drm_bufs.h
b/drivers/char/drm/drm_bufs.h
index
e4cce8d
..
a0361c0
100644
(file)
--- a/
drivers/char/drm/drm_bufs.h
+++ b/
drivers/char/drm/drm_bufs.h
@@
-147,7
+147,9
@@
int DRM(addmap)( struct inode *inode, struct file *filp,
MTRR_TYPE_WRCOMB, 1 );
}
#endif
MTRR_TYPE_WRCOMB, 1 );
}
#endif
- map->handle = DRM(ioremap)( map->offset, map->size, dev );
+ if (map->type == _DRM_REGISTERS)
+ map->handle = DRM(ioremap)( map->offset, map->size,
+ dev );
break;
case _DRM_SHM:
break;
case _DRM_SHM:
@@
-160,6
+162,12
@@
int DRM(addmap)( struct inode *inode, struct file *filp,
}
map->offset = (unsigned long)map->handle;
if ( map->flags & _DRM_CONTAINS_LOCK ) {
}
map->offset = (unsigned long)map->handle;
if ( map->flags & _DRM_CONTAINS_LOCK ) {
+ /* Prevent a 2nd X Server from creating a 2nd lock */
+ if (dev->lock.hw_lock != NULL) {
+ vfree( map->handle );
+ DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
+ return -EBUSY;
+ }
dev->sigdata.lock =
dev->lock.hw_lock = map->handle; /* Pointer to lock */
}
dev->sigdata.lock =
dev->lock.hw_lock = map->handle; /* Pointer to lock */
}
@@
-767,7
+775,7
@@
int DRM(addbufs_pci)( struct inode *inode, struct file *filp,
}
#endif /* __HAVE_PCI_DMA */
}
#endif /* __HAVE_PCI_DMA */
-#if
def
__HAVE_SG
+#if __HAVE_SG
int DRM(addbufs_sg)( struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg )
{
int DRM(addbufs_sg)( struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg )
{