Commit 86b276385c6a986872e4cd144f5940b156053c3f

Authored by Christian König
Committed by Alex Deucher
1 parent 8b62c8c6df

drm/radeon: sync all BOs involved in a CS v2

Not just the userspace relocs, otherwise we won't wait
for a swapped out page tables to be swapped in again.

v2: rebased on Alex current drm-fixes-3.18

Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Showing 1 changed file with 7 additions and 10 deletions Side-by-side Diff

drivers/gpu/drm/radeon/radeon_cs.c
... ... @@ -251,22 +251,19 @@
251 251  
252 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 258 struct reservation_object *resv;
258 259  
259   - if (!p->relocs[i].robj)
260   - continue;
261   -
262   - resv = p->relocs[i].robj->tbo.resv;
  260 + resv = reloc->robj->tbo.resv;
263 261 r = radeon_semaphore_sync_resv(p->rdev, p->ib.semaphore, resv,
264   - p->relocs[i].tv.shared);
265   -
  262 + reloc->tv.shared);
266 263 if (r)
267   - break;
  264 + return r;
268 265 }
269   - return r;
  266 + return 0;
270 267 }
271 268  
272 269 /* XXX: note that this is called from the legacy UMS CS ioctl as well */