From: Suraj Kandpal <suraj.kandpal@intel.com>
To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, mika.kahola@intel.com,
Suraj Kandpal <suraj.kandpal@intel.com>
Subject: [PATCH 2/3] drm/i915/cx0: Move step 12 to enable clock hook
Date: Tue, 30 Dec 2025 14:01:41 +0530 [thread overview]
Message-ID: <20251230083142.70064-3-suraj.kandpal@intel.com> (raw)
In-Reply-To: <20251230083142.70064-1-suraj.kandpal@intel.com>
Move the step to toggle powerdown sequence change for HDMI to enable
clock hook where it belongs according to its sequence.
Do the required changes to make that work.
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
drivers/gpu/drm/i915/display/intel_cx0_phy.c | 37 ++++++++++----------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
index f3baba264e88..5edd293b533b 100644
--- a/drivers/gpu/drm/i915/display/intel_cx0_phy.c
+++ b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
@@ -3281,21 +3281,6 @@ static void intel_cx0pll_enable(struct intel_encoder *encoder,
*/
intel_de_write(display, DDI_CLK_VALFREQ(encoder->port), port_clock);
- /*
- * 12. Toggle powerdown if HDMI is enabled on C10 PHY.
- *
- * Wa_13013502646:
- * Fixes: HDMI lane to lane skew violations on C10 display PHYs.
- * Workaround: Toggle powerdown value by setting first to P0 and then to P2, for both
- * PHY lanes.
- */
- if (!cx0pll_state_is_dp(pll_state) && pll_state->use_c10) {
- intel_cx0_powerdown_change_sequence(encoder, INTEL_CX0_BOTH_LANES,
- XELPDP_P0_STATE_ACTIVE);
- intel_cx0_powerdown_change_sequence(encoder, INTEL_CX0_BOTH_LANES,
- XELPDP_P2_STATE_READY);
- }
-
intel_cx0_phy_transaction_end(encoder, wakeref);
}
@@ -3379,7 +3364,8 @@ static int intel_mtl_tbt_clock_select(struct intel_display *display,
}
}
-static void intel_cx0pll_enable_clock(struct intel_encoder *encoder)
+static void intel_cx0pll_enable_clock(struct intel_encoder *encoder,
+ const struct intel_cx0pll_state *pll_state)
{
struct intel_display *display = to_intel_display(encoder);
enum phy phy = intel_encoder_to_phy(encoder);
@@ -3412,6 +3398,21 @@ static void intel_cx0pll_enable_clock(struct intel_encoder *encoder)
* Frequency Change. We handle this step in bxt_set_cdclk().
*/
+ /*
+ * 12. Toggle powerdown if HDMI is enabled on C10 PHY.
+ *
+ * Wa_13013502646:
+ * Fixes: HDMI lane to lane skew violations on C10 display PHYs.
+ * Workaround: Toggle powerdown value by setting first to P0 and then to P2, for both
+ * PHY lanes.
+ */
+ if (!cx0pll_state_is_dp(pll_state) && pll_state->use_c10) {
+ intel_cx0_powerdown_change_sequence(encoder, INTEL_CX0_BOTH_LANES,
+ XELPDP_P0_STATE_ACTIVE);
+ intel_cx0_powerdown_change_sequence(encoder, INTEL_CX0_BOTH_LANES,
+ XELPDP_P2_STATE_READY);
+ }
+
intel_cx0_phy_transaction_end(encoder, wakeref);
}
@@ -3485,7 +3486,7 @@ void intel_mtl_pll_enable_clock(struct intel_encoder *encoder,
if (intel_tc_port_in_tbt_alt_mode(dig_port))
intel_mtl_tbt_pll_enable_clock(encoder, crtc_state->port_clock);
else
- intel_cx0pll_enable_clock(encoder);
+ intel_cx0pll_enable_clock(encoder, &crtc_state->dpll_hw_state.cx0pll);
}
/*
@@ -3808,7 +3809,7 @@ void intel_cx0_pll_power_save_wa(struct intel_display *display)
encoder->base.base.id, encoder->base.name);
intel_cx0pll_enable(encoder, &pll_state);
- intel_cx0pll_enable_clock(encoder);
+ intel_cx0pll_enable_clock(encoder, &pll_state);
intel_cx0pll_disable(encoder);
intel_cx0pll_disable_clock(encoder);
}
--
2.34.1
next prev parent reply other threads:[~2025-12-30 8:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 8:31 [PATCH 0/3] Fix Cx0 Suspend Resume issue Suraj Kandpal
2025-12-30 8:31 ` [PATCH 1/3] drm/i915/cx0: Split PLL enabling/disabling in two parts Suraj Kandpal
2025-12-30 15:20 ` Gustavo Sousa
2025-12-31 5:07 ` Kandpal, Suraj
2026-01-05 14:13 ` Gustavo Sousa
2026-01-06 6:19 ` Kandpal, Suraj
2026-01-08 8:51 ` Kahola, Mika
2025-12-30 21:23 ` kernel test robot
2026-01-07 15:22 ` Michał Grzelak
2025-12-30 8:31 ` Suraj Kandpal [this message]
2025-12-30 15:22 ` [PATCH 2/3] drm/i915/cx0: Move step 12 to enable clock hook Gustavo Sousa
2025-12-31 5:10 ` Kandpal, Suraj
2026-01-05 14:37 ` Gustavo Sousa
2026-01-06 6:18 ` Kandpal, Suraj
2025-12-30 8:31 ` [PATCH 3/3] drm/i915/cx0: Clear response ready & error bit Suraj Kandpal
2025-12-30 15:29 ` Jani Nikula
2025-12-30 17:36 ` Gustavo Sousa
2025-12-31 4:59 ` Kandpal, Suraj
2026-01-05 15:14 ` Gustavo Sousa
2026-01-06 6:21 ` Kandpal, Suraj
2025-12-30 8:38 ` ✓ CI.KUnit: success for Fix Cx0 Suspend Resume issue Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251230083142.70064-3-suraj.kandpal@intel.com \
--to=suraj.kandpal@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=mika.kahola@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox