aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/rs600.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-08-27 18:25:25 -0400
committerDave Airlie <airlied@redhat.com>2010-10-05 21:38:08 -0400
commit724c80e1d630296d1324859e964d80d35007d83c (patch)
tree954e86447e1c259160d09c732ac0eb0289b2ec8b /drivers/gpu/drm/radeon/rs600.c
parentb70d6bb3f67b2e2964abafb0117f1733f062cba5 (diff)
drm/radeon/kms: enable writeback (v2)
When writeback is enabled, the GPU shadows writes to certain registers into a buffer in memory. The driver can then read the values from the shadow rather than reading back from the register across the bus. Writeback can be disabled by setting the no_wb module param to 1. On r6xx/r7xx/evergreen, the following registers are shadowed: - CP scratch registers - CP read pointer - IH write pointer On r1xx-rr5xx, the following registers are shadowed: - CP scratch registers - CP read pointer v2: - Combine wb patches for r6xx-evergreen and r1xx-r5xx - Writeback is disabled on AGP boards since it tends to be unreliable on AGP using the gart. - Check radeon_wb_init return values properly. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rs600.c')
-rw-r--r--drivers/gpu/drm/radeon/rs600.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index cc05b230d7ef..8d8359a5d459 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -795,6 +795,12 @@ static int rs600_startup(struct radeon_device *rdev)
795 r = rs600_gart_enable(rdev); 795 r = rs600_gart_enable(rdev);
796 if (r) 796 if (r)
797 return r; 797 return r;
798
799 /* allocate wb buffer */
800 r = radeon_wb_init(rdev);
801 if (r)
802 return r;
803
798 /* Enable IRQ */ 804 /* Enable IRQ */
799 rs600_irq_set(rdev); 805 rs600_irq_set(rdev);
800 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL); 806 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
@@ -804,9 +810,6 @@ static int rs600_startup(struct radeon_device *rdev)
804 dev_err(rdev->dev, "failled initializing CP (%d).\n", r); 810 dev_err(rdev->dev, "failled initializing CP (%d).\n", r);
805 return r; 811 return r;
806 } 812 }
807 r = r100_wb_init(rdev);
808 if (r)
809 dev_err(rdev->dev, "failled initializing WB (%d).\n", r);
810 r = r100_ib_init(rdev); 813 r = r100_ib_init(rdev);
811 if (r) { 814 if (r) {
812 dev_err(rdev->dev, "failled initializing IB (%d).\n", r); 815 dev_err(rdev->dev, "failled initializing IB (%d).\n", r);
@@ -847,7 +850,7 @@ int rs600_suspend(struct radeon_device *rdev)
847{ 850{
848 r600_audio_fini(rdev); 851 r600_audio_fini(rdev);
849 r100_cp_disable(rdev); 852 r100_cp_disable(rdev);
850 r100_wb_disable(rdev); 853 radeon_wb_disable(rdev);
851 rs600_irq_disable(rdev); 854 rs600_irq_disable(rdev);
852 rs600_gart_disable(rdev); 855 rs600_gart_disable(rdev);
853 return 0; 856 return 0;
@@ -857,7 +860,7 @@ void rs600_fini(struct radeon_device *rdev)
857{ 860{
858 r600_audio_fini(rdev); 861 r600_audio_fini(rdev);
859 r100_cp_fini(rdev); 862 r100_cp_fini(rdev);
860 r100_wb_fini(rdev); 863 radeon_wb_fini(rdev);
861 r100_ib_fini(rdev); 864 r100_ib_fini(rdev);
862 radeon_gem_fini(rdev); 865 radeon_gem_fini(rdev);
863 rs600_gart_fini(rdev); 866 rs600_gart_fini(rdev);
@@ -931,7 +934,7 @@ int rs600_init(struct radeon_device *rdev)
931 /* Somethings want wront with the accel init stop accel */ 934 /* Somethings want wront with the accel init stop accel */
932 dev_err(rdev->dev, "Disabling GPU acceleration\n"); 935 dev_err(rdev->dev, "Disabling GPU acceleration\n");
933 r100_cp_fini(rdev); 936 r100_cp_fini(rdev);
934 r100_wb_fini(rdev); 937 radeon_wb_fini(rdev);
935 r100_ib_fini(rdev); 938 r100_ib_fini(rdev);
936 rs600_gart_fini(rdev); 939 rs600_gart_fini(rdev);
937 radeon_irq_kms_fini(rdev); 940 radeon_irq_kms_fini(rdev);