Commit f6fd1d70 authored by Linus Walleij's avatar Linus Walleij
Browse files

drm/mcde: Support using DSI in LP mode



It is possible to set a flag in the struct mipi_dsi_device
so the panel is handled in low power (LP) mode. Some displays
only support this mode and it is also good for testing.

Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Cc: newbytee@protonmail.com
Cc: Stephan Gerhold <stephan@gerhold.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200808223122.1492124-2-linus.walleij@linaro.org
parent 44c3867a
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -812,10 +812,11 @@ static void mcde_dsi_start(struct mcde_dsi *d)
	/* Command mode, clear IF1 ID */
	val = readl(d->regs + DSI_CMD_MODE_CTL);
	/*
	 * If we enable low-power mode here, with
	 * val |= DSI_CMD_MODE_CTL_IF1_LP_EN
	 * If we enable low-power mode here,
	 * then display updates become really slow.
	 */
	if (d->mdsi->mode_flags & MIPI_DSI_MODE_LPM)
		val |= DSI_CMD_MODE_CTL_IF1_LP_EN;
	val &= ~DSI_CMD_MODE_CTL_IF1_ID_MASK;
	writel(val, d->regs + DSI_CMD_MODE_CTL);

@@ -904,10 +905,11 @@ static void mcde_dsi_bridge_pre_enable(struct drm_bridge *bridge)
		/* Command mode, clear IF1 ID */
		val = readl(d->regs + DSI_CMD_MODE_CTL);
		/*
		 * If we enable low-power mode here with
		 * val |= DSI_CMD_MODE_CTL_IF1_LP_EN
		 * If we enable low-power mode here
		 * the display updates become really slow.
		 */
		if (d->mdsi->mode_flags & MIPI_DSI_MODE_LPM)
			val |= DSI_CMD_MODE_CTL_IF1_LP_EN;
		val &= ~DSI_CMD_MODE_CTL_IF1_ID_MASK;
		writel(val, d->regs + DSI_CMD_MODE_CTL);
	}