i915: Do not wait for pending flips on both pipes at the same time.

The MI_WAIT_FOR_EVENT instruction does not support waiting for several events
at once, so this should fix the lockups with page flipping when both pipes are
enabled.
Michel Dänzer 2007-03-09 16:39:13 +01:00
parent a33859184a
commit 0741064df4
1 changed files with 2 additions and 18 deletions

View File

@ -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);