diff options
author | Dave Airlie <airlied@linux.ie> | 2006-08-19 17:43:52 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-09-22 05:32:33 +1000 |
commit | b15ec36806ce3b89a2fddce958de9370efb249da (patch) | |
tree | a7c027ffd411eb719123aec77c69355cdf4aded2 /drivers/char/drm/radeon_cp.c | |
parent | d40c8533a5b8ca1887f81ae1c81136f3c40a8488 (diff) |
drm: realign sosme radeon code with drm git tree
this applies some minor cleanups for the radeon driver, to use the
3D flush and reset the AGP flags on X recycle
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.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index 45f8044e9a30..2b5efa306ad7 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c @@ -1340,17 +1340,19 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) DRM_DEBUG("\n"); /* if we require new memory map but we don't have it fail */ - if ((dev_priv->flags & CHIP_NEW_MEMMAP) && !dev_priv->new_memmap) - { - DRM_ERROR("Cannot initialise DRM on this card\nThis card requires a new X.org DDX\n"); + if ((dev_priv->flags & CHIP_NEW_MEMMAP) && !dev_priv->new_memmap) { + DRM_ERROR("Cannot initialise DRM on this card\nThis card requires a new X.org DDX for 3D\n"); radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } - if (init->is_pci && (dev_priv->flags & CHIP_IS_AGP)) - { + if (init->is_pci && (dev_priv->flags & CHIP_IS_AGP)) { DRM_DEBUG("Forcing AGP card to PCI mode\n"); dev_priv->flags &= ~CHIP_IS_AGP; + } else if (!(dev_priv->flags & (CHIP_IS_AGP | CHIP_IS_PCI | CHIP_IS_PCIE)) + && !init->is_pci) { + DRM_DEBUG("Restoring AGP flag\n"); + dev_priv->flags |= CHIP_IS_AGP; } if ((!(dev_priv->flags & CHIP_IS_AGP)) && !dev->sg) { @@ -2189,7 +2191,9 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags) case CHIP_RV200: case CHIP_R200: case CHIP_R300: + case CHIP_R350: case CHIP_R420: + case CHIP_RV410: dev_priv->flags |= CHIP_HAS_HIERZ; break; default: @@ -2199,9 +2203,10 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags) if (drm_device_is_agp(dev)) dev_priv->flags |= CHIP_IS_AGP; - - if (drm_device_is_pcie(dev)) + else if (drm_device_is_pcie(dev)) dev_priv->flags |= CHIP_IS_PCIE; + else + dev_priv->flags |= CHIP_IS_PCI; DRM_DEBUG("%s card detected\n", ((dev_priv->flags & CHIP_IS_AGP) ? "AGP" : (((dev_priv->flags & CHIP_IS_PCIE) ? "PCIE" : "PCI")))); |