diff options
author | Jerome Glisse <jglisse@redhat.com> | 2009-09-10 07:47:09 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-09-10 21:41:34 -0400 |
commit | c000273ebc830c27b8c9e03d5f4c147d3e310f48 (patch) | |
tree | 68e453c02a23d38dce7b4d67f29fa59a099c3510 /drivers/gpu | |
parent | 119e20dc149581db3064661b2e659f308f97b663 (diff) |
drm/radeon/kms: R3XX/R4XX AGP asic use PCI GART not PCIE GART
R3XX/R4XX AGP asic use the old PCI GART block, not the new PCIE GART.
Make sure we pick the right GART when disabling AGP.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/r300.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r420.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 2 |
4 files changed, 18 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index a5f82f7beed6..9c17b786982a 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -181,6 +181,12 @@ int r300_gart_enable(struct radeon_device *rdev) | |||
181 | rdev->asic->gart_set_page = &rv370_pcie_gart_set_page; | 181 | rdev->asic->gart_set_page = &rv370_pcie_gart_set_page; |
182 | return rv370_pcie_gart_enable(rdev); | 182 | return rv370_pcie_gart_enable(rdev); |
183 | } | 183 | } |
184 | if (rdev->flags & RADEON_IS_PCI) { | ||
185 | rdev->asic->gart_disable = &r100_pci_gart_disable; | ||
186 | rdev->asic->gart_tlb_flush = &r100_pci_gart_tlb_flush; | ||
187 | rdev->asic->gart_set_page = &r100_pci_gart_set_page; | ||
188 | return r100_pci_gart_enable(rdev); | ||
189 | } | ||
184 | return r100_pci_gart_enable(rdev); | 190 | return r100_pci_gart_enable(rdev); |
185 | } | 191 | } |
186 | 192 | ||
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c index 96303f064db7..551d6996d3f2 100644 --- a/drivers/gpu/drm/radeon/r420.c +++ b/drivers/gpu/drm/radeon/r420.c | |||
@@ -101,8 +101,13 @@ int r420_mc_init(struct radeon_device *rdev) | |||
101 | 101 | ||
102 | void r420_mc_fini(struct radeon_device *rdev) | 102 | void r420_mc_fini(struct radeon_device *rdev) |
103 | { | 103 | { |
104 | rv370_pcie_gart_disable(rdev); | 104 | if (rdev->flags & RADEON_IS_PCIE) { |
105 | radeon_gart_table_vram_free(rdev); | 105 | rv370_pcie_gart_disable(rdev); |
106 | radeon_gart_table_vram_free(rdev); | ||
107 | } else { | ||
108 | r100_pci_gart_disable(rdev); | ||
109 | radeon_gart_table_ram_free(rdev); | ||
110 | } | ||
106 | radeon_gart_fini(rdev); | 111 | radeon_gart_fini(rdev); |
107 | } | 112 | } |
108 | 113 | ||
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index fa84c77577ab..d6ff4e012063 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -935,6 +935,10 @@ static inline void radeon_ring_write(struct radeon_device *rdev, uint32_t v) | |||
935 | 935 | ||
936 | /* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */ | 936 | /* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */ |
937 | void r100_cp_disable(struct radeon_device *rdev); | 937 | void r100_cp_disable(struct radeon_device *rdev); |
938 | void r100_pci_gart_tlb_flush(struct radeon_device *rdev); | ||
939 | int r100_pci_gart_enable(struct radeon_device *rdev); | ||
940 | void r100_pci_gart_disable(struct radeon_device *rdev); | ||
941 | int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); | ||
938 | 942 | ||
939 | /* r420,r423,rv410 */ | 943 | /* r420,r423,rv410 */ |
940 | u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg); | 944 | u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg); |
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 05e1af0156c8..bf6939497e15 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
@@ -503,7 +503,7 @@ int radeon_device_init(struct radeon_device *rdev, | |||
503 | 503 | ||
504 | if (radeon_agpmode == -1) { | 504 | if (radeon_agpmode == -1) { |
505 | rdev->flags &= ~RADEON_IS_AGP; | 505 | rdev->flags &= ~RADEON_IS_AGP; |
506 | if (rdev->family > CHIP_RV515 || | 506 | if (rdev->family >= CHIP_RV515 || |
507 | rdev->family == CHIP_RV380 || | 507 | rdev->family == CHIP_RV380 || |
508 | rdev->family == CHIP_RV410 || | 508 | rdev->family == CHIP_RV410 || |
509 | rdev->family == CHIP_R423) { | 509 | rdev->family == CHIP_R423) { |