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>
This commit is contained in:
parent
8b62c8c6df
commit
86b276385c
1 changed files with 7 additions and 10 deletions
|
@ -251,22 +251,19 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
|
||||||
|
|
||||||
static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
|
static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
|
||||||
{
|
{
|
||||||
int i, r = 0;
|
struct radeon_cs_reloc *reloc;
|
||||||
|
int r;
|
||||||
|
|
||||||
for (i = 0; i < p->nrelocs; i++) {
|
list_for_each_entry(reloc, &p->validated, tv.head) {
|
||||||
struct reservation_object *resv;
|
struct reservation_object *resv;
|
||||||
|
|
||||||
if (!p->relocs[i].robj)
|
resv = reloc->robj->tbo.resv;
|
||||||
continue;
|
|
||||||
|
|
||||||
resv = p->relocs[i].robj->tbo.resv;
|
|
||||||
r = radeon_semaphore_sync_resv(p->rdev, p->ib.semaphore, resv,
|
r = radeon_semaphore_sync_resv(p->rdev, p->ib.semaphore, resv,
|
||||||
p->relocs[i].tv.shared);
|
reloc->tv.shared);
|
||||||
|
|
||||||
if (r)
|
if (r)
|
||||||
break;
|
return r;
|
||||||
}
|
}
|
||||||
return r;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: note that this is called from the legacy UMS CS ioctl as well */
|
/* XXX: note that this is called from the legacy UMS CS ioctl as well */
|
||||||
|
|
Loading…
Add table
Reference in a new issue