drm/radeon: Remove radeon_gart_restore()
Doesn't seem necessary, the GART table memory should be persistent. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
380670aebf
commit
a3eb06dbca
|
@ -5703,7 +5703,6 @@ static int cik_pcie_gart_enable(struct radeon_device *rdev)
|
|||
r = radeon_gart_table_vram_pin(rdev);
|
||||
if (r)
|
||||
return r;
|
||||
radeon_gart_restore(rdev);
|
||||
/* Setup TLB control */
|
||||
WREG32(MC_VM_MX_L1_TLB_CNTL,
|
||||
(0xA << 7) |
|
||||
|
|
|
@ -2424,7 +2424,6 @@ static int evergreen_pcie_gart_enable(struct radeon_device *rdev)
|
|||
r = radeon_gart_table_vram_pin(rdev);
|
||||
if (r)
|
||||
return r;
|
||||
radeon_gart_restore(rdev);
|
||||
/* Setup L2 cache */
|
||||
WREG32(VM_L2_CNTL, ENABLE_L2_CACHE | ENABLE_L2_FRAGMENT_PROCESSING |
|
||||
ENABLE_L2_PTE_CACHE_LRU_UPDATE_BY_WRITE |
|
||||
|
|
|
@ -1229,7 +1229,6 @@ static int cayman_pcie_gart_enable(struct radeon_device *rdev)
|
|||
r = radeon_gart_table_vram_pin(rdev);
|
||||
if (r)
|
||||
return r;
|
||||
radeon_gart_restore(rdev);
|
||||
/* Setup TLB control */
|
||||
WREG32(MC_VM_MX_L1_TLB_CNTL,
|
||||
(0xA << 7) |
|
||||
|
|
|
@ -652,7 +652,6 @@ int r100_pci_gart_enable(struct radeon_device *rdev)
|
|||
{
|
||||
uint32_t tmp;
|
||||
|
||||
radeon_gart_restore(rdev);
|
||||
/* discard memory request outside of configured range */
|
||||
tmp = RREG32(RADEON_AIC_CNTL) | RADEON_DIS_OUT_OF_PCI_GART_ACCESS;
|
||||
WREG32(RADEON_AIC_CNTL, tmp);
|
||||
|
|
|
@ -120,7 +120,6 @@ int rv370_pcie_gart_enable(struct radeon_device *rdev)
|
|||
r = radeon_gart_table_vram_pin(rdev);
|
||||
if (r)
|
||||
return r;
|
||||
radeon_gart_restore(rdev);
|
||||
/* discard memory request outside of configured range */
|
||||
tmp = RADEON_PCIE_TX_GART_UNMAPPED_ACCESS_DISCARD;
|
||||
WREG32_PCIE(RADEON_PCIE_TX_GART_CNTL, tmp);
|
||||
|
|
|
@ -968,7 +968,6 @@ static int r600_pcie_gart_enable(struct radeon_device *rdev)
|
|||
r = radeon_gart_table_vram_pin(rdev);
|
||||
if (r)
|
||||
return r;
|
||||
radeon_gart_restore(rdev);
|
||||
|
||||
/* Setup L2 cache */
|
||||
WREG32(VM_L2_CNTL, ENABLE_L2_CACHE | ENABLE_L2_FRAGMENT_PROCESSING |
|
||||
|
|
|
@ -618,7 +618,6 @@ void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset,
|
|||
int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
|
||||
int pages, struct page **pagelist,
|
||||
dma_addr_t *dma_addr);
|
||||
void radeon_gart_restore(struct radeon_device *rdev);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -297,33 +297,6 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* radeon_gart_restore - bind all pages in the gart page table
|
||||
*
|
||||
* @rdev: radeon_device pointer
|
||||
*
|
||||
* Binds all pages in the gart page table (all asics).
|
||||
* Used to rebuild the gart table on device startup or resume.
|
||||
*/
|
||||
void radeon_gart_restore(struct radeon_device *rdev)
|
||||
{
|
||||
int i, j, t;
|
||||
u64 page_base;
|
||||
|
||||
if (!rdev->gart.ptr) {
|
||||
return;
|
||||
}
|
||||
for (i = 0, t = 0; i < rdev->gart.num_cpu_pages; i++) {
|
||||
page_base = rdev->gart.pages_addr[i];
|
||||
for (j = 0; j < (PAGE_SIZE / RADEON_GPU_PAGE_SIZE); j++, t++) {
|
||||
radeon_gart_set_page(rdev, t, page_base);
|
||||
page_base += RADEON_GPU_PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
mb();
|
||||
radeon_gart_tlb_flush(rdev);
|
||||
}
|
||||
|
||||
/**
|
||||
* radeon_gart_init - init the driver info for managing the gart
|
||||
*
|
||||
|
|
|
@ -109,7 +109,6 @@ int rs400_gart_enable(struct radeon_device *rdev)
|
|||
uint32_t size_reg;
|
||||
uint32_t tmp;
|
||||
|
||||
radeon_gart_restore(rdev);
|
||||
tmp = RREG32_MC(RS690_AIC_CTRL_SCRATCH);
|
||||
tmp |= RS690_DIS_OUT_OF_PCI_GART_ACCESS;
|
||||
WREG32_MC(RS690_AIC_CTRL_SCRATCH, tmp);
|
||||
|
|
|
@ -555,7 +555,6 @@ static int rs600_gart_enable(struct radeon_device *rdev)
|
|||
r = radeon_gart_table_vram_pin(rdev);
|
||||
if (r)
|
||||
return r;
|
||||
radeon_gart_restore(rdev);
|
||||
/* Enable bus master */
|
||||
tmp = RREG32(RADEON_BUS_CNTL) & ~RS600_BUS_MASTER_DIS;
|
||||
WREG32(RADEON_BUS_CNTL, tmp);
|
||||
|
|
|
@ -900,7 +900,6 @@ static int rv770_pcie_gart_enable(struct radeon_device *rdev)
|
|||
r = radeon_gart_table_vram_pin(rdev);
|
||||
if (r)
|
||||
return r;
|
||||
radeon_gart_restore(rdev);
|
||||
/* Setup L2 cache */
|
||||
WREG32(VM_L2_CNTL, ENABLE_L2_CACHE | ENABLE_L2_FRAGMENT_PROCESSING |
|
||||
ENABLE_L2_PTE_CACHE_LRU_UPDATE_BY_WRITE |
|
||||
|
|
|
@ -4247,7 +4247,6 @@ static int si_pcie_gart_enable(struct radeon_device *rdev)
|
|||
r = radeon_gart_table_vram_pin(rdev);
|
||||
if (r)
|
||||
return r;
|
||||
radeon_gart_restore(rdev);
|
||||
/* Setup TLB control */
|
||||
WREG32(MC_VM_MX_L1_TLB_CNTL,
|
||||
(0xA << 7) |
|
||||
|
|
Loading…
Reference in New Issue