drm/radeon: sync all BOs involved in a CS
Subsystems (2)
PATCH 1/1 drm/radeon: sync all BOs involved in a CS
From: Christian König <[email protected]>
Not just the userspace relocs, otherwise we won't wait for a swapped out page tables to be swapped in again.
--- drivers/gpu/drm/radeon/radeon_cs.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)
drivers/gpu/drm/radeon/radeon_cs.c +7 -12
@@ -251,22 +251,20 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 prioritystatic 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; -if (!p->relocs[i].robj) -continue ; - - resv = p->relocs[i].robj->tbo.resv; + resv = reloc->robj->tbo.resv; r =radeon_sync_resv (p->rdev, &p->ib.sync, resv, - p->relocs[i].tv.shared); + reloc->tv.shared);if (r) -break ; +return r; } -return r; +return 0 ; }/* XXX: note that this is called from the legacy UMS CS ioctl as well */
@@ -505,9 +503,6 @@ static int radeon_bo_vm_update_pte(struct radeon_cs_parser *p,if (r)return r; -radeon_sync_resv (p->rdev, &p->ib.sync, vm->page_directory->tbo.resv, - true); - r =radeon_vm_clear_freed (rdev, vm);if (r)return r;
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Christian König
From: Christian König <[email protected]>
Not just the userspace relocs, otherwise we won't wait for a swapped out page tables to be swapped in again.
Signed-off-by Christian König <[email protected]>
Pulled into my -next tree. Unfortunately, this doesn't apply to -fixes or stable as is.
Alex
Quoted 49 lines
--- drivers/gpu/drm/radeon/radeon_cs.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)drivers/gpu/drm/radeon/radeon_cs.c +7
-13@@ -251,22 +251,20 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 prioritystatic 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; -if (!p->relocs[i].robj) -continue ; - - resv = p->relocs[i].robj->tbo.resv; + resv = reloc->robj->tbo.resv; r =radeon_sync_resv (p->rdev, &p->ib.sync, resv, - p->relocs[i].tv.shared); + reloc->tv.shared);if (r) -break ; +return r; } -return r; +return 0 ; }/* XXX: note that this is called from the legacy UMS CS ioctl as well */ @@ -505,9 +503,6 @@ static int radeon_bo_vm_update_pte(struct radeon_cs_parser *p,if (r)return r; -radeon_sync_resv (p->rdev, &p->ib.sync, vm->page_directory->tbo.resv, - true); - r =radeon_vm_clear_freed (rdev, vm);if (r)return r; --
Quoted 2 lines
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 27.11.2014 um 03:39 schrieb Alex Deucher:
Quoted 11 lines
Quoted 7 lines · Christian König
From: Christian König <[email protected]>
Not just the userspace relocs, otherwise we won't wait for a swapped out page tables to be swapped in again.
Signed-off-by Christian König <[email protected]>Pulled into my -next tree. Unfortunately, this doesn't apply to -fixes or stable as is.
I've just send out an updated patch based on you drm-next-3.18 branch.
Please apply as well,
Christian.
Quoted 46 lines
Alex
Quoted 42 lines
--- drivers/gpu/drm/radeon/radeon_cs.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)drivers/gpu/drm/radeon/radeon_cs.c +7
-9@@ -251,22 +251,20 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 prioritystatic 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; -if (!p->relocs[i].robj) -continue ; - - resv = p->relocs[i].robj->tbo.resv; + resv = reloc->robj->tbo.resv; r =radeon_sync_resv (p->rdev, &p->ib.sync, resv, - p->relocs[i].tv.shared); + reloc->tv.shared);if (r) -break ; +return r; } -return r; +return 0 ; }/* XXX: note that this is called from the legacy UMS CS ioctl as well */ @@ -505,9 +503,6 @@ static int radeon_bo_vm_update_pte(struct radeon_cs_parser *p,if (r)return r;
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/radeon/radeon_cs.c +0
-4-radeon_sync_resv (p->rdev, &p->ib.sync, vm->page_directory->tbo.resv, - true); - r =radeon_vm_clear_freed (rdev, vm);if (r)return r; --1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel