summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */