drm/radeon: remove ip_pool start/suspend
authorChristian König <deathsimple@vodafone.de>
Thu, 5 Jul 2012 09:55:34 +0000 (11:55 +0200)
committerChristian König <deathsimple@vodafone.de>
Tue, 17 Jul 2012 08:32:41 +0000 (10:32 +0200)
The IB pool is in gart memory, so it is completely
superfluous to unpin / repin it on suspend / resume.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
16 files changed:
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/r420.c
drivers/gpu/drm/radeon/r520.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_asic.h
drivers/gpu/drm/radeon/radeon_ring.c
drivers/gpu/drm/radeon/rs400.c
drivers/gpu/drm/radeon/rs600.c
drivers/gpu/drm/radeon/rs690.c
drivers/gpu/drm/radeon/rv515.c
drivers/gpu/drm/radeon/rv770.c
drivers/gpu/drm/radeon/si.c

index eb9a71a7a646c8ecb3d18dc3110f86b7438d8738..64e06e67facdeaf6dd272065a115f7af835d9fb6 100644 (file)
@@ -3087,9 +3087,11 @@ static int evergreen_startup(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -3137,7 +3139,6 @@ int evergreen_suspend(struct radeon_device *rdev)
        struct radeon_ring *ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX];
 
        r600_audio_fini(rdev);
-       radeon_ib_pool_suspend(rdev);
        r600_blit_suspend(rdev);
        r700_cp_stop(rdev);
        ring->ready = false;
@@ -3224,20 +3225,14 @@ int evergreen_init(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = evergreen_startup(rdev);
        if (r) {
                dev_err(rdev->dev, "disabling GPU acceleration\n");
                r700_cp_fini(rdev);
                r600_irq_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                radeon_irq_kms_fini(rdev);
                evergreen_pcie_gart_fini(rdev);
                rdev->accel_working = false;
@@ -3264,7 +3259,7 @@ void evergreen_fini(struct radeon_device *rdev)
        r700_cp_fini(rdev);
        r600_irq_fini(rdev);
        radeon_wb_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_irq_kms_fini(rdev);
        evergreen_pcie_gart_fini(rdev);
        r600_vram_scratch_fini(rdev);
index 8b1df33c7be99044760a65af29e81e51d2bf16b7..fe553102df82e9319b8c1f66a997af333b6ee0b8 100644 (file)
@@ -1270,9 +1270,11 @@ static int cayman_startup(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -1313,7 +1315,6 @@ int cayman_resume(struct radeon_device *rdev)
 int cayman_suspend(struct radeon_device *rdev)
 {
        r600_audio_fini(rdev);
-       radeon_ib_pool_suspend(rdev);
        radeon_vm_manager_suspend(rdev);
        r600_blit_suspend(rdev);
        cayman_cp_enable(rdev, false);
@@ -1391,12 +1392,7 @@ int cayman_init(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
        r = radeon_vm_manager_init(rdev);
        if (r) {
                dev_err(rdev->dev, "vm manager initialization failed (%d).\n", r);
@@ -1410,7 +1406,7 @@ int cayman_init(struct radeon_device *rdev)
                if (rdev->flags & RADEON_IS_IGP)
                        si_rlc_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                radeon_vm_manager_fini(rdev);
                radeon_irq_kms_fini(rdev);
                cayman_pcie_gart_fini(rdev);
@@ -1441,7 +1437,7 @@ void cayman_fini(struct radeon_device *rdev)
                si_rlc_fini(rdev);
        radeon_wb_fini(rdev);
        radeon_vm_manager_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_irq_kms_fini(rdev);
        cayman_pcie_gart_fini(rdev);
        r600_vram_scratch_fini(rdev);
index d06c8dd8ddfa4d118a381f4ade28974f3530ff67..9524bd4aca755789ab01bb65079023dbb35fcb85 100644 (file)
@@ -3722,12 +3722,6 @@ int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
        return r;
 }
 
-void r100_ib_fini(struct radeon_device *rdev)
-{
-       radeon_ib_pool_suspend(rdev);
-       radeon_ib_pool_fini(rdev);
-}
-
 void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save)
 {
        /* Shutdown CP we shouldn't need to do that but better be safe than
@@ -3887,9 +3881,11 @@ static int r100_startup(struct radeon_device *rdev)
                return r;
        }
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -3930,7 +3926,6 @@ int r100_resume(struct radeon_device *rdev)
 
 int r100_suspend(struct radeon_device *rdev)
 {
-       radeon_ib_pool_suspend(rdev);
        r100_cp_disable(rdev);
        radeon_wb_disable(rdev);
        r100_irq_disable(rdev);
@@ -3943,7 +3938,7 @@ void r100_fini(struct radeon_device *rdev)
 {
        r100_cp_fini(rdev);
        radeon_wb_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_gem_fini(rdev);
        if (rdev->flags & RADEON_IS_PCI)
                r100_pci_gart_fini(rdev);
@@ -4050,20 +4045,14 @@ int r100_init(struct radeon_device *rdev)
        }
        r100_set_safe_registers(rdev);
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = r100_startup(rdev);
        if (r) {
                /* Somethings want wront with the accel init stop accel */
                dev_err(rdev->dev, "Disabling GPU acceleration\n");
                r100_cp_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                radeon_irq_kms_fini(rdev);
                if (rdev->flags & RADEON_IS_PCI)
                        r100_pci_gart_fini(rdev);
index 97722a33e5131a4a6b63be014026775dad283f56..b396e341a7b82d9722f93d4e5cf9c8c999669086 100644 (file)
@@ -1391,9 +1391,11 @@ static int r300_startup(struct radeon_device *rdev)
                return r;
        }
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -1436,7 +1438,6 @@ int r300_resume(struct radeon_device *rdev)
 
 int r300_suspend(struct radeon_device *rdev)
 {
-       radeon_ib_pool_suspend(rdev);
        r100_cp_disable(rdev);
        radeon_wb_disable(rdev);
        r100_irq_disable(rdev);
@@ -1451,7 +1452,7 @@ void r300_fini(struct radeon_device *rdev)
 {
        r100_cp_fini(rdev);
        radeon_wb_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_gem_fini(rdev);
        if (rdev->flags & RADEON_IS_PCIE)
                rv370_pcie_gart_fini(rdev);
@@ -1538,20 +1539,14 @@ int r300_init(struct radeon_device *rdev)
        }
        r300_set_reg_safe(rdev);
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = r300_startup(rdev);
        if (r) {
                /* Somethings want wront with the accel init stop accel */
                dev_err(rdev->dev, "Disabling GPU acceleration\n");
                r100_cp_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                radeon_irq_kms_fini(rdev);
                if (rdev->flags & RADEON_IS_PCIE)
                        rv370_pcie_gart_fini(rdev);
index 99137be7a3004253e15e11602a8b16eee585b342..0062938a589cfe7537b01470ca3814ee328a290b 100644 (file)
@@ -275,9 +275,11 @@ static int r420_startup(struct radeon_device *rdev)
        }
        r420_cp_errata_init(rdev);
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -324,7 +326,6 @@ int r420_resume(struct radeon_device *rdev)
 
 int r420_suspend(struct radeon_device *rdev)
 {
-       radeon_ib_pool_suspend(rdev);
        r420_cp_errata_fini(rdev);
        r100_cp_disable(rdev);
        radeon_wb_disable(rdev);
@@ -340,7 +341,7 @@ void r420_fini(struct radeon_device *rdev)
 {
        r100_cp_fini(rdev);
        radeon_wb_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_gem_fini(rdev);
        if (rdev->flags & RADEON_IS_PCIE)
                rv370_pcie_gart_fini(rdev);
@@ -438,20 +439,14 @@ int r420_init(struct radeon_device *rdev)
        }
        r420_set_reg_safe(rdev);
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = r420_startup(rdev);
        if (r) {
                /* Somethings want wront with the accel init stop accel */
                dev_err(rdev->dev, "Disabling GPU acceleration\n");
                r100_cp_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                radeon_irq_kms_fini(rdev);
                if (rdev->flags & RADEON_IS_PCIE)
                        rv370_pcie_gart_fini(rdev);
index b5cf8375cd256aef8bd36cd4b60643facbdfb059..6df3e51acb9fff71098242bdbd5bfbd888d3f7b6 100644 (file)
@@ -203,9 +203,11 @@ static int r520_startup(struct radeon_device *rdev)
                return r;
        }
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -311,20 +313,14 @@ int r520_init(struct radeon_device *rdev)
                return r;
        rv515_set_safe_registers(rdev);
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = r520_startup(rdev);
        if (r) {
                /* Somethings want wront with the accel init stop accel */
                dev_err(rdev->dev, "Disabling GPU acceleration\n");
                r100_cp_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                radeon_irq_kms_fini(rdev);
                rv370_pcie_gart_fini(rdev);
                radeon_agp_fini(rdev);
index de4de2dac1600dc547083c2d47926c7b962ca26b..9750f538cc86e323b726ad945b24c9dabd0c0d40 100644 (file)
@@ -2403,9 +2403,11 @@ int r600_startup(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -2459,7 +2461,6 @@ int r600_resume(struct radeon_device *rdev)
 int r600_suspend(struct radeon_device *rdev)
 {
        r600_audio_fini(rdev);
-       radeon_ib_pool_suspend(rdev);
        r600_blit_suspend(rdev);
        r600_cp_stop(rdev);
        rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready = false;
@@ -2542,20 +2543,14 @@ int r600_init(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = r600_startup(rdev);
        if (r) {
                dev_err(rdev->dev, "disabling GPU acceleration\n");
                r600_cp_fini(rdev);
                r600_irq_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                radeon_irq_kms_fini(rdev);
                r600_pcie_gart_fini(rdev);
                rdev->accel_working = false;
@@ -2571,7 +2566,7 @@ void r600_fini(struct radeon_device *rdev)
        r600_cp_fini(rdev);
        r600_irq_fini(rdev);
        radeon_wb_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_irq_kms_fini(rdev);
        r600_pcie_gart_fini(rdev);
        r600_vram_scratch_fini(rdev);
index 44878738bcde5e67b6f7dadf1b7615d3dbc1f055..7df76b9cc3af8eaa13006ec999f977cbb6b28ae2 100644 (file)
@@ -755,8 +755,6 @@ void radeon_ib_free(struct radeon_device *rdev, struct radeon_ib *ib);
 int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib);
 int radeon_ib_pool_init(struct radeon_device *rdev);
 void radeon_ib_pool_fini(struct radeon_device *rdev);
-int radeon_ib_pool_start(struct radeon_device *rdev);
-int radeon_ib_pool_suspend(struct radeon_device *rdev);
 int radeon_ib_ring_tests(struct radeon_device *rdev);
 /* Ring access between begin & end cannot sleep */
 int radeon_ring_index(struct radeon_device *rdev, struct radeon_ring *cp);
index 94c427ab0f5c2d93d11367ae2ca43bce22ebd0e4..f4af243104387b752638b62809c876970b16ce76 100644 (file)
@@ -103,7 +103,6 @@ int r100_pci_gart_enable(struct radeon_device *rdev);
 void r100_pci_gart_disable(struct radeon_device *rdev);
 int r100_debugfs_mc_info_init(struct radeon_device *rdev);
 int r100_gui_wait_for_idle(struct radeon_device *rdev);
-void r100_ib_fini(struct radeon_device *rdev);
 int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring);
 void r100_irq_disable(struct radeon_device *rdev);
 void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save);
index 674aabac2212b43951943f977cb29a87a090aa88..087383408a8f155ccfdd8ec1dd4ac98da8c83459 100644 (file)
@@ -129,6 +129,12 @@ int radeon_ib_pool_init(struct radeon_device *rdev)
        if (r) {
                return r;
        }
+
+       r = radeon_sa_bo_manager_start(rdev, &rdev->ring_tmp_bo);
+       if (r) {
+               return r;
+       }
+
        rdev->ib_pool_ready = true;
        if (radeon_debugfs_sa_init(rdev)) {
                dev_err(rdev->dev, "failed to register debugfs file for SA\n");
@@ -139,21 +145,12 @@ int radeon_ib_pool_init(struct radeon_device *rdev)
 void radeon_ib_pool_fini(struct radeon_device *rdev)
 {
        if (rdev->ib_pool_ready) {
+               radeon_sa_bo_manager_suspend(rdev, &rdev->ring_tmp_bo);
                radeon_sa_bo_manager_fini(rdev, &rdev->ring_tmp_bo);
                rdev->ib_pool_ready = false;
        }
 }
 
-int radeon_ib_pool_start(struct radeon_device *rdev)
-{
-       return radeon_sa_bo_manager_start(rdev, &rdev->ring_tmp_bo);
-}
-
-int radeon_ib_pool_suspend(struct radeon_device *rdev)
-{
-       return radeon_sa_bo_manager_suspend(rdev, &rdev->ring_tmp_bo);
-}
-
 int radeon_ib_ring_tests(struct radeon_device *rdev)
 {
        unsigned i;
index a464eb5e2df2c93306585579a5f5c60f43da10e0..aa26076ff468f395ca1ad47d4765425d68c9b15b 100644 (file)
@@ -426,9 +426,11 @@ static int rs400_startup(struct radeon_device *rdev)
                return r;
        }
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -470,7 +472,6 @@ int rs400_resume(struct radeon_device *rdev)
 
 int rs400_suspend(struct radeon_device *rdev)
 {
-       radeon_ib_pool_suspend(rdev);
        r100_cp_disable(rdev);
        radeon_wb_disable(rdev);
        r100_irq_disable(rdev);
@@ -482,7 +483,7 @@ void rs400_fini(struct radeon_device *rdev)
 {
        r100_cp_fini(rdev);
        radeon_wb_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_gem_fini(rdev);
        rs400_gart_fini(rdev);
        radeon_irq_kms_fini(rdev);
@@ -550,20 +551,14 @@ int rs400_init(struct radeon_device *rdev)
                return r;
        r300_set_reg_safe(rdev);
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = rs400_startup(rdev);
        if (r) {
                /* Somethings want wront with the accel init stop accel */
                dev_err(rdev->dev, "Disabling GPU acceleration\n");
                r100_cp_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                rs400_gart_fini(rdev);
                radeon_irq_kms_fini(rdev);
                rdev->accel_working = false;
index e11bc4651784535ce524df402959580ea2dbc9eb..6dad4e6177274ab2196e731e9131f62f658b10e2 100644 (file)
@@ -907,9 +907,11 @@ static int rs600_startup(struct radeon_device *rdev)
                return r;
        }
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -955,7 +957,6 @@ int rs600_resume(struct radeon_device *rdev)
 
 int rs600_suspend(struct radeon_device *rdev)
 {
-       radeon_ib_pool_suspend(rdev);
        r600_audio_fini(rdev);
        r100_cp_disable(rdev);
        radeon_wb_disable(rdev);
@@ -969,7 +970,7 @@ void rs600_fini(struct radeon_device *rdev)
        r600_audio_fini(rdev);
        r100_cp_fini(rdev);
        radeon_wb_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_gem_fini(rdev);
        rs600_gart_fini(rdev);
        radeon_irq_kms_fini(rdev);
@@ -1037,20 +1038,14 @@ int rs600_init(struct radeon_device *rdev)
                return r;
        rs600_set_safe_registers(rdev);
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = rs600_startup(rdev);
        if (r) {
                /* Somethings want wront with the accel init stop accel */
                dev_err(rdev->dev, "Disabling GPU acceleration\n");
                r100_cp_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                rs600_gart_fini(rdev);
                radeon_irq_kms_fini(rdev);
                rdev->accel_working = false;
index 159b6a43fda06598c3f76ca28c12b337d53105e6..0c026b0210d4346b8f54d8c8416db7b0b4ca5a51 100644 (file)
@@ -637,9 +637,11 @@ static int rs690_startup(struct radeon_device *rdev)
                return r;
        }
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -685,7 +687,6 @@ int rs690_resume(struct radeon_device *rdev)
 
 int rs690_suspend(struct radeon_device *rdev)
 {
-       radeon_ib_pool_suspend(rdev);
        r600_audio_fini(rdev);
        r100_cp_disable(rdev);
        radeon_wb_disable(rdev);
@@ -699,7 +700,7 @@ void rs690_fini(struct radeon_device *rdev)
        r600_audio_fini(rdev);
        r100_cp_fini(rdev);
        radeon_wb_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_gem_fini(rdev);
        rs400_gart_fini(rdev);
        radeon_irq_kms_fini(rdev);
@@ -768,20 +769,14 @@ int rs690_init(struct radeon_device *rdev)
                return r;
        rs600_set_safe_registers(rdev);
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = rs690_startup(rdev);
        if (r) {
                /* Somethings want wront with the accel init stop accel */
                dev_err(rdev->dev, "Disabling GPU acceleration\n");
                r100_cp_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                rs400_gart_fini(rdev);
                radeon_irq_kms_fini(rdev);
                rdev->accel_working = false;
index 7f08cedb533315f3c8102c8e1163141aede82068..01e9155541eac8611e2e5b610910584fa5f18047 100644 (file)
@@ -408,9 +408,11 @@ static int rv515_startup(struct radeon_device *rdev)
                return r;
        }
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -469,7 +471,7 @@ void rv515_fini(struct radeon_device *rdev)
 {
        r100_cp_fini(rdev);
        radeon_wb_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_gem_fini(rdev);
        rv370_pcie_gart_fini(rdev);
        radeon_agp_fini(rdev);
@@ -543,20 +545,14 @@ int rv515_init(struct radeon_device *rdev)
                return r;
        rv515_set_safe_registers(rdev);
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = rv515_startup(rdev);
        if (r) {
                /* Somethings want wront with the accel init stop accel */
                dev_err(rdev->dev, "Disabling GPU acceleration\n");
                r100_cp_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                radeon_irq_kms_fini(rdev);
                rv370_pcie_gart_fini(rdev);
                radeon_agp_fini(rdev);
index 7e230f62f0faf59d483bae56f426b9887b51221d..cc0ffb9be2bdf0f207d5d485216bfa6430c16c61 100644 (file)
@@ -951,9 +951,11 @@ static int rv770_startup(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_ring_tests(rdev);
        if (r)
@@ -994,7 +996,6 @@ int rv770_resume(struct radeon_device *rdev)
 int rv770_suspend(struct radeon_device *rdev)
 {
        r600_audio_fini(rdev);
-       radeon_ib_pool_suspend(rdev);
        r600_blit_suspend(rdev);
        r700_cp_stop(rdev);
        rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready = false;
@@ -1075,20 +1076,14 @@ int rv770_init(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
-
        r = rv770_startup(rdev);
        if (r) {
                dev_err(rdev->dev, "disabling GPU acceleration\n");
                r700_cp_fini(rdev);
                r600_irq_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                radeon_irq_kms_fini(rdev);
                rv770_pcie_gart_fini(rdev);
                rdev->accel_working = false;
@@ -1103,7 +1098,7 @@ void rv770_fini(struct radeon_device *rdev)
        r700_cp_fini(rdev);
        r600_irq_fini(rdev);
        radeon_wb_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_irq_kms_fini(rdev);
        rv770_pcie_gart_fini(rdev);
        r600_vram_scratch_fini(rdev);
index 78c790fec63fc04cc3014f5035d05728e7170501..40405d30272333b4b9fb91b025e78814be16683f 100644 (file)
@@ -3750,9 +3750,11 @@ static int si_startup(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = radeon_ib_pool_start(rdev);
-       if (r)
+       r = radeon_ib_pool_init(rdev);
+       if (r) {
+               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
                return r;
+       }
 
        r = radeon_ib_test(rdev, RADEON_RING_TYPE_GFX_INDEX, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX]);
        if (r) {
@@ -3807,7 +3809,6 @@ int si_resume(struct radeon_device *rdev)
 
 int si_suspend(struct radeon_device *rdev)
 {
-       radeon_ib_pool_suspend(rdev);
        radeon_vm_manager_suspend(rdev);
 #if 0
        r600_blit_suspend(rdev);
@@ -3900,12 +3901,7 @@ int si_init(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = radeon_ib_pool_init(rdev);
        rdev->accel_working = true;
-       if (r) {
-               dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
-               rdev->accel_working = false;
-       }
        r = radeon_vm_manager_init(rdev);
        if (r) {
                dev_err(rdev->dev, "vm manager initialization failed (%d).\n", r);
@@ -3918,7 +3914,7 @@ int si_init(struct radeon_device *rdev)
                si_irq_fini(rdev);
                si_rlc_fini(rdev);
                radeon_wb_fini(rdev);
-               r100_ib_fini(rdev);
+               radeon_ib_pool_fini(rdev);
                radeon_vm_manager_fini(rdev);
                radeon_irq_kms_fini(rdev);
                si_pcie_gart_fini(rdev);
@@ -3947,7 +3943,7 @@ void si_fini(struct radeon_device *rdev)
        si_rlc_fini(rdev);
        radeon_wb_fini(rdev);
        radeon_vm_manager_fini(rdev);
-       r100_ib_fini(rdev);
+       radeon_ib_pool_fini(rdev);
        radeon_irq_kms_fini(rdev);
        si_pcie_gart_fini(rdev);
        r600_vram_scratch_fini(rdev);