diff options
author | Dave Airlie <airlied@linux.ie> | 2005-09-30 06:35:09 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-09-30 06:35:09 +0000 |
commit | 6ff57e2d7cd0b9b513070f72ffd894e8d6f57149 (patch) | |
tree | a5eb6cbe0c3aa5dc661647494752b77c3d32b7fd /shared-core | |
parent | 856bdf0f673510c33a23b4c4d4fff91d95eb149e (diff) |
fix pci overriding from userspace
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/radeon_cp.c | 6 | ||||
-rw-r--r-- | shared-core/radeon_drm.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c index 655803e4..f3c5ecfa 100644 --- a/shared-core/radeon_cp.c +++ b/shared-core/radeon_cp.c @@ -1304,6 +1304,12 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) drm_radeon_private_t *dev_priv = dev->dev_private; DRM_DEBUG("\n"); + 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; + } + if ((!(dev_priv->flags & CHIP_IS_AGP)) && !dev->sg) { DRM_ERROR("PCI GART memory not allocated!\n"); radeon_do_cleanup_cp(dev); diff --git a/shared-core/radeon_drm.h b/shared-core/radeon_drm.h index 60656741..e9a1f9b4 100644 --- a/shared-core/radeon_drm.h +++ b/shared-core/radeon_drm.h @@ -501,7 +501,7 @@ typedef struct drm_radeon_init { RADEON_INIT_R300_CP = 0x04 } func; unsigned long sarea_priv_offset; - int is_pci DEPRECATED; /* deprecated, driver asks hardware */ + int is_pci; /* for overriding only */ int cp_mode; int gart_size; int ring_size; |