summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-09-20 19:23:27 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-09-20 19:23:27 +0000
commit6f31c42fe923ff3f79a55d8c859e6ccfd3bd322d (patch)
tree62f1da478d0fd541eba121e9258b0d2623848983
parent59cc1d8256fb3b6e2374e52eb24da12b046aea91 (diff)
Remove size restriction on permanent addmap
-rw-r--r--linux-core/drm_bufs.c9
-rw-r--r--linux-core/drm_drv.c1
-rw-r--r--linux/drm_bufs.h9
-rw-r--r--linux/drm_drv.h1
-rw-r--r--shared-core/radeon_cp.c3
-rw-r--r--shared/radeon_cp.c3
6 files changed, 16 insertions, 10 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c
index 84ca1f47..f48ef6f1 100644
--- a/linux-core/drm_bufs.c
+++ b/linux-core/drm_bufs.c
@@ -182,11 +182,14 @@ int DRM(addmap)( struct inode *inode, struct file *filp,
/* If permanent maps are implemented, maps must match */
if (permanent_maps) {
+ DRM_DEBUG( "Looking for: offset = 0x%08lx, size = 0x%08lx, type = %d\n",
+ map->offset, map->size, map->type );
list_for_each( _list, &dev->maplist->head ) {
drm_map_list_t *_entry = list_entry( _list, drm_map_list_t, head );
- if ( _entry->map && _entry->map->type == map->type &&
- _entry->map->offset == map->offset &&
- _entry->map->size >= map->size ) {
+ DRM_DEBUG( "Checking: offset = 0x%08lx, size = 0x%08lx, type = %d\n",
+ _entry->map->offset, _entry->map->size, _entry->map->type );
+ if ( _entry->map && map->type == _entry->map->type &&
+ map->offset == _entry->map->offset ) {
DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
map = _entry->map;
DRM_DEBUG( "Found existing: offset = 0x%08lx, size = 0x%08lx, type = %d\n",
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 0e5524f4..dc3c96ef 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -979,6 +979,7 @@ int DRM(ioctl)( struct inode *inode, struct file *filp,
}
atomic_dec( &dev->ioctl_count );
+ if (retcode) DRM_DEBUG( "ret = %x\n", retcode);
return retcode;
}
diff --git a/linux/drm_bufs.h b/linux/drm_bufs.h
index 84ca1f47..f48ef6f1 100644
--- a/linux/drm_bufs.h
+++ b/linux/drm_bufs.h
@@ -182,11 +182,14 @@ int DRM(addmap)( struct inode *inode, struct file *filp,
/* If permanent maps are implemented, maps must match */
if (permanent_maps) {
+ DRM_DEBUG( "Looking for: offset = 0x%08lx, size = 0x%08lx, type = %d\n",
+ map->offset, map->size, map->type );
list_for_each( _list, &dev->maplist->head ) {
drm_map_list_t *_entry = list_entry( _list, drm_map_list_t, head );
- if ( _entry->map && _entry->map->type == map->type &&
- _entry->map->offset == map->offset &&
- _entry->map->size >= map->size ) {
+ DRM_DEBUG( "Checking: offset = 0x%08lx, size = 0x%08lx, type = %d\n",
+ _entry->map->offset, _entry->map->size, _entry->map->type );
+ if ( _entry->map && map->type == _entry->map->type &&
+ map->offset == _entry->map->offset ) {
DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
map = _entry->map;
DRM_DEBUG( "Found existing: offset = 0x%08lx, size = 0x%08lx, type = %d\n",
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 0e5524f4..dc3c96ef 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -979,6 +979,7 @@ int DRM(ioctl)( struct inode *inode, struct file *filp,
}
atomic_dec( &dev->ioctl_count );
+ if (retcode) DRM_DEBUG( "ret = %x\n", retcode);
return retcode;
}
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index 27a1beb0..b1b9bf6e 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -1743,9 +1743,8 @@ int radeon_preinit( struct drm_device *dev, unsigned long flags )
dev_priv->flags = flags;
/* registers */
- /* PCI space is twice the real size, so that you can have a RW and RO mapping */
if( (ret = DRM(initmap)( dev, pci_resource_start( dev->pdev, 2 ),
- pci_resource_len( dev->pdev, 2 ) / 2, _DRM_REGISTERS, 0 )))
+ pci_resource_len( dev->pdev, 2 ), _DRM_REGISTERS, 0 )))
return ret;
/* framebuffer */
diff --git a/shared/radeon_cp.c b/shared/radeon_cp.c
index 27a1beb0..b1b9bf6e 100644
--- a/shared/radeon_cp.c
+++ b/shared/radeon_cp.c
@@ -1743,9 +1743,8 @@ int radeon_preinit( struct drm_device *dev, unsigned long flags )
dev_priv->flags = flags;
/* registers */
- /* PCI space is twice the real size, so that you can have a RW and RO mapping */
if( (ret = DRM(initmap)( dev, pci_resource_start( dev->pdev, 2 ),
- pci_resource_len( dev->pdev, 2 ) / 2, _DRM_REGISTERS, 0 )))
+ pci_resource_len( dev->pdev, 2 ), _DRM_REGISTERS, 0 )))
return ret;
/* framebuffer */