summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_dma.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index b9dea8a7..14e01179 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -589,11 +589,12 @@ static void i915_do_dispatch_flip(drm_device_t * dev, int pipe, int sync)
dspbase);
BEGIN_LP_RING(4);
+ OUT_RING(MI_WAIT_FOR_EVENT | (pipe ? MI_WAIT_FOR_PLANE_B_FLIP :
+ MI_WAIT_FOR_PLANE_A_FLIP));
OUT_RING(CMD_OP_DISPLAYBUFFER_INFO | (sync ? 0 : ASYNC_FLIP) |
(pipe ? DISPLAY_PLANE_B : DISPLAY_PLANE_A));
OUT_RING(dev_priv->sarea_priv->pitch * dev_priv->cpp);
OUT_RING(dspbase);
- OUT_RING(0);
ADVANCE_LP_RING();
dev_priv->sarea_priv->pf_current_page &= ~(0x3 << shift);
@@ -604,7 +605,6 @@ void i915_dispatch_flip(drm_device_t * dev, int pipes, int sync)
{
drm_i915_private_t *dev_priv = dev->dev_private;
int i;
- RING_LOCALS;
DRM_DEBUG("%s: pipes=0x%x pfCurrentPage=%d\n",
__FUNCTION__,
@@ -612,22 +612,6 @@ void i915_dispatch_flip(drm_device_t * dev, int pipes, int sync)
i915_emit_mi_flush(dev, MI_READ_FLUSH | MI_EXE_FLUSH);
- if (!sync) {
- u32 mi_wait = MI_WAIT_FOR_EVENT;
-
- /* Wait for pending flips to take effect */
- if (pipes & 0x1)
- mi_wait |= MI_WAIT_FOR_PLANE_A_FLIP;
-
- if (pipes & 0x2)
- mi_wait |= MI_WAIT_FOR_PLANE_B_FLIP;
-
- BEGIN_LP_RING(2);
- OUT_RING(mi_wait);
- OUT_RING(0);
- ADVANCE_LP_RING();
- }
-
for (i = 0; i < 2; i++)
if (pipes & (1 << i))
i915_do_dispatch_flip(dev, i, sync);