aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/r128_cce.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2006-01-02 01:18:39 -0500
committerDave Airlie <airlied@linux.ie>2006-01-02 01:18:39 -0500
commitf26c473cdf557ea6e8f267d34eee82d30473a363 (patch)
tree6b8f9ab884e26b5ee7861700a3e95808442d5720 /drivers/char/drm/r128_cce.c
parent0a406877e638a6f43ed4591bb08d528415d7d53a (diff)
drm: update PCIGART support from CVS
In order to work on FreeBSD the gart needed to use a local mapping This patch moves the mainline to the new code and aligns some comment changes From: Eric Anholt <anholt@freebsd.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/r128_cce.c')
-rw-r--r--drivers/char/drm/r128_cce.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/char/drm/r128_cce.c b/drivers/char/drm/r128_cce.c
index 7452753d4d01..db5a60450e68 100644
--- a/drivers/char/drm/r128_cce.c
+++ b/drivers/char/drm/r128_cce.c
@@ -1,6 +1,7 @@
1/* r128_cce.c -- ATI Rage 128 driver -*- linux-c -*- 1/* r128_cce.c -- ATI Rage 128 driver -*- linux-c -*-
2 * Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com 2 * Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com
3 * 3 */
4/*
4 * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. 5 * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
5 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 6 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
6 * All Rights Reserved. 7 * All Rights Reserved.
@@ -559,7 +560,8 @@ static int r128_do_init_cce(drm_device_t * dev, drm_r128_init_t * init)
559 if (dev_priv->is_pci) { 560 if (dev_priv->is_pci) {
560#endif 561#endif
561 dev_priv->gart_info.gart_table_location = DRM_ATI_GART_MAIN; 562 dev_priv->gart_info.gart_table_location = DRM_ATI_GART_MAIN;
562 dev_priv->gart_info.addr = dev_priv->gart_info.bus_addr = 0; 563 dev_priv->gart_info.addr = NULL;
564 dev_priv->gart_info.bus_addr = 0;
563 dev_priv->gart_info.is_pcie = 0; 565 dev_priv->gart_info.is_pcie = 0;
564 if (!drm_ati_pcigart_init(dev, &dev_priv->gart_info)) { 566 if (!drm_ati_pcigart_init(dev, &dev_priv->gart_info)) {
565 DRM_ERROR("failed to init PCI GART!\n"); 567 DRM_ERROR("failed to init PCI GART!\n");
@@ -601,15 +603,16 @@ int r128_do_cleanup_cce(drm_device_t * dev)
601 drm_core_ioremapfree(dev_priv->cce_ring, dev); 603 drm_core_ioremapfree(dev_priv->cce_ring, dev);
602 if (dev_priv->ring_rptr != NULL) 604 if (dev_priv->ring_rptr != NULL)
603 drm_core_ioremapfree(dev_priv->ring_rptr, dev); 605 drm_core_ioremapfree(dev_priv->ring_rptr, dev);
604 if (dev->agp_buffer_map != NULL) 606 if (dev->agp_buffer_map != NULL) {
605 drm_core_ioremapfree(dev->agp_buffer_map, dev); 607 drm_core_ioremapfree(dev->agp_buffer_map, dev);
608 dev->agp_buffer_map = NULL;
609 }
606 } else 610 } else
607#endif 611#endif
608 { 612 {
609 if (dev_priv->gart_info.bus_addr) 613 if (dev_priv->gart_info.bus_addr)
610 if (!drm_ati_pcigart_cleanup(dev, 614 if (!drm_ati_pcigart_cleanup(dev,
611 &dev_priv-> 615 &dev_priv->gart_info))
612 gart_info))
613 DRM_ERROR 616 DRM_ERROR
614 ("failed to cleanup PCI GART!\n"); 617 ("failed to cleanup PCI GART!\n");
615 } 618 }