Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 133f4cb3 authored by Jerome Glisse's avatar Jerome Glisse Committed by Dave Airlie
Browse files

drm/radeon: fix possible lack of synchronization btw ttm and other ring



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: default avatarJerome Glisse <jglisse@redhat.com>
Reviewed by: Christian König <christian.koenig@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 4f256e8a
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -122,17 +122,17 @@ 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;
		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;
		}
	}
	}

	if (!need_sync) {
		return 0;
+0 −1
Original line number Diff line number Diff line
@@ -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;