Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/i915/dsi: fix CHV dsi encoder hardware state readout on" failed to apply to 4.6-stable tree

PATCH [email protected] 1 participant 1 message Jun 4, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From e6f577893d0a4c1f62585bc426ab32d88593d7da Mon Sep 17 00:00:00 2001

From: Jani Nikula <[email protected]>
Date: Fri, 15 Apr 2016 15:47:31 +0300
Subject: [PATCH] drm/i915/dsi: fix CHV dsi encoder hardware state readout on
port C
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Due to "some hardware limitation" the DPI enable bit in port C control register does not get set on VLV. As a workaround we check the status in pipe B conf register instead. The workaround was added in

commit c0beefd29fcb1ca998f0f9ba41be8539f8eeba9b

Author: Gaurav K Singh <[email protected]>
Date:   Tue Dec 9 10:59:20 2014 +0530

drm/i915: Software workaround for getting the HW status of DSI Port C on BYT

Empirical evidence (on Surface 3 with DSI on port C per VBT) shows that this is the case also on CHV, so extend the workaround to CHV. We still have the device ready register check in place, so this should not get confused with e.g. HDMI on pipe B.

This fixes a number of state checker warnings on CHV DSI port C.

drivers/gpu/drm/i915/intel_dsi.c +5 -4
index a3cb89ee7fd0..34328ddaaab5 100644
@@ -725,11 +725,12 @@ static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
 			BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(port);
 		bool enabled = I915_READ(ctrl_reg) & DPI_ENABLE;
 
-		/* Due to some hardware limitations on BYT, MIPI Port C DPI
-		 * Enable bit does not get set. To check whether DSI Port C
-		 * was enabled in BIOS, check the Pipe B enable bit
+		/*
+		 * Due to some hardware limitations on VLV/CHV, the DPI enable
+		 * bit in port C control register does not get set. As a
+		 * workaround, check pipe B conf instead.
 		 */
-		if (IS_VALLEYVIEW(dev) && port == PORT_C)
+		if ((IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev)) && port == PORT_C)
 			enabled = I915_READ(PIPECONF(PIPE_B)) & PIPECONF_ENABLE;
 
 		/* Try command mode if video mode not enabled */