diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2006-01-02 17:18:39 +1100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-01-02 17:18:39 +1100 |
commit | f26c473cdf557ea6e8f267d34eee82d30473a363 (patch) | |
tree | 6b8f9ab884e26b5ee7861700a3e95808442d5720 /drivers/char/drm/r128_cce.c | |
parent | 0a406877e638a6f43ed4591bb08d528415d7d53a (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.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/char/drm/r128_cce.c b/drivers/char/drm/r128_cce.c index 7452753d4d0..db5a60450e6 100644 --- a/drivers/char/drm/r128_cce.c +++ b/drivers/char/drm/r128_cce.c @@ -1,6 +1,7 @@ -/* r128_cce.c -- ATI Rage 128 driver -*- linux-c -*- +/* r128_cce.c -- ATI Rage 128 driver -*- linux-c -*- * Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com - * + */ +/* * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. @@ -559,7 +560,8 @@ static int r128_do_init_cce(drm_device_t * dev, drm_r128_init_t * init) if (dev_priv->is_pci) { #endif dev_priv->gart_info.gart_table_location = DRM_ATI_GART_MAIN; - dev_priv->gart_info.addr = dev_priv->gart_info.bus_addr = 0; + dev_priv->gart_info.addr = NULL; + dev_priv->gart_info.bus_addr = 0; dev_priv->gart_info.is_pcie = 0; if (!drm_ati_pcigart_init(dev, &dev_priv->gart_info)) { DRM_ERROR("failed to init PCI GART!\n"); @@ -601,15 +603,16 @@ int r128_do_cleanup_cce(drm_device_t * dev) drm_core_ioremapfree(dev_priv->cce_ring, dev); if (dev_priv->ring_rptr != NULL) drm_core_ioremapfree(dev_priv->ring_rptr, dev); - if (dev->agp_buffer_map != NULL) + if (dev->agp_buffer_map != NULL) { drm_core_ioremapfree(dev->agp_buffer_map, dev); + dev->agp_buffer_map = NULL; + } } else #endif { if (dev_priv->gart_info.bus_addr) if (!drm_ati_pcigart_cleanup(dev, - &dev_priv-> - gart_info)) + &dev_priv->gart_info)) DRM_ERROR ("failed to cleanup PCI GART!\n"); } |