Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Sousa <gustavo.sousa@intel.com>
To: "Kandpal, Suraj" <suraj.kandpal@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
	"Kahola, Mika" <mika.kahola@intel.com>
Subject: RE: [PATCH 2/3] drm/i915/cx0: Move step 12 to enable clock hook
Date: Mon, 5 Jan 2026 11:37:22 -0300	[thread overview]
Message-ID: <176762384242.9480.14418194462966711746@intel.com> (raw)
In-Reply-To: <DM3PPF208195D8DF5E9FF8C552BD4B63CDBE3BDA@DM3PPF208195D8D.namprd11.prod.outlook.com>

Quoting Kandpal, Suraj (2025-12-31 02:10:59-03:00)
>> 
>> Quoting Suraj Kandpal (2025-12-30 05:31:41-03:00)
>> >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.
>> 
>> This should probably be a squash into the previous patch?
>
>So reason for separate patch is that this requires me changing the argument of
>clock enable which is not because of the same logical reason that changes are being done in patch 1,
>hence a separate patch for changes that were brought about due to another reason. Had this been just movement
>of step 12 then I would have squashed them.

Hm... The previous patch is introducing intel_cx0pll_enable_clock() and
says it is splitting the sequence in two, but then it ended up is
leaving step 12 behind.  If it is introducing
intel_cx0pll_enable_clock(), it could as well have done it with a
signature that allows step 12 to be done.

IMO, here we are modifying that function to "make it right".  This looks
like a good fixup candidate to me.

--
Gustavo Sousa

>
>Regards,
>Suraj Kandpal
>
>> 
>> --
>> Gustavo Sousa
>> 
>> >
>> >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
>> >

  reply	other threads:[~2026-01-05 14:37 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 ` [PATCH 2/3] drm/i915/cx0: Move step 12 to enable clock hook Suraj Kandpal
2025-12-30 15:22   ` Gustavo Sousa
2025-12-31  5:10     ` Kandpal, Suraj
2026-01-05 14:37       ` Gustavo Sousa [this message]
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=176762384242.9480.14418194462966711746@intel.com \
    --to=gustavo.sousa@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 \
    --cc=suraj.kandpal@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