aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/rs690.c
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2011-11-20 15:45:34 -0500
committerDave Airlie <airlied@redhat.com>2011-12-20 14:51:19 -0500
commit30eb77f4e6ba20f797af4ff79807fae7cb67429e (patch)
tree0143bb70c00f3080d70cf8e2a966cf8d7f137dfc /drivers/gpu/drm/radeon/rs690.c
parentaf9720f4907e0a4a4341a015efe08026b3d3eb2e (diff)
drm/radeon: precompute fence cpu/gpu addr once v3
Add a start fence driver helper function which will be call once for each ring and will compute cpu/gpu addr for fence depending on wether to use wb buffer or scratch reg. This patch replace initialize fence driver separately which was broken in regard of GPU lockup. The fence list for created, emited, signaled must be initialize once and only from the asic init callback not from the startup call back which is call from the gpu reset. v2: With this in place we no longer need to know the number of rings in fence_driver_init, also writing to the scratch reg before knowing its offset is a bad idea. v3: rebase on top of change to previous patch in the serie Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rs690.c')
-rw-r--r--drivers/gpu/drm/radeon/rs690.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
index 8aa5e7ef2efc..ae941d196d3f 100644
--- a/drivers/gpu/drm/radeon/rs690.c
+++ b/drivers/gpu/drm/radeon/rs690.c
@@ -621,6 +621,12 @@ static int rs690_startup(struct radeon_device *rdev)
621 if (r) 621 if (r)
622 return r; 622 return r;
623 623
624 r = radeon_fence_driver_start_ring(rdev, RADEON_RING_TYPE_GFX_INDEX);
625 if (r) {
626 dev_err(rdev->dev, "failed initializing CP fences (%d).\n", r);
627 return r;
628 }
629
624 /* Enable IRQ */ 630 /* Enable IRQ */
625 rs600_irq_set(rdev); 631 rs600_irq_set(rdev);
626 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL); 632 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
@@ -735,7 +741,7 @@ int rs690_init(struct radeon_device *rdev)
735 rs690_mc_init(rdev); 741 rs690_mc_init(rdev);
736 rv515_debugfs(rdev); 742 rv515_debugfs(rdev);
737 /* Fence driver */ 743 /* Fence driver */
738 r = radeon_fence_driver_init(rdev, 1); 744 r = radeon_fence_driver_init(rdev);
739 if (r) 745 if (r)
740 return r; 746 return r;
741 r = radeon_irq_kms_init(rdev); 747 r = radeon_irq_kms_init(rdev);