drm/radeon: Remove radeon_gart_restore()
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 9 Jul 2014 18:15:42 +0000 (20:15 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Aug 2014 12:53:31 +0000 (08:53 -0400)
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>
12 files changed:
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/ni.c
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/r300.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_gart.c
drivers/gpu/drm/radeon/rs400.c
drivers/gpu/drm/radeon/rs600.c
drivers/gpu/drm/radeon/rv770.c
drivers/gpu/drm/radeon/si.c

index f1e049b1ab0005bc0126c80891b54ce5437396dc..64100fc50346508f42c121ba8c71d44db578e5e6 100644 (file)
@@ -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) |
index 15e4f28015e1e74fcc0a3e6189feee1274fa1794..ae7923c8ec8be66fd3c687e8a10bff18001aec2d 100644 (file)
@@ -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 |
index 5a33ca6818677bd0e5fcc5c9564d2f789a5ae454..327b85f7fd0d45eb434a8f8232a206ac736ab0be 100644 (file)
@@ -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) |
index 557fcdc32710d657e5513ce674f71d8a31e92012..cceef27113101ec3ec60159486289571017ef917 100644 (file)
@@ -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);
index 3c21d77a483d3a604c6ad6392ab1370377e78423..8d14e665f241b163924bc8e8ccdca3bd28d98721 100644 (file)
@@ -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);
index 3c69f58e46efd94b02a440e15e8aad66f9241712..e6a2243114b55a696e2fceacf822ef098150dbd4 100644 (file)
@@ -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 |
index 6aadfe43bad03eb8a6d14b45d4e72a7c68717839..43bc99b3926f349b9a04d8aae8452b2979b01ce0 100644 (file)
@@ -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);
 
 
 /*
index 2e723651069bd7d084d393e25c741f122b4c5c79..b7d3e846cd763b6a9213b735ed4f2386e55d3ad2 100644 (file)
@@ -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
  *
index a0f96decece3c31def216611c9bab18fa836c464..4519f9c931625789769c8da42079ee028582e4e0 100644 (file)
@@ -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);
index d1a35cb1c91d4b6bc60e18482018612a323489a3..27a56ad3a727846d78a5ff9cf81931f722008ece 100644 (file)
@@ -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);
index da8703d8d4559920dd382164bee462bddacb89c0..2983f17ea1b38399ab649dbb965cae291e6d9b82 100644 (file)
@@ -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 |
index 2becb819dacf30892fee0dbae0767be18130b8cd..6741804e4af25b0376c1ed156624217b4d9c9780 100644 (file)
@@ -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) |