imx-drm: imx-dp: when disabling the DP foreground channel, wait until the DP backgrou...
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 14 Apr 2014 21:53:21 +0000 (23:53 +0200)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 26 Apr 2014 10:24:18 +0000 (11:24 +0100)
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/staging/imx-drm/ipu-v3/ipu-dp.c

index 6980fa125517a89329a4e416ecd28dc04a2634da..d90f82a87d19d4f9ffd29a7f6ff6a5429cf3c26e 100644 (file)
@@ -277,6 +277,9 @@ void ipu_dp_disable_channel(struct ipu_dp *dp)
        writel(0, flow->base + DP_FG_POS);
        ipu_srm_dp_sync_update(priv->ipu);
 
+       if (ipu_idmac_channel_busy(priv->ipu, IPUV3_CHANNEL_MEM_BG_SYNC))
+               ipu_wait_interrupt(priv->ipu, IPU_IRQ_DP_SF_END, 50);
+
        mutex_unlock(&priv->mutex);
 }
 EXPORT_SYMBOL_GPL(ipu_dp_disable_channel);