aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/radeon_cp.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-09-21 14:25:09 -0400
committerDave Airlie <airlied@linux.ie>2006-09-21 15:32:34 -0400
commit54a56ac583ac66f3f4bc2c4cc3ef9b0676770742 (patch)
tree7aeb381e897c6b247c1836788b1feb10a8048f74 /drivers/char/drm/radeon_cp.c
parent2f02cc3fb8960754a2a5df6a33f53528e0d830be (diff)
drm: use radeon specific names for radeon flags
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/radeon_cp.c')
-rw-r--r--drivers/char/drm/radeon_cp.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c
index 2b5efa306ad7..5ed965688293 100644
--- a/drivers/char/drm/radeon_cp.c
+++ b/drivers/char/drm/radeon_cp.c
@@ -1130,7 +1130,7 @@ static void radeon_cp_init_ring_buffer(drm_device_t * dev,
1130 | (dev_priv->fb_location >> 16)); 1130 | (dev_priv->fb_location >> 16));
1131 1131
1132#if __OS_HAS_AGP 1132#if __OS_HAS_AGP
1133 if (dev_priv->flags & CHIP_IS_AGP) { 1133 if (dev_priv->flags & RADEON_IS_AGP) {
1134 RADEON_WRITE(RADEON_AGP_BASE, (unsigned int)dev->agp->base); 1134 RADEON_WRITE(RADEON_AGP_BASE, (unsigned int)dev->agp->base);
1135 RADEON_WRITE(RADEON_MC_AGP_LOCATION, 1135 RADEON_WRITE(RADEON_MC_AGP_LOCATION,
1136 (((dev_priv->gart_vm_start - 1 + 1136 (((dev_priv->gart_vm_start - 1 +
@@ -1158,7 +1158,7 @@ static void radeon_cp_init_ring_buffer(drm_device_t * dev,
1158 dev_priv->ring.tail = cur_read_ptr; 1158 dev_priv->ring.tail = cur_read_ptr;
1159 1159
1160#if __OS_HAS_AGP 1160#if __OS_HAS_AGP
1161 if (dev_priv->flags & CHIP_IS_AGP) { 1161 if (dev_priv->flags & RADEON_IS_AGP) {
1162 RADEON_WRITE(RADEON_CP_RB_RPTR_ADDR, 1162 RADEON_WRITE(RADEON_CP_RB_RPTR_ADDR,
1163 dev_priv->ring_rptr->offset 1163 dev_priv->ring_rptr->offset
1164 - dev->agp->base + dev_priv->gart_vm_start); 1164 - dev->agp->base + dev_priv->gart_vm_start);
@@ -1302,7 +1302,7 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on)
1302{ 1302{
1303 u32 tmp; 1303 u32 tmp;
1304 1304
1305 if (dev_priv->flags & CHIP_IS_PCIE) { 1305 if (dev_priv->flags & RADEON_IS_PCIE) {
1306 radeon_set_pciegart(dev_priv, on); 1306 radeon_set_pciegart(dev_priv, on);
1307 return; 1307 return;
1308 } 1308 }
@@ -1340,22 +1340,22 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
1340 DRM_DEBUG("\n"); 1340 DRM_DEBUG("\n");
1341 1341
1342 /* if we require new memory map but we don't have it fail */ 1342 /* if we require new memory map but we don't have it fail */
1343 if ((dev_priv->flags & CHIP_NEW_MEMMAP) && !dev_priv->new_memmap) { 1343 if ((dev_priv->flags & RADEON_NEW_MEMMAP) && !dev_priv->new_memmap) {
1344 DRM_ERROR("Cannot initialise DRM on this card\nThis card requires a new X.org DDX for 3D\n"); 1344 DRM_ERROR("Cannot initialise DRM on this card\nThis card requires a new X.org DDX for 3D\n");
1345 radeon_do_cleanup_cp(dev); 1345 radeon_do_cleanup_cp(dev);
1346 return DRM_ERR(EINVAL); 1346 return DRM_ERR(EINVAL);
1347 } 1347 }
1348 1348
1349 if (init->is_pci && (dev_priv->flags & CHIP_IS_AGP)) { 1349 if (init->is_pci && (dev_priv->flags & RADEON_IS_AGP)) {
1350 DRM_DEBUG("Forcing AGP card to PCI mode\n"); 1350 DRM_DEBUG("Forcing AGP card to PCI mode\n");
1351 dev_priv->flags &= ~CHIP_IS_AGP; 1351 dev_priv->flags &= ~RADEON_IS_AGP;
1352 } else if (!(dev_priv->flags & (CHIP_IS_AGP | CHIP_IS_PCI | CHIP_IS_PCIE)) 1352 } else if (!(dev_priv->flags & (RADEON_IS_AGP | RADEON_IS_PCI | RADEON_IS_PCIE))
1353 && !init->is_pci) { 1353 && !init->is_pci) {
1354 DRM_DEBUG("Restoring AGP flag\n"); 1354 DRM_DEBUG("Restoring AGP flag\n");
1355 dev_priv->flags |= CHIP_IS_AGP; 1355 dev_priv->flags |= RADEON_IS_AGP;
1356 } 1356 }
1357 1357
1358 if ((!(dev_priv->flags & CHIP_IS_AGP)) && !dev->sg) { 1358 if ((!(dev_priv->flags & RADEON_IS_AGP)) && !dev->sg) {
1359 DRM_ERROR("PCI GART memory not allocated!\n"); 1359 DRM_ERROR("PCI GART memory not allocated!\n");
1360 radeon_do_cleanup_cp(dev); 1360 radeon_do_cleanup_cp(dev);
1361 return DRM_ERR(EINVAL); 1361 return DRM_ERR(EINVAL);
@@ -1498,7 +1498,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
1498 init->sarea_priv_offset); 1498 init->sarea_priv_offset);
1499 1499
1500#if __OS_HAS_AGP 1500#if __OS_HAS_AGP
1501 if (dev_priv->flags & CHIP_IS_AGP) { 1501 if (dev_priv->flags & RADEON_IS_AGP) {
1502 drm_core_ioremap(dev_priv->cp_ring, dev); 1502 drm_core_ioremap(dev_priv->cp_ring, dev);
1503 drm_core_ioremap(dev_priv->ring_rptr, dev); 1503 drm_core_ioremap(dev_priv->ring_rptr, dev);
1504 drm_core_ioremap(dev->agp_buffer_map, dev); 1504 drm_core_ioremap(dev->agp_buffer_map, dev);
@@ -1557,7 +1557,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
1557 * align it down. 1557 * align it down.
1558 */ 1558 */
1559#if __OS_HAS_AGP 1559#if __OS_HAS_AGP
1560 if (dev_priv->flags & CHIP_IS_AGP) { 1560 if (dev_priv->flags & RADEON_IS_AGP) {
1561 base = dev->agp->base; 1561 base = dev->agp->base;
1562 /* Check if valid */ 1562 /* Check if valid */
1563 if ((base + dev_priv->gart_size) > dev_priv->fb_location && 1563 if ((base + dev_priv->gart_size) > dev_priv->fb_location &&
@@ -1587,7 +1587,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
1587 } 1587 }
1588 1588
1589#if __OS_HAS_AGP 1589#if __OS_HAS_AGP
1590 if (dev_priv->flags & CHIP_IS_AGP) 1590 if (dev_priv->flags & RADEON_IS_AGP)
1591 dev_priv->gart_buffers_offset = (dev->agp_buffer_map->offset 1591 dev_priv->gart_buffers_offset = (dev->agp_buffer_map->offset
1592 - dev->agp->base 1592 - dev->agp->base
1593 + dev_priv->gart_vm_start); 1593 + dev_priv->gart_vm_start);
@@ -1613,7 +1613,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
1613 dev_priv->ring.high_mark = RADEON_RING_HIGH_MARK; 1613 dev_priv->ring.high_mark = RADEON_RING_HIGH_MARK;
1614 1614
1615#if __OS_HAS_AGP 1615#if __OS_HAS_AGP
1616 if (dev_priv->flags & CHIP_IS_AGP) { 1616 if (dev_priv->flags & RADEON_IS_AGP) {
1617 /* Turn off PCI GART */ 1617 /* Turn off PCI GART */
1618 radeon_set_pcigart(dev_priv, 0); 1618 radeon_set_pcigart(dev_priv, 0);
1619 } else 1619 } else
@@ -1633,7 +1633,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
1633 dev_priv->gart_info.mapping.handle; 1633 dev_priv->gart_info.mapping.handle;
1634 1634
1635 dev_priv->gart_info.is_pcie = 1635 dev_priv->gart_info.is_pcie =
1636 !!(dev_priv->flags & CHIP_IS_PCIE); 1636 !!(dev_priv->flags & RADEON_IS_PCIE);
1637 dev_priv->gart_info.gart_table_location = 1637 dev_priv->gart_info.gart_table_location =
1638 DRM_ATI_GART_FB; 1638 DRM_ATI_GART_FB;
1639 1639
@@ -1645,7 +1645,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
1645 DRM_ATI_GART_MAIN; 1645 DRM_ATI_GART_MAIN;
1646 dev_priv->gart_info.addr = NULL; 1646 dev_priv->gart_info.addr = NULL;
1647 dev_priv->gart_info.bus_addr = 0; 1647 dev_priv->gart_info.bus_addr = 0;
1648 if (dev_priv->flags & CHIP_IS_PCIE) { 1648 if (dev_priv->flags & RADEON_IS_PCIE) {
1649 DRM_ERROR 1649 DRM_ERROR
1650 ("Cannot use PCI Express without GART in FB memory\n"); 1650 ("Cannot use PCI Express without GART in FB memory\n");
1651 radeon_do_cleanup_cp(dev); 1651 radeon_do_cleanup_cp(dev);
@@ -1687,7 +1687,7 @@ static int radeon_do_cleanup_cp(drm_device_t * dev)
1687 drm_irq_uninstall(dev); 1687 drm_irq_uninstall(dev);
1688 1688
1689#if __OS_HAS_AGP 1689#if __OS_HAS_AGP
1690 if (dev_priv->flags & CHIP_IS_AGP) { 1690 if (dev_priv->flags & RADEON_IS_AGP) {
1691 if (dev_priv->cp_ring != NULL) { 1691 if (dev_priv->cp_ring != NULL) {
1692 drm_core_ioremapfree(dev_priv->cp_ring, dev); 1692 drm_core_ioremapfree(dev_priv->cp_ring, dev);
1693 dev_priv->cp_ring = NULL; 1693 dev_priv->cp_ring = NULL;
@@ -1742,7 +1742,7 @@ static int radeon_do_resume_cp(drm_device_t * dev)
1742 DRM_DEBUG("Starting radeon_do_resume_cp()\n"); 1742 DRM_DEBUG("Starting radeon_do_resume_cp()\n");
1743 1743
1744#if __OS_HAS_AGP 1744#if __OS_HAS_AGP
1745 if (dev_priv->flags & CHIP_IS_AGP) { 1745 if (dev_priv->flags & RADEON_IS_AGP) {
1746 /* Turn off PCI GART */ 1746 /* Turn off PCI GART */
1747 radeon_set_pcigart(dev_priv, 0); 1747 radeon_set_pcigart(dev_priv, 0);
1748 } else 1748 } else
@@ -2186,7 +2186,7 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags)
2186 dev->dev_private = (void *)dev_priv; 2186 dev->dev_private = (void *)dev_priv;
2187 dev_priv->flags = flags; 2187 dev_priv->flags = flags;
2188 2188
2189 switch (flags & CHIP_FAMILY_MASK) { 2189 switch (flags & RADEON_FAMILY_MASK) {
2190 case CHIP_R100: 2190 case CHIP_R100:
2191 case CHIP_RV200: 2191 case CHIP_RV200:
2192 case CHIP_R200: 2192 case CHIP_R200:
@@ -2194,7 +2194,7 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags)
2194 case CHIP_R350: 2194 case CHIP_R350:
2195 case CHIP_R420: 2195 case CHIP_R420:
2196 case CHIP_RV410: 2196 case CHIP_RV410:
2197 dev_priv->flags |= CHIP_HAS_HIERZ; 2197 dev_priv->flags |= RADEON_HAS_HIERZ;
2198 break; 2198 break;
2199 default: 2199 default:
2200 /* all other chips have no hierarchical z buffer */ 2200 /* all other chips have no hierarchical z buffer */
@@ -2202,14 +2202,14 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags)
2202 } 2202 }
2203 2203
2204 if (drm_device_is_agp(dev)) 2204 if (drm_device_is_agp(dev))
2205 dev_priv->flags |= CHIP_IS_AGP; 2205 dev_priv->flags |= RADEON_IS_AGP;
2206 else if (drm_device_is_pcie(dev)) 2206 else if (drm_device_is_pcie(dev))
2207 dev_priv->flags |= CHIP_IS_PCIE; 2207 dev_priv->flags |= RADEON_IS_PCIE;
2208 else 2208 else
2209 dev_priv->flags |= CHIP_IS_PCI; 2209 dev_priv->flags |= RADEON_IS_PCI;
2210 2210
2211 DRM_DEBUG("%s card detected\n", 2211 DRM_DEBUG("%s card detected\n",
2212 ((dev_priv->flags & CHIP_IS_AGP) ? "AGP" : (((dev_priv->flags & CHIP_IS_PCIE) ? "PCIE" : "PCI")))); 2212 ((dev_priv->flags & RADEON_IS_AGP) ? "AGP" : (((dev_priv->flags & RADEON_IS_PCIE) ? "PCIE" : "PCI"))));
2213 return ret; 2213 return ret;
2214} 2214}
2215 2215