diff options
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/i915_dma.c | 28 | ||||
-rw-r--r-- | shared-core/i915_drv.h | 4 |
2 files changed, 13 insertions, 19 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 883f3b9d..7078ec94 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -604,7 +604,6 @@ static void i915_do_dispatch_flip(drm_device_t * dev, int pipe, int sync) void i915_dispatch_flip(drm_device_t * dev, int pipes, int sync) { drm_i915_private_t *dev_priv = dev->dev_private; - u32 mi_wait = MI_WAIT_FOR_EVENT; int i; RING_LOCALS; @@ -613,24 +612,23 @@ void i915_dispatch_flip(drm_device_t * dev, int pipes, int sync) pipes, dev_priv->current_page, dev_priv->sarea_priv->pf_current_page); - if (pipes & 0x1) - mi_wait |= MI_WAIT_FOR_PLANE_A_FLIP; + i915_emit_mi_flush(dev, MI_READ_FLUSH | MI_EXE_FLUSH); - if (pipes & 0x2) - mi_wait |= MI_WAIT_FOR_PLANE_B_FLIP; + if (!sync) { + u32 mi_wait = MI_WAIT_FOR_EVENT; - i915_kernel_lost_context(dev); + /* Wait for pending flips to take effect */ + if (pipes & 0x1) + mi_wait |= MI_WAIT_FOR_PLANE_A_FLIP; - BEGIN_LP_RING(2); - OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE); - OUT_RING(0); - ADVANCE_LP_RING(); + if (pipes & 0x2) + mi_wait |= MI_WAIT_FOR_PLANE_B_FLIP; - /* Wait for pending flips to take effect */ - BEGIN_LP_RING(2); - OUT_RING(mi_wait); - OUT_RING(0); - ADVANCE_LP_RING(); + BEGIN_LP_RING(2); + OUT_RING(mi_wait); + OUT_RING(0); + ADVANCE_LP_RING(); + } for (i = 0; i < 2; i++) if (pipes & (1 << i)) diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h index cc6c12d1..de9105ad 100644 --- a/shared-core/i915_drv.h +++ b/shared-core/i915_drv.h @@ -252,10 +252,6 @@ extern int i915_wait_ring(drm_device_t * dev, int n, const char *caller); #define CMD_STORE_DWORD_IDX ((0x21<<23) | 0x1) #define CMD_OP_BATCH_BUFFER ((0x0<<29)|(0x30<<23)|0x1) -#define INST_PARSER_CLIENT 0x00000000 -#define INST_OP_FLUSH 0x02000000 -#define INST_FLUSH_MAP_CACHE 0x00000001 - #define CMD_MI_FLUSH (0x04 << 23) #define MI_NO_WRITE_FLUSH (1 << 2) #define MI_READ_FLUSH (1 << 0) |