summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-03-02 09:08:54 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2015-03-02 09:13:59 +0000
commitcb2269d1308f2a410508aafecc8b0ee51959afcf (patch)
tree3bf3a0601af3d379d6dbd4adc926312435d0c7ce /src/sna
parentf6ba71ac194a19c80aa64f4769f76a47ebb7bd16 (diff)
sna/gen3: Disable fences associated with vertex buffers
Could gen3 actually be trying to read these through a fence? References: https://bugs.freedesktop.org/show_bug.cgi?id=89334 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/gen3_render.c4
-rw-r--r--src/sna/kgem.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index a6add062..c3134f44 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -2251,7 +2251,7 @@ static int gen3_vertex_finish(struct sna *sna)
if (sna->render.vertex_reloc[0]) {
sna->kgem.batch[sna->render.vertex_reloc[0]] =
kgem_add_reloc(&sna->kgem, sna->render.vertex_reloc[0],
- bo, I915_GEM_DOMAIN_VERTEX << 16, 0);
+ bo, I915_GEM_DOMAIN_VERTEX << 16 | KGEM_RELOC_FENCED, 0);
sna->render.vertex_reloc[0] = 0;
}
@@ -2345,7 +2345,7 @@ static void gen3_vertex_close(struct sna *sna)
DBG(("%s: reloc = %d\n", __FUNCTION__, sna->render.vertex_reloc[0]));
sna->kgem.batch[sna->render.vertex_reloc[0]] =
kgem_add_reloc(&sna->kgem, sna->render.vertex_reloc[0],
- bo, I915_GEM_DOMAIN_VERTEX << 16, delta);
+ bo, I915_GEM_DOMAIN_VERTEX << 16 | KGEM_RELOC_FENCED, delta);
sna->render.vertex_reloc[0] = 0;
if (sna->render.vbo == NULL) {
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index c5126450..1ff092cc 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3648,7 +3648,8 @@ void _kgem_submit(struct kgem *kgem)
kgem->exec[i].relocs_ptr = (uintptr_t)kgem->reloc;
kgem->exec[i].alignment = 0;
kgem->exec[i].offset = rq->bo->presumed_offset;
- kgem->exec[i].flags = 0;
+ /* Make sure the kernel releases any fence, ignored if gen4+ */
+ kgem->exec[i].flags = EXEC_OBJECT_NEEDS_FENCE;
kgem->exec[i].rsvd1 = 0;
kgem->exec[i].rsvd2 = 0;