drm/radeon/kms: call r100_cp_disable rather than duplicating code.
authorJerome Glisse <jglisse@redhat.com>
Wed, 9 Sep 2009 20:23:27 +0000 (22:23 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 10 Sep 2009 00:12:57 +0000 (10:12 +1000)
r100_cp_fini was duplicating code of r100_cp_disable, call r100_cp_disable
instead.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/radeon.h

index 938a6936d9290d57efdf299de56fcf5ce17e3cfc..4e1c55162ccb59a5d1b292233099759de9b147b1 100644 (file)
@@ -734,8 +734,7 @@ void r100_cp_fini(struct radeon_device *rdev)
                DRM_ERROR("Wait for CP idle timeout, shutting down CP.\n");
        }
        /* Disable ring */
-       rdev->cp.ready = false;
-       WREG32(RADEON_CP_CSQ_CNTL, 0);
+       r100_cp_disable(rdev);
        radeon_ring_fini(rdev);
        DRM_INFO("radeon: cp finalized\n");
 }
index 3299733ac3003d30c485b9624c5cd706dae5c84d..24574bc0f2af7a864b61a43aaddbb74a6114f2eb 100644 (file)
@@ -933,4 +933,7 @@ static inline void radeon_ring_write(struct radeon_device *rdev, uint32_t v)
 #define radeon_clear_surface_reg(rdev, r) ((rdev)->asic->clear_surface_reg((rdev), (r)))
 #define radeon_bandwidth_update(rdev) (rdev)->asic->bandwidth_update((rdev))
 
+/* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */
+void r100_cp_disable(struct radeon_device *rdev);
+
 #endif