Thomas Zimmermann 3316fe
From f15863b27752682bb700c21de5f83f613a0fb77e Mon Sep 17 00:00:00 2001
Thomas Zimmermann 3316fe
From: Vandita Kulkarni <vandita.kulkarni@intel.com>
Thomas Zimmermann 3316fe
Date: Tue, 9 Nov 2021 17:34:28 +0530
Thomas Zimmermann 3316fe
Subject: Revert "drm/i915/tgl/dsi: Gate the ddi clocks after pll mapping"
Thomas Zimmermann 3316fe
Git-commit: f15863b27752682bb700c21de5f83f613a0fb77e
Thomas Zimmermann 3316fe
Patch-mainline: v5.16-rc2
Thomas Zimmermann 3316fe
References: bsc#1152489
Thomas Zimmermann 3316fe
Thomas Zimmermann 3316fe
This reverts commit 991d9557b0c4 ("drm/i915/tgl/dsi: Gate the ddi clocks
Thomas Zimmermann 3316fe
after pll mapping"). The Bspec was updated recently with the pll ungate
Thomas Zimmermann 3316fe
sequence similar to that of icl dsi enable sequence. Hence reverting.
Thomas Zimmermann 3316fe
Thomas Zimmermann 3316fe
Bspec: 49187
Thomas Zimmermann 3316fe
Fixes: 991d9557b0c4 ("drm/i915/tgl/dsi: Gate the ddi clocks after pll mapping")
Thomas Zimmermann 3316fe
Cc: <stable@vger.kernel.org> # v5.4+
Thomas Zimmermann 3316fe
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Thomas Zimmermann 3316fe
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Thomas Zimmermann 3316fe
Link: https://patchwork.freedesktop.org/patch/msgid/20211109120428.15211-1-vandita.kulkarni@intel.com
Thomas Zimmermann 3316fe
(cherry picked from commit 4579509ef181480f4e4510d436c691519167c5c2)
Thomas Zimmermann 3316fe
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Thomas Zimmermann 3316fe
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Thomas Zimmermann 3316fe
---
Thomas Zimmermann 3316fe
 drivers/gpu/drm/i915/display/icl_dsi.c |   10 ++--------
Thomas Zimmermann 3316fe
 1 file changed, 2 insertions(+), 8 deletions(-)
Thomas Zimmermann 3316fe
Thomas Zimmermann 3316fe
--- a/drivers/gpu/drm/i915/display/icl_dsi.c
Thomas Zimmermann 3316fe
+++ b/drivers/gpu/drm/i915/display/icl_dsi.c
Thomas Zimmermann 3316fe
@@ -646,10 +646,7 @@ static void gen11_dsi_map_pll(struct int
Thomas Zimmermann 3316fe
 	intel_de_write(dev_priv, ICL_DPCLKA_CFGCR0, val);
Thomas Zimmermann 3316fe
 
Thomas Zimmermann 3316fe
 	for_each_dsi_phy(phy, intel_dsi->phys) {
Thomas Zimmermann 3316fe
-		if (INTEL_GEN(dev_priv) >= 12)
Thomas Zimmermann 3316fe
-			val |= ICL_DPCLKA_CFGCR0_DDI_CLK_OFF(phy);
Thomas Zimmermann 3316fe
-		else
Thomas Zimmermann 3316fe
-			val &= ~ICL_DPCLKA_CFGCR0_DDI_CLK_OFF(phy);
Thomas Zimmermann 3316fe
+		val &= ~ICL_DPCLKA_CFGCR0_DDI_CLK_OFF(phy);
Thomas Zimmermann 3316fe
 	}
Thomas Zimmermann 3316fe
 	intel_de_write(dev_priv, ICL_DPCLKA_CFGCR0, val);
Thomas Zimmermann 3316fe
 
Thomas Zimmermann 3316fe
@@ -1085,8 +1082,6 @@ static void
Thomas Zimmermann 3316fe
 gen11_dsi_enable_port_and_phy(struct intel_encoder *encoder,
Thomas Zimmermann 3316fe
 			      const struct intel_crtc_state *crtc_state)
Thomas Zimmermann 3316fe
 {
Thomas Zimmermann 3316fe
-	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
Thomas Zimmermann 3316fe
-
Thomas Zimmermann 3316fe
 	/* step 4a: power up all lanes of the DDI used by DSI */
Thomas Zimmermann 3316fe
 	gen11_dsi_power_up_lanes(encoder);
Thomas Zimmermann 3316fe
 
Thomas Zimmermann 3316fe
@@ -1112,8 +1107,7 @@ gen11_dsi_enable_port_and_phy(struct int
Thomas Zimmermann 3316fe
 	gen11_dsi_configure_transcoder(encoder, crtc_state);
Thomas Zimmermann 3316fe
 
Thomas Zimmermann 3316fe
 	/* Step 4l: Gate DDI clocks */
Thomas Zimmermann 3316fe
-	if (IS_GEN(dev_priv, 11))
Thomas Zimmermann 3316fe
-		gen11_dsi_gate_clocks(encoder);
Thomas Zimmermann 3316fe
+	gen11_dsi_gate_clocks(encoder);
Thomas Zimmermann 3316fe
 }
Thomas Zimmermann 3316fe
 
Thomas Zimmermann 3316fe
 static void gen11_dsi_powerup_panel(struct intel_encoder *encoder)