summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-06-06 16:20:38 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-06-06 16:20:38 +0100
commit62e4266b4dc9b5c3d165aca980738fa777a0f259 (patch)
tree5b3c4ac2a3d7525152d37a324810f609aeda3f0a
parent8f97157d2e807d6c9acb521ec59757f419e6518b (diff)
sna/gen5: Only emit the non-pipelined op after BLT commands
We were always terminating the batch with the non-pipelined op, and not just at the end of a BLT sequence. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen5_render.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index 72afe98d..eea0dd04 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -2540,22 +2540,11 @@ static void
gen5_render_context_switch(struct sna *sna,
int new_mode)
{
- if (sna->kgem.mode == 0)
- return;
-
/* Ironlake has a limitation that a 3D or Media command can't
* be the first command after a BLT, unless it's
- * non-pipelined. Instead of trying to track it and emit a
- * command at the right time, we just emit a dummy
- * non-pipelined 3D instruction after each blit.
+ * non-pipelined.
*/
- if (new_mode == KGEM_BLT) {
-#if 0
- OUT_BATCH(MI_FLUSH |
- MI_STATE_INSTRUCTION_CACHE_FLUSH |
- MI_INHIBIT_RENDER_CACHE_FLUSH);
-#endif
- } else {
+ if (sna->kgem.mode == KGEM_BLT) {
OUT_BATCH(CMD_POLY_STIPPLE_OFFSET << 16);
OUT_BATCH(0);
}