aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_cs.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-02-01 11:32:42 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-02-01 13:57:10 -0500
commit43f1214aa094e46efdfc0255d9601be0e5ea0f62 (patch)
treef68b6472afdc8d460b73f67958aad4b21e06ee85 /drivers/gpu/drm/radeon/radeon_cs.c
parent24178ec42b0985d485886bc43b97e54ff173627e (diff)
drm/radeon: use IBs for VM page table updates v2
For very large page table updates, we can exceed the size of the ring. To avoid this, use an IB to perform the page table update. v2(ck): cleanup the IB infrastructure and the use it instead of filling the struct ourself. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cs.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_cs.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 1d214b66650f..70d38241b083 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -125,18 +125,6 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
125 return 0; 125 return 0;
126} 126}
127 127
128static void radeon_cs_sync_to(struct radeon_cs_parser *p,
129 struct radeon_fence *fence)
130{
131 struct radeon_fence *other;
132
133 if (!fence)
134 return;
135
136 other = p->ib.sync_to[fence->ring];
137 p->ib.sync_to[fence->ring] = radeon_fence_later(fence, other);
138}
139
140static void radeon_cs_sync_rings(struct radeon_cs_parser *p) 128static void radeon_cs_sync_rings(struct radeon_cs_parser *p)
141{ 129{
142 int i; 130 int i;
@@ -145,7 +133,7 @@ static void radeon_cs_sync_rings(struct radeon_cs_parser *p)
145 if (!p->relocs[i].robj) 133 if (!p->relocs[i].robj)
146 continue; 134 continue;
147 135
148 radeon_cs_sync_to(p, p->relocs[i].robj->tbo.sync_obj); 136 radeon_ib_sync_to(&p->ib, p->relocs[i].robj->tbo.sync_obj);
149 } 137 }
150} 138}
151 139
@@ -472,8 +460,9 @@ static int radeon_cs_ib_vm_chunk(struct radeon_device *rdev,
472 goto out; 460 goto out;
473 } 461 }
474 radeon_cs_sync_rings(parser); 462 radeon_cs_sync_rings(parser);
475 radeon_cs_sync_to(parser, vm->fence); 463 radeon_ib_sync_to(&parser->ib, vm->fence);
476 radeon_cs_sync_to(parser, radeon_vm_grab_id(rdev, vm, parser->ring)); 464 radeon_ib_sync_to(&parser->ib, radeon_vm_grab_id(
465 rdev, vm, parser->ring));
477 466
478 if ((rdev->family >= CHIP_TAHITI) && 467 if ((rdev->family >= CHIP_TAHITI) &&
479 (parser->chunk_const_ib_idx != -1)) { 468 (parser->chunk_const_ib_idx != -1)) {