diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cs.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cs.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index 1c893447d7cd..6f377de099f9 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c | |||
@@ -251,22 +251,19 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority | |||
251 | 251 | ||
252 | static int radeon_cs_sync_rings(struct radeon_cs_parser *p) | 252 | static int radeon_cs_sync_rings(struct radeon_cs_parser *p) |
253 | { | 253 | { |
254 | int i, r = 0; | 254 | struct radeon_cs_reloc *reloc; |
255 | int r; | ||
255 | 256 | ||
256 | for (i = 0; i < p->nrelocs; i++) { | 257 | list_for_each_entry(reloc, &p->validated, tv.head) { |
257 | struct reservation_object *resv; | 258 | struct reservation_object *resv; |
258 | 259 | ||
259 | if (!p->relocs[i].robj) | 260 | resv = reloc->robj->tbo.resv; |
260 | continue; | ||
261 | |||
262 | resv = p->relocs[i].robj->tbo.resv; | ||
263 | r = radeon_semaphore_sync_resv(p->rdev, p->ib.semaphore, resv, | 261 | r = radeon_semaphore_sync_resv(p->rdev, p->ib.semaphore, resv, |
264 | p->relocs[i].tv.shared); | 262 | reloc->tv.shared); |
265 | |||
266 | if (r) | 263 | if (r) |
267 | break; | 264 | return r; |
268 | } | 265 | } |
269 | return r; | 266 | return 0; |
270 | } | 267 | } |
271 | 268 | ||
272 | /* XXX: note that this is called from the legacy UMS CS ioctl as well */ | 269 | /* XXX: note that this is called from the legacy UMS CS ioctl as well */ |
@@ -450,7 +447,7 @@ static void radeon_cs_parser_fini(struct radeon_cs_parser *parser, int error, bo | |||
450 | kfree(parser->track); | 447 | kfree(parser->track); |
451 | kfree(parser->relocs); | 448 | kfree(parser->relocs); |
452 | kfree(parser->relocs_ptr); | 449 | kfree(parser->relocs_ptr); |
453 | kfree(parser->vm_bos); | 450 | drm_free_large(parser->vm_bos); |
454 | for (i = 0; i < parser->nchunks; i++) | 451 | for (i = 0; i < parser->nchunks; i++) |
455 | drm_free_large(parser->chunks[i].kdata); | 452 | drm_free_large(parser->chunks[i].kdata); |
456 | kfree(parser->chunks); | 453 | kfree(parser->chunks); |