drm/radeon: fix possible lack of synchronization btw ttm and other ring
Subsystems (2)
PATCH 1/1 drm/radeon: fix possible lack of synchronization btw ttm and other ring
From: Jerome Glisse <[email protected]>
We need to sync with the GFX ring as ttm might have schedule bo move on it and new command scheduled for other ring need to wait for bo data to be in place.
--- drivers/gpu/drm/radeon/radeon_cs.c | 12 ++++++------ include/drm/radeon_drm.h | 1 - 2 files changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/radeon/radeon_cs.c +6 -6
@@ -122,15 +122,15 @@ static int radeon_cs_sync_rings(struct radeon_cs_parser *p)int i, r;for (i =0 ; i < p->nrelocs; i++) { +struct radeon_fence *fence; +if (!p->relocs[i].robj || !p->relocs[i].robj->tbo.sync_obj)continue ; -if (!(p->relocs[i].flags &RADEON_RELOC_DONT_SYNC )) { -struct radeon_fence *fence = p->relocs[i].robj->tbo.sync_obj; -if (fence->ring != p->ring && !radeon_fence_signaled (fence)) { - sync_to_ring[fence->ring] = true; - need_sync = true; - } + fence = p->relocs[i].robj->tbo.sync_obj; +if (fence->ring != p->ring && !radeon_fence_signaled (fence)) { + sync_to_ring[fence->ring] = true; + need_sync = true; } }
include/drm/radeon_drm.h +0 -1
@@ -926,7 +926,6 @@ struct drm_radeon_cs_chunk { };/* drm_radeon_cs_reloc.flags */ -#define RADEON_RELOC_DONT_SYNC 0x01struct drm_radeon_cs_reloc {uint32_t handle;
Signature · 1 line
1.7.7.6
Quoted 7 lines · On Thu, May 3, 2012 at 1:44 PM, <[email protected]> wrote:
From: Jerome Glisse <[email protected]>
We need to sync with the GFX ring as ttm might have schedule bo move on it and new command scheduled for other ring need to wait for bo data to be in place.
Signed-off-by Jerome Glisse <[email protected]>
Quoted 50 lines
---
drivers/gpu/drm/radeon/radeon_cs.c | 12 ++++++------include/drm/radeon_drm.h| 1 -2 files changed, 6 insertions(+), 7 deletions(-)drivers/gpu/drm/radeon/radeon_cs.c +6
-6@@ -122,15 +122,15 @@ static int radeon_cs_sync_rings(struct radeon_cs_parser *p) int i, r; for (i = 0; i < p->nrelocs; i++) { + struct radeon_fence *fence; + if (!p->relocs[i].robj || !p->relocs[i].robj->tbo.sync_obj) continue; - if (!(p->relocs[i].flags & RADEON_RELOC_DONT_SYNC)) { - struct radeon_fence *fence = p->relocs[i].robj->tbo.sync_obj; - if (fence->ring != p->ring && !radeon_fence_signaled(fence)) { - sync_to_ring[fence->ring] = true; - need_sync = true; - } + fence = p->relocs[i].robj->tbo.sync_obj; + if (fence->ring != p->ring && !radeon_fence_signaled(fence)) { + sync_to_ring[fence->ring] = true; + need_sync = true; } }include/drm/radeon_drm.h +0
-2@@ -926,7 +926,6 @@ struct drm_radeon_cs_chunk { }; /* drm_radeon_cs_reloc.flags */ -#define RADEON_RELOC_DONT_SYNC 0x01 struct drm_radeon_cs_reloc { uint32_t handle; --1.7.7.6
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · On 03.05.2012 19:44, [email protected] wrote:
From: Jerome Glisse<[email protected]>
We need to sync with the GFX ring as ttm might have schedule bo move on it and new command scheduled for other ring need to wait for bo data to be in place.
Signed-off-by Jerome Glisse<[email protected]>
Quoted 43 lines
--- drivers/gpu/drm/radeon/radeon_cs.c | 12 ++++++------ include/drm/radeon_drm.h | 1 - 2 files changed, 6 insertions(+), 7 deletions(-)drivers/gpu/drm/radeon/radeon_cs.c +6
-6@@ -122,15 +122,15 @@ static int radeon_cs_sync_rings(struct radeon_cs_parser *p)int i, r;for (i =0 ; i< p->nrelocs; i++) { +struct radeon_fence *fence; +if (!p->relocs[i].robj || !p->relocs[i].robj->tbo.sync_obj)continue ; -if (!(p->relocs[i].flags&RADEON_RELOC_DONT_SYNC )) { -struct radeon_fence *fence = p->relocs[i].robj->tbo.sync_obj; -if (fence->ring != p->ring&& !radeon_fence_signaled (fence)) { - sync_to_ring[fence->ring] = true; - need_sync = true; - } + fence = p->relocs[i].robj->tbo.sync_obj; +if (fence->ring != p->ring&& !radeon_fence_signaled (fence)) { + sync_to_ring[fence->ring] = true; + need_sync = true; } }include/drm/radeon_drm.h +0
-1@@ -926,7 +926,6 @@ struct drm_radeon_cs_chunk { };/* drm_radeon_cs_reloc.flags */ -#define RADEON_RELOC_DONT_SYNC 0x01struct drm_radeon_cs_reloc {uint32_t handle;
Dave Airlie
maintainerQuoted 7 lines
Quoted 7 lines
From: Jerome Glisse<[email protected]>
We need to sync with the GFX ring as ttm might have schedule bo move on it and new command scheduled for other ring need to wait for bo data to be in place.
Is this required for -fixes? if so it doesn't apply clean.
Dave.
Quoted 7 lines · Dave Airlie
Quoted 6 lines
Quoted 6 lines
From: Jerome Glisse<[email protected]>
We need to sync with the GFX ring as ttm might have schedule bo move on it and new command scheduled for other ring need to wait for bo data to be in place.
Is this required for -fixes? if so it doesn't apply clean.
Nope, only drm-next, since there isn't any public available client that makes use of it.
Christian.