aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-03-17 10:44:29 -0400
committerDave Airlie <airlied@redhat.com>2010-03-30 23:11:42 -0400
commitf9274562026558ab54a29331cf13e9ebec8cc890 (patch)
tree63088dab34efe13e0e23b769fa92d26e8600fe34
parent97f23b3d85a4d734a8584dade3a34579931c8f8d (diff)
drm/radeon/kms: avoid possible oops (call gart_fini before gart_disable)
radeon_gart_fini might call GART unbind callback function which might try to access GART table but if gart_disable is call first the GART table will be unmapped so any access to it will oops. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/radeon/r100.c2
-rw-r--r--drivers/gpu/drm/radeon/r300.c2
-rw-r--r--drivers/gpu/drm/radeon/r600.c2
-rw-r--r--drivers/gpu/drm/radeon/rs400.c2
-rw-r--r--drivers/gpu/drm/radeon/rs600.c2
-rw-r--r--drivers/gpu/drm/radeon/rv770.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index e35cf1932829..739a44783ef5 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -236,9 +236,9 @@ int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
236 236
237void r100_pci_gart_fini(struct radeon_device *rdev) 237void r100_pci_gart_fini(struct radeon_device *rdev)
238{ 238{
239 radeon_gart_fini(rdev);
239 r100_pci_gart_disable(rdev); 240 r100_pci_gart_disable(rdev);
240 radeon_gart_table_ram_free(rdev); 241 radeon_gart_table_ram_free(rdev);
241 radeon_gart_fini(rdev);
242} 242}
243 243
244int r100_irq_set(struct radeon_device *rdev) 244int r100_irq_set(struct radeon_device *rdev)
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index 63fe2750f3aa..1023eeb65872 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -165,9 +165,9 @@ void rv370_pcie_gart_disable(struct radeon_device *rdev)
165 165
166void rv370_pcie_gart_fini(struct radeon_device *rdev) 166void rv370_pcie_gart_fini(struct radeon_device *rdev)
167{ 167{
168 radeon_gart_fini(rdev);
168 rv370_pcie_gart_disable(rdev); 169 rv370_pcie_gart_disable(rdev);
169 radeon_gart_table_vram_free(rdev); 170 radeon_gart_table_vram_free(rdev);
170 radeon_gart_fini(rdev);
171} 171}
172 172
173void r300_fence_ring_emit(struct radeon_device *rdev, 173void r300_fence_ring_emit(struct radeon_device *rdev,
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 1aac8bf40864..518f8d335f32 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -492,9 +492,9 @@ void r600_pcie_gart_disable(struct radeon_device *rdev)
492 492
493void r600_pcie_gart_fini(struct radeon_device *rdev) 493void r600_pcie_gart_fini(struct radeon_device *rdev)
494{ 494{
495 radeon_gart_fini(rdev);
495 r600_pcie_gart_disable(rdev); 496 r600_pcie_gart_disable(rdev);
496 radeon_gart_table_vram_free(rdev); 497 radeon_gart_table_vram_free(rdev);
497 radeon_gart_fini(rdev);
498} 498}
499 499
500void r600_agp_enable(struct radeon_device *rdev) 500void r600_agp_enable(struct radeon_device *rdev)
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c
index 18d6efb8907c..590815c4700e 100644
--- a/drivers/gpu/drm/radeon/rs400.c
+++ b/drivers/gpu/drm/radeon/rs400.c
@@ -203,9 +203,9 @@ void rs400_gart_disable(struct radeon_device *rdev)
203 203
204void rs400_gart_fini(struct radeon_device *rdev) 204void rs400_gart_fini(struct radeon_device *rdev)
205{ 205{
206 radeon_gart_fini(rdev);
206 rs400_gart_disable(rdev); 207 rs400_gart_disable(rdev);
207 radeon_gart_table_ram_free(rdev); 208 radeon_gart_table_ram_free(rdev);
208 radeon_gart_fini(rdev);
209} 209}
210 210
211int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) 211int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index df7a855c18ea..30c4b46f3521 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -268,9 +268,9 @@ void rs600_gart_disable(struct radeon_device *rdev)
268 268
269void rs600_gart_fini(struct radeon_device *rdev) 269void rs600_gart_fini(struct radeon_device *rdev)
270{ 270{
271 radeon_gart_fini(rdev);
271 rs600_gart_disable(rdev); 272 rs600_gart_disable(rdev);
272 radeon_gart_table_vram_free(rdev); 273 radeon_gart_table_vram_free(rdev);
273 radeon_gart_fini(rdev);
274} 274}
275 275
276#define R600_PTE_VALID (1 << 0) 276#define R600_PTE_VALID (1 << 0)
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index ef946a3af746..9f37d2efb0a9 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -126,9 +126,9 @@ void rv770_pcie_gart_disable(struct radeon_device *rdev)
126 126
127void rv770_pcie_gart_fini(struct radeon_device *rdev) 127void rv770_pcie_gart_fini(struct radeon_device *rdev)
128{ 128{
129 radeon_gart_fini(rdev);
129 rv770_pcie_gart_disable(rdev); 130 rv770_pcie_gart_disable(rdev);
130 radeon_gart_table_vram_free(rdev); 131 radeon_gart_table_vram_free(rdev);
131 radeon_gart_fini(rdev);
132} 132}
133 133
134 134