gen6_emit_PIPE_CONTROL(p->dev,
PIPE_CONTROL_WRITE_TIMESTAMP,
- bo, index * sizeof(uint64_t) | PIPE_CONTROL_GLOBAL_GTT_WRITE,
+ bo, index * sizeof(uint64_t),
true, p->cp);
}
gen6_emit_PIPE_CONTROL(p->dev,
PIPE_CONTROL_DEPTH_STALL |
PIPE_CONTROL_WRITE_DEPTH_COUNT,
- bo, index * sizeof(uint64_t) | PIPE_CONTROL_GLOBAL_GTT_WRITE,
+ bo, index * sizeof(uint64_t),
true, p->cp);
}
ILO_GPE_VALID_GEN(dev, 6, 7.5);
+ assert(bo_offset % ((write_qword) ? 8 : 4) == 0);
+
if (dw1 & PIPE_CONTROL_CS_STALL) {
/*
* From the Sandy Bridge PRM, volume 2 part 1, page 73:
PIPE_CONTROL_DEPTH_CACHE_FLUSH)));
}
+ /*
+ * From the Sandy Bridge PRM, volume 1 part 3, page 19:
+ *
+ * "[DevSNB] PPGTT memory writes by MI_* (such as MI_STORE_DATA_IMM)
+ * and PIPE_CONTROL are not supported."
+ *
+ * The kernel will add the mapping automatically (when write domain is
+ * INTEL_DOMAIN_INSTRUCTION).
+ */
+ if (dev->gen == ILO_GEN(6) && bo)
+ bo_offset |= PIPE_CONTROL_GLOBAL_GTT_WRITE;
+
ilo_cp_begin(cp, cmd_len);
ilo_cp_write(cp, cmd | (cmd_len - 2));
ilo_cp_write(cp, dw1);