Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: ipu-v3: Do not wait for DMFC FIFO to clear when disabling DMFC channel

According to basic tests, it looks there is no issue if we don't wait for
DMFC FIFO to clear when disabling DMFC channel. NXP BSP doesn't do that,
either. This patch is needed to avoid the annoying warning caused by a
timeout on waiting for the FIFO to clear after we add the new
DRM_PLANE_COMMIT_NO_DISABLE_AFTER_MODESET flag to the imx-drm driver
which changes the procedure to disable display channel slightly.

Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Liu Ying <gnuiyl@gmail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Liu Ying and committed by
Philipp Zabel
448ae8ea 2b58e98d

+1 -17
+1 -17
drivers/gpu/ipu-v3/ipu-dmfc.c
··· 123 123 } 124 124 EXPORT_SYMBOL_GPL(ipu_dmfc_enable_channel); 125 125 126 - static void ipu_dmfc_wait_fifos(struct ipu_dmfc_priv *priv) 127 - { 128 - unsigned long timeout = jiffies + msecs_to_jiffies(1000); 129 - 130 - while ((readl(priv->base + DMFC_STAT) & 0x02fff000) != 0x02fff000) { 131 - if (time_after(jiffies, timeout)) { 132 - dev_warn(priv->dev, 133 - "Timeout waiting for DMFC FIFOs to clear\n"); 134 - break; 135 - } 136 - cpu_relax(); 137 - } 138 - } 139 - 140 126 void ipu_dmfc_disable_channel(struct dmfc_channel *dmfc) 141 127 { 142 128 struct ipu_dmfc_priv *priv = dmfc->priv; ··· 131 145 132 146 priv->use_count--; 133 147 134 - if (!priv->use_count) { 135 - ipu_dmfc_wait_fifos(priv); 148 + if (!priv->use_count) 136 149 ipu_module_disable(priv->ipu, IPU_CONF_DMFC_EN); 137 - } 138 150 139 151 if (priv->use_count < 0) 140 152 priv->use_count = 0;