mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 10:14:23 +08:00
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>
This commit is contained in:
parent
97f23b3d85
commit
f927456202
@ -236,9 +236,9 @@ int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
|
||||
|
||||
void r100_pci_gart_fini(struct radeon_device *rdev)
|
||||
{
|
||||
radeon_gart_fini(rdev);
|
||||
r100_pci_gart_disable(rdev);
|
||||
radeon_gart_table_ram_free(rdev);
|
||||
radeon_gart_fini(rdev);
|
||||
}
|
||||
|
||||
int r100_irq_set(struct radeon_device *rdev)
|
||||
|
@ -165,9 +165,9 @@ void rv370_pcie_gart_disable(struct radeon_device *rdev)
|
||||
|
||||
void rv370_pcie_gart_fini(struct radeon_device *rdev)
|
||||
{
|
||||
radeon_gart_fini(rdev);
|
||||
rv370_pcie_gart_disable(rdev);
|
||||
radeon_gart_table_vram_free(rdev);
|
||||
radeon_gart_fini(rdev);
|
||||
}
|
||||
|
||||
void r300_fence_ring_emit(struct radeon_device *rdev,
|
||||
|
@ -492,9 +492,9 @@ void r600_pcie_gart_disable(struct radeon_device *rdev)
|
||||
|
||||
void r600_pcie_gart_fini(struct radeon_device *rdev)
|
||||
{
|
||||
radeon_gart_fini(rdev);
|
||||
r600_pcie_gart_disable(rdev);
|
||||
radeon_gart_table_vram_free(rdev);
|
||||
radeon_gart_fini(rdev);
|
||||
}
|
||||
|
||||
void r600_agp_enable(struct radeon_device *rdev)
|
||||
|
@ -203,9 +203,9 @@ void rs400_gart_disable(struct radeon_device *rdev)
|
||||
|
||||
void rs400_gart_fini(struct radeon_device *rdev)
|
||||
{
|
||||
radeon_gart_fini(rdev);
|
||||
rs400_gart_disable(rdev);
|
||||
radeon_gart_table_ram_free(rdev);
|
||||
radeon_gart_fini(rdev);
|
||||
}
|
||||
|
||||
int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
|
||||
|
@ -268,9 +268,9 @@ void rs600_gart_disable(struct radeon_device *rdev)
|
||||
|
||||
void rs600_gart_fini(struct radeon_device *rdev)
|
||||
{
|
||||
radeon_gart_fini(rdev);
|
||||
rs600_gart_disable(rdev);
|
||||
radeon_gart_table_vram_free(rdev);
|
||||
radeon_gart_fini(rdev);
|
||||
}
|
||||
|
||||
#define R600_PTE_VALID (1 << 0)
|
||||
|
@ -126,9 +126,9 @@ void rv770_pcie_gart_disable(struct radeon_device *rdev)
|
||||
|
||||
void rv770_pcie_gart_fini(struct radeon_device *rdev)
|
||||
{
|
||||
radeon_gart_fini(rdev);
|
||||
rv770_pcie_gart_disable(rdev);
|
||||
radeon_gart_table_vram_free(rdev);
|
||||
radeon_gart_fini(rdev);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user