patch-2.4.10 linux/drivers/char/drm/r128_cce.c
Next file: linux/drivers/char/drm/r128_drv.h
Previous file: linux/drivers/char/drm/mga_drv.h
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Mon Aug 27 07:40:33 2001
- Orig file:
v2.4.9/linux/drivers/char/drm/r128_cce.c
- Orig date:
Mon Aug 27 12:41:40 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/char/drm/r128_cce.c linux/drivers/char/drm/r128_cce.c
@@ -351,11 +351,10 @@
page_ofs = tmp_ofs >> PAGE_SHIFT;
R128_WRITE( R128_PM4_BUFFER_DL_RPTR_ADDR,
- page_to_bus(entry->pagelist[page_ofs]));
-
- DRM_DEBUG( "ring rptr: offset=0x%08lx handle=0x%08lx\n",
- page_to_bus(entry->pagelist[page_ofs]),
- entry->handle + tmp_ofs );
+ entry->busaddr[page_ofs]);
+ DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n",
+ entry->busaddr[page_ofs],
+ entry->handle + tmp_ofs );
}
/* Set watermark control */
@@ -599,15 +598,14 @@
dev_priv->sarea_priv->last_dispatch );
if ( dev_priv->is_pci ) {
- dev_priv->phys_pci_gart = DRM(ati_pcigart_init)( dev );
- if ( !dev_priv->phys_pci_gart ) {
+ if (!DRM(ati_pcigart_init)( dev, &dev_priv->phys_pci_gart,
+ &dev_priv->bus_pci_gart) ) {
DRM_ERROR( "failed to init PCI GART!\n" );
dev->dev_private = (void *)dev_priv;
r128_do_cleanup_cce( dev );
return -ENOMEM;
}
- R128_WRITE( R128_PCI_GART_PAGE,
- virt_to_bus( (void *)dev_priv->phys_pci_gart ) );
+ R128_WRITE( R128_PCI_GART_PAGE, dev_priv->bus_pci_gart );
}
r128_cce_init_ring_buffer( dev, dev_priv );
@@ -629,6 +627,11 @@
DRM_IOREMAPFREE( dev_priv->cce_ring );
DRM_IOREMAPFREE( dev_priv->ring_rptr );
DRM_IOREMAPFREE( dev_priv->buffers );
+ } else {
+ if (!DRM(ati_pcigart_cleanup)( dev,
+ dev_priv->phys_pci_gart,
+ dev_priv->bus_pci_gart ))
+ DRM_ERROR( "failed to cleanup PCI GART!\n" );
}
DRM(free)( dev->dev_private, sizeof(drm_r128_private_t),
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)