Skip to content

Commit

Permalink
drm/radeon: fix possible lack of synchronization btw ttm and other ring
Browse files Browse the repository at this point in the history
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 <jglisse@redhat.com>
Reviewed by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Jerome Glisse authored and Dave Airlie committed May 9, 2012
1 parent 4f256e8 commit 133f4cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions drivers/gpu/drm/radeon/radeon_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
1 change: 0 additions & 1 deletion include/drm/radeon_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 133f4cb

Please sign in to comment.