diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-09-11 06:28:11 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-09-11 06:28:11 -0400 |
commit | ea98a92ff18c03bf7f4d21536986cbbcb4c10cd9 (patch) | |
tree | fbff15aaacf19824083c9edb8d37548031636580 /drivers/char/drm/r128_cce.c | |
parent | 9d17601c4e132eee9fe450191f6866fb9fb5a762 (diff) |
drm: add radeon PCI express support
Add support for Radeon PCI Express cards (needs a new X.org DDX)
Also allows PCI GART table to be stored in VRAM for non PCIE cards
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 | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/char/drm/r128_cce.c b/drivers/char/drm/r128_cce.c index 895152206b31..ac3ea2bc9b28 100644 --- a/drivers/char/drm/r128_cce.c +++ b/drivers/char/drm/r128_cce.c | |||
@@ -562,14 +562,16 @@ static int r128_do_init_cce( drm_device_t *dev, drm_r128_init_t *init ) | |||
562 | #if __OS_HAS_AGP | 562 | #if __OS_HAS_AGP |
563 | if ( dev_priv->is_pci ) { | 563 | if ( dev_priv->is_pci ) { |
564 | #endif | 564 | #endif |
565 | if (!drm_ati_pcigart_init( dev, &dev_priv->phys_pci_gart, | 565 | dev_priv->gart_info.gart_table_location = DRM_ATI_GART_MAIN; |
566 | &dev_priv->bus_pci_gart) ) { | 566 | dev_priv->gart_info.addr = dev_priv->gart_info.bus_addr = 0; |
567 | dev_priv->gart_info.is_pcie = 0; | ||
568 | if (!drm_ati_pcigart_init(dev, &dev_priv->gart_info)) { | ||
567 | DRM_ERROR( "failed to init PCI GART!\n" ); | 569 | DRM_ERROR( "failed to init PCI GART!\n" ); |
568 | dev->dev_private = (void *)dev_priv; | 570 | dev->dev_private = (void *)dev_priv; |
569 | r128_do_cleanup_cce( dev ); | 571 | r128_do_cleanup_cce( dev ); |
570 | return DRM_ERR(ENOMEM); | 572 | return DRM_ERR(ENOMEM); |
571 | } | 573 | } |
572 | R128_WRITE( R128_PCI_GART_PAGE, dev_priv->bus_pci_gart ); | 574 | R128_WRITE(R128_PCI_GART_PAGE, dev_priv->gart_info.bus_addr); |
573 | #if __OS_HAS_AGP | 575 | #if __OS_HAS_AGP |
574 | } | 576 | } |
575 | #endif | 577 | #endif |
@@ -607,10 +609,10 @@ int r128_do_cleanup_cce( drm_device_t *dev ) | |||
607 | } else | 609 | } else |
608 | #endif | 610 | #endif |
609 | { | 611 | { |
610 | if (!drm_ati_pcigart_cleanup( dev, | 612 | if (dev_priv->gart_info.bus_addr) |
611 | dev_priv->phys_pci_gart, | 613 | if (!drm_ati_pcigart_cleanup( dev, |
612 | dev_priv->bus_pci_gart )) | 614 | &dev_priv->gart_info)) |
613 | DRM_ERROR( "failed to cleanup PCI GART!\n" ); | 615 | DRM_ERROR( "failed to cleanup PCI GART!\n" ); |
614 | } | 616 | } |
615 | 617 | ||
616 | drm_free( dev->dev_private, sizeof(drm_r128_private_t), | 618 | drm_free( dev->dev_private, sizeof(drm_r128_private_t), |