aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/ni.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2011-11-17 14:57:50 -0500
committerDave Airlie <airlied@redhat.com>2011-12-20 14:51:54 -0500
commitb40e7e1608c332767e6b94bed7af84b30418e739 (patch)
treedeedf98f2830500cd5fb524c07ed21fc1fc6c57c /drivers/gpu/drm/radeon/ni.c
parent78c5560a08114d7bbbce04cee1628049a22ea104 (diff)
drm/radeon/kms: add cayman specific fence_ring_emit
cayman is wb only and doesn't have a VC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/ni.c')
-rw-r--r--drivers/gpu/drm/radeon/ni.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index d0d23c547643..26d066442934 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -1009,6 +1009,27 @@ void cayman_pcie_gart_fini(struct radeon_device *rdev)
1009/* 1009/*
1010 * CP. 1010 * CP.
1011 */ 1011 */
1012void cayman_fence_ring_emit(struct radeon_device *rdev,
1013 struct radeon_fence *fence)
1014{
1015 struct radeon_ring *ring = &rdev->ring[fence->ring];
1016 u64 addr = rdev->fence_drv[fence->ring].gpu_addr;
1017
1018 /* flush read cache over gart */
1019 radeon_ring_write(ring, PACKET3(PACKET3_SURFACE_SYNC, 3));
1020 radeon_ring_write(ring, PACKET3_TC_ACTION_ENA | PACKET3_SH_ACTION_ENA);
1021 radeon_ring_write(ring, 0xFFFFFFFF);
1022 radeon_ring_write(ring, 0);
1023 radeon_ring_write(ring, 10); /* poll interval */
1024 /* EVENT_WRITE_EOP - flush caches, send int */
1025 radeon_ring_write(ring, PACKET3(PACKET3_EVENT_WRITE_EOP, 4));
1026 radeon_ring_write(ring, EVENT_TYPE(CACHE_FLUSH_AND_INV_EVENT_TS) | EVENT_INDEX(5));
1027 radeon_ring_write(ring, addr & 0xffffffff);
1028 radeon_ring_write(ring, (upper_32_bits(addr) & 0xff) | DATA_SEL(1) | INT_SEL(2));
1029 radeon_ring_write(ring, fence->seq);
1030 radeon_ring_write(ring, 0);
1031}
1032
1012static void cayman_cp_enable(struct radeon_device *rdev, bool enable) 1033static void cayman_cp_enable(struct radeon_device *rdev, bool enable)
1013{ 1034{
1014 if (enable) 1035 if (enable)