aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r100.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-11-05 00:36:53 -0500
committerDave Airlie <airlied@redhat.com>2009-12-01 20:36:41 -0500
commit17e15b0c719b5ec0b344d3ebe3787b48315a0218 (patch)
treede7a28574a257ef9ab5a46e0a155c863b2584663 /drivers/gpu/drm/radeon/r100.c
parentfcec570b27a47e428a9bfc8572ae4c7c230d0488 (diff)
drm/radeon/kms: AGP systems need PCI bus mastering enabled
We might not hit this yet, but when if we do any sort of writeback we really need to enable PCI bus mastering on these systems from what I can see. This enables PCI BM on all radeons that require it. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r100.c')
-rw-r--r--drivers/gpu/drm/radeon/r100.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index c9e93eabcf16..4e0a80467b44 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -94,6 +94,15 @@ int r100_pci_gart_init(struct radeon_device *rdev)
94 return radeon_gart_table_ram_alloc(rdev); 94 return radeon_gart_table_ram_alloc(rdev);
95} 95}
96 96
97/* required on r1xx, r2xx, r300, r(v)350, r420/r481, rs400/rs480 */
98void r100_enable_bm(struct radeon_device *rdev)
99{
100 uint32_t tmp;
101 /* Enable bus mastering */
102 tmp = RREG32(RADEON_BUS_CNTL) & ~RADEON_BUS_MASTER_DIS;
103 WREG32(RADEON_BUS_CNTL, tmp);
104}
105
97int r100_pci_gart_enable(struct radeon_device *rdev) 106int r100_pci_gart_enable(struct radeon_device *rdev)
98{ 107{
99 uint32_t tmp; 108 uint32_t tmp;
@@ -105,9 +114,6 @@ int r100_pci_gart_enable(struct radeon_device *rdev)
105 WREG32(RADEON_AIC_LO_ADDR, rdev->mc.gtt_location); 114 WREG32(RADEON_AIC_LO_ADDR, rdev->mc.gtt_location);
106 tmp = rdev->mc.gtt_location + rdev->mc.gtt_size - 1; 115 tmp = rdev->mc.gtt_location + rdev->mc.gtt_size - 1;
107 WREG32(RADEON_AIC_HI_ADDR, tmp); 116 WREG32(RADEON_AIC_HI_ADDR, tmp);
108 /* Enable bus mastering */
109 tmp = RREG32(RADEON_BUS_CNTL) & ~RADEON_BUS_MASTER_DIS;
110 WREG32(RADEON_BUS_CNTL, tmp);
111 /* set PCI GART page-table base address */ 117 /* set PCI GART page-table base address */
112 WREG32(RADEON_AIC_PT_BASE, rdev->gart.table_addr); 118 WREG32(RADEON_AIC_PT_BASE, rdev->gart.table_addr);
113 tmp = RREG32(RADEON_AIC_CNTL) | RADEON_PCIGART_TRANSLATE_EN; 119 tmp = RREG32(RADEON_AIC_CNTL) | RADEON_PCIGART_TRANSLATE_EN;
@@ -3108,6 +3114,7 @@ static int r100_startup(struct radeon_device *rdev)
3108 r100_gpu_init(rdev); 3114 r100_gpu_init(rdev);
3109 /* Initialize GART (initialize after TTM so we can allocate 3115 /* Initialize GART (initialize after TTM so we can allocate
3110 * memory through TTM but finalize after TTM) */ 3116 * memory through TTM but finalize after TTM) */
3117 r100_enable_bm(rdev);
3111 if (rdev->flags & RADEON_IS_PCI) { 3118 if (rdev->flags & RADEON_IS_PCI) {
3112 r = r100_pci_gart_enable(rdev); 3119 r = r100_pci_gart_enable(rdev);
3113 if (r) 3120 if (r)