[PATCH] drm/i915/dsi: Send SHUTDOWN only for v3+ VBT's

Mika Kahola mika.kahola at intel.com
Wed Aug 30 12:39:55 UTC 2017


According to spec we should send SHUTDOWN before MIPI_SEQ_DISPLAY_OFF for
v3+ VBT's. Testing with VBT v3 the current implementation yields the
following error message

*ERROR* Video mode command 0x00000041 send failed.

To get rid of this error message, let's limit SHUTDOWN only for VBT
versions 3 or higher.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102404
Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
 drivers/gpu/drm/i915/intel_dsi.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 2a0f5d3..d2bef02 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -261,9 +261,9 @@ static int dpi_send_cmd(struct intel_dsi *intel_dsi, u32 cmd, bool hs,
 	/* clear bit */
 	I915_WRITE(MIPI_INTR_STAT(port), SPL_PKT_SENT_INTERRUPT);
 
-	/* XXX: old code skips write if control unchanged */
+	/* skip write if control unchanged */
 	if (cmd == I915_READ(MIPI_DPI_CONTROL(port)))
-		DRM_ERROR("Same special packet %02x twice in a row.\n", cmd);
+		return 0;
 
 	I915_WRITE(MIPI_DPI_CONTROL(port), cmd);
 
@@ -913,10 +913,9 @@ static void intel_dsi_disable(struct intel_encoder *encoder,
 
 	/*
 	 * According to the spec we should send SHUTDOWN before
-	 * MIPI_SEQ_DISPLAY_OFF only for v3+ VBTs, but field testing
-	 * has shown that the v3 sequence works for v2 VBTs too
+	 * MIPI_SEQ_DISPLAY_OFF only for v3+ VBTs
 	 */
-	if (is_vid_mode(intel_dsi)) {
+	if (is_vid_mode(intel_dsi) && dev_priv->vbt.dsi.seq_version > 3) {
 		/* Send Shutdown command to the panel in LP mode */
 		for_each_dsi_port(port, intel_dsi->ports)
 			dpi_send_cmd(intel_dsi, SHUTDOWN, false, port);
-- 
2.7.4



More information about the Intel-gfx-trybot mailing list