drm/radeon: skip async dma init on r6xx
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Jan 2014 15:59:51 +0000 (10:59 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Jan 2014 20:23:04 +0000 (15:23 -0500)
The hw is buggy and it's not currently used, but it's
currently still initialized by the driver.  Skip the init.
Skipping init also seems to improve stability with dpm on
some r6xx asics.

bug:
https://bugs.freedesktop.org/show_bug.cgi?id=66963

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/radeon_cs.c

index 3dce370adc1b78aedc2b316f81ef8375c8ed7309..4d69d1745d5416f230456eb001185472ed616154 100644 (file)
@@ -2612,6 +2612,11 @@ int r600_cp_resume(struct radeon_device *rdev)
                ring->ready = false;
                return r;
        }
+
+       /* RV7xx+ uses dma for paging */
+       if (rdev->family < CHIP_RV770)
+               radeon_ttm_set_active_vram_size(rdev, rdev->mc.real_vram_size);
+
        return 0;
 }
 
@@ -2895,12 +2900,6 @@ static int r600_startup(struct radeon_device *rdev)
                return r;
        }
 
-       r = radeon_fence_driver_start_ring(rdev, R600_RING_TYPE_DMA_INDEX);
-       if (r) {
-               dev_err(rdev->dev, "failed initializing DMA fences (%d).\n", r);
-               return r;
-       }
-
        /* Enable IRQ */
        if (!rdev->irq.installed) {
                r = radeon_irq_kms_init(rdev);
@@ -2922,12 +2921,6 @@ static int r600_startup(struct radeon_device *rdev)
        if (r)
                return r;
 
-       ring = &rdev->ring[R600_RING_TYPE_DMA_INDEX];
-       r = radeon_ring_init(rdev, ring, ring->ring_size, R600_WB_DMA_RPTR_OFFSET,
-                            DMA_PACKET(DMA_PACKET_NOP, 0, 0, 0));
-       if (r)
-               return r;
-
        r = r600_cp_load_microcode(rdev);
        if (r)
                return r;
@@ -2935,10 +2928,6 @@ static int r600_startup(struct radeon_device *rdev)
        if (r)
                return r;
 
-       r = r600_dma_resume(rdev);
-       if (r)
-               return r;
-
        r = radeon_ib_pool_init(rdev);
        if (r) {
                dev_err(rdev->dev, "IB initialization failed (%d).\n", r);
@@ -2997,7 +2986,6 @@ int r600_suspend(struct radeon_device *rdev)
        radeon_pm_suspend(rdev);
        r600_audio_fini(rdev);
        r600_cp_stop(rdev);
-       r600_dma_stop(rdev);
        r600_irq_suspend(rdev);
        radeon_wb_disable(rdev);
        r600_pcie_gart_disable(rdev);
@@ -3077,9 +3065,6 @@ int r600_init(struct radeon_device *rdev)
        rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ring_obj = NULL;
        r600_ring_init(rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX], 1024 * 1024);
 
-       rdev->ring[R600_RING_TYPE_DMA_INDEX].ring_obj = NULL;
-       r600_ring_init(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX], 64 * 1024);
-
        rdev->ih.ring_obj = NULL;
        r600_ih_ring_init(rdev, 64 * 1024);
 
@@ -3092,7 +3077,6 @@ int r600_init(struct radeon_device *rdev)
        if (r) {
                dev_err(rdev->dev, "disabling GPU acceleration\n");
                r600_cp_fini(rdev);
-               r600_dma_fini(rdev);
                r600_irq_fini(rdev);
                radeon_wb_fini(rdev);
                radeon_ib_pool_fini(rdev);
@@ -3109,7 +3093,6 @@ void r600_fini(struct radeon_device *rdev)
        radeon_pm_fini(rdev);
        r600_audio_fini(rdev);
        r600_cp_fini(rdev);
-       r600_dma_fini(rdev);
        r600_irq_fini(rdev);
        radeon_wb_fini(rdev);
        radeon_ib_pool_fini(rdev);
index a8e3342fd4a9d0d4a1f67c0a6cee0f3134ffa8d2..dfb5a1db87d4a8651fd3a9bf7494d14287af7803 100644 (file)
@@ -138,7 +138,7 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
                                p->ring = R600_RING_TYPE_DMA_INDEX;
                        else
                                p->ring = CAYMAN_RING_TYPE_DMA1_INDEX;
-               } else if (p->rdev->family >= CHIP_R600) {
+               } else if (p->rdev->family >= CHIP_RV770) {
                        p->ring = R600_RING_TYPE_DMA_INDEX;
                } else {
                        return -EINVAL;