summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-29 10:27:18 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-29 10:27:18 +0000
commit56155c91afb5a0dcafe4dbc22ade3b7c0c977674 (patch)
treee3dabc45d465db0a63d459445810556b40c50415
parent5b1e9e15738b9001346ab6e0166f861ce308008e (diff)
sna/gen6: Set the batch mode prior to checking limits and flushing
If we change contexts, then we will submit the batch obsoleting the earlier resource checks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen6_render.c5
-rw-r--r--src/sna/gen7_render.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index a739f5cc..de6ede94 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -1838,6 +1838,7 @@ gen6_render_video(struct sna *sna,
tmp.u.gen6.nr_inputs = 1;
tmp.u.gen6.ve_id = 1;
+ kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (!kgem_check_bo(&sna->kgem, tmp.dst.bo, frame->bo, NULL))
kgem_submit(&sna->kgem);
@@ -2223,6 +2224,7 @@ gen6_render_composite(struct sna *sna,
tmp->boxes = gen6_render_composite_boxes;
tmp->done = gen6_render_composite_done;
+ kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (!kgem_check_bo(&sna->kgem,
tmp->dst.bo, tmp->src.bo, tmp->mask.bo,
NULL))
@@ -2531,6 +2533,7 @@ gen6_render_composite_spans(struct sna *sna,
tmp->boxes = gen6_render_composite_spans_boxes;
tmp->done = gen6_render_composite_spans_done;
+ kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (!kgem_check_bo(&sna->kgem,
tmp->base.dst.bo, tmp->base.src.bo,
NULL))
@@ -2673,6 +2676,7 @@ gen6_render_copy_boxes(struct sna *sna, uint8_t alu,
tmp.u.gen6.nr_inputs = 1;
tmp.u.gen6.ve_id = 1;
+ kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (!kgem_check_bo(&sna->kgem, dst_bo, src_bo, NULL))
kgem_submit(&sna->kgem);
@@ -2820,6 +2824,7 @@ gen6_render_copy(struct sna *sna, uint8_t alu,
op->base.u.gen6.nr_inputs = 1;
op->base.u.gen6.ve_id = 1;
+ kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (!kgem_check_bo(&sna->kgem, dst_bo, src_bo, NULL))
kgem_submit(&sna->kgem);
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index ce14a5d3..3159da32 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -1953,6 +1953,7 @@ gen7_render_video(struct sna *sna,
tmp.u.gen7.nr_inputs = 1;
tmp.u.gen7.ve_id = 1;
+ kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (!kgem_check_bo(&sna->kgem, tmp.dst.bo, frame->bo, NULL))
kgem_submit(&sna->kgem);
@@ -2343,6 +2344,7 @@ gen7_render_composite(struct sna *sna,
tmp->boxes = gen7_render_composite_boxes;
tmp->done = gen7_render_composite_done;
+ kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (!kgem_check_bo(&sna->kgem,
tmp->dst.bo, tmp->src.bo, tmp->mask.bo,
NULL))
@@ -2651,6 +2653,7 @@ gen7_render_composite_spans(struct sna *sna,
tmp->boxes = gen7_render_composite_spans_boxes;
tmp->done = gen7_render_composite_spans_done;
+ kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (!kgem_check_bo(&sna->kgem,
tmp->base.dst.bo, tmp->base.src.bo,
NULL))
@@ -2793,6 +2796,7 @@ gen7_render_copy_boxes(struct sna *sna, uint8_t alu,
tmp.u.gen7.nr_inputs = 1;
tmp.u.gen7.ve_id = 1;
+ kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (!kgem_check_bo(&sna->kgem, dst_bo, src_bo, NULL))
kgem_submit(&sna->kgem);
@@ -2940,6 +2944,7 @@ gen7_render_copy(struct sna *sna, uint8_t alu,
op->base.u.gen7.nr_inputs = 1;
op->base.u.gen7.ve_id = 1;
+ kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (!kgem_check_bo(&sna->kgem, dst_bo, src_bo, NULL))
kgem_submit(&sna->kgem);