gen4_emit_pipe_flush(struct sna *sna)
{
#if 1
- OUT_BATCH(GEN4_PIPE_CONTROL | (4 - 2));
- OUT_BATCH(GEN4_PIPE_CONTROL_WC_FLUSH);
+ OUT_BATCH(GEN4_PIPE_CONTROL |
+ GEN4_PIPE_CONTROL_WC_FLUSH |
+ (4 - 2));
+ OUT_BATCH(0);
OUT_BATCH(0);
OUT_BATCH(0);
#else
inline static void
gen4_emit_pipe_invalidate(struct sna *sna)
{
-#if 0
- OUT_BATCH(GEN4_PIPE_CONTROL | (4 - 2));
- OUT_BATCH(GEN4_PIPE_CONTROL_WC_FLUSH | GEN4_PIPE_CONTROL_TC_FLUSH);
+ OUT_BATCH(GEN4_PIPE_CONTROL |
+ GEN4_PIPE_CONTROL_WC_FLUSH |
+ (sna->kgem.gen >= 045 ? GEN4_PIPE_CONTROL_TC_FLUSH : 0) |
+ (4 - 2));
+ OUT_BATCH(0);
OUT_BATCH(0);
OUT_BATCH(0);
-#else
- OUT_BATCH(MI_FLUSH);
-#endif
}
static void gen4_emit_primitive(struct sna *sna)
#define GEN4_PIPE_CONTROL_DEPTH_STALL (1 << 13)
#define GEN4_PIPE_CONTROL_WC_FLUSH (1 << 12)
#define GEN4_PIPE_CONTROL_IS_FLUSH (1 << 11)
-#define GEN4_PIPE_CONTROL_TC_FLUSH (1 << 10)
+#define GEN4_PIPE_CONTROL_TC_FLUSH (1 << 10) /* ctg+ */
#define GEN4_PIPE_CONTROL_NOTIFY_ENABLE (1 << 8)
#define GEN4_PIPE_CONTROL_GLOBAL_GTT (1 << 2)
#define GEN4_PIPE_CONTROL_LOCAL_PGTT (0 << 2)
gen5_emit_pipe_flush(struct sna *sna)
{
#if 0
- OUT_BATCH(GEN5_PIPE_CONTROL | (4 - 2));
- OUT_BATCH(GEN5_PIPE_CONTROL_WC_FLUSH);
+ OUT_BATCH(GEN5_PIPE_CONTROL |
+ GEN5_PIPE_CONTROL_WC_FLUSH |
+ (4 - 2));
+ OUT_BATCH(0);
OUT_BATCH(0);
OUT_BATCH(0);
#else