summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-09-10 16:44:28 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-09-10 16:44:28 +0000
commite6d468ad7f398a72e8be227564f3a450de873cc6 (patch)
tree214046d093e641f91bfc8d962d7f9c303382488f /shared
parent1fb27632c3338ff974c27fd88e2098a5193bb145 (diff)
More general patch to mark resources in use by all DRM drivers. Makes the
code Linux specific.
Diffstat (limited to 'shared')
-rw-r--r--shared/radeon_cp.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/shared/radeon_cp.c b/shared/radeon_cp.c
index 1e87ff37..c5ff768a 100644
--- a/shared/radeon_cp.c
+++ b/shared/radeon_cp.c
@@ -1732,32 +1732,9 @@ int radeon_cp_buffers( DRM_IOCTL_ARGS )
return ret;
}
-static int radeon_register_regions(struct pci_dev *pdev) {
- int retcode = -EINVAL;
-
- /* request the mem regions */
- if (!request_mem_region (pci_resource_start( pdev, 2 ),
- pci_resource_len(pdev, 2), DRIVER_NAME)) {
- DRM_ERROR("cannot reserve MMIO region\n");
- return retcode;
- }
- if (!request_mem_region (pci_resource_start( pdev, 0 ),
- pci_resource_len(pdev, 0), DRIVER_NAME)) {
- DRM_ERROR("cannot reserve FB region\n");
- return retcode;
- }
- return 0;
-}
-
-static void radeon_release_regions(struct pci_dev *pdev) {
- release_mem_region (pci_resource_start( pdev, 2 ), pci_resource_len(pdev, 2));
- release_mem_region (pci_resource_start( pdev, 0 ), pci_resource_len(pdev, 0));
-}
-
/* Always create a map record for MMIO and FB memory, done from DRIVER_POSTINIT */
int radeon_preinit( struct drm_device *dev, unsigned long flags )
{
- int retcode = -EINVAL;
u32 save, temp;
drm_radeon_private_t *dev_priv;
@@ -1769,11 +1746,6 @@ int radeon_preinit( struct drm_device *dev, unsigned long flags )
dev->dev_private = (void *)dev_priv;
dev_priv->flags = flags;
- /* request the mem regions */
- if (!DRM(fb_loaded))
- if ((retcode = radeon_register_regions(dev->pdev)) != 0)
- return retcode;
-
/* There are signatures in BIOS and PCI-SSID for a PCI card, but they are not very reliable.
Following detection method works for all cards tested so far.
Note, checking AGP_ENABLE bit after drmAgpEnable call can also give the correct result.
@@ -1802,9 +1774,6 @@ int radeon_postcleanup( struct drm_device *dev )
DRM(free)( dev_priv, sizeof(*dev_priv), DRM_MEM_DRIVER );
- if (!DRM(fb_loaded))
- radeon_release_regions(dev->pdev);
-
dev->dev_private = NULL;
return 0;
}