Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
	<intel-xe@lists.freedesktop.org>,
	 <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v2 2/3] drm/i915/cx0: program DDI_CLK_VALFREQ with DDI clock frequency
Date: Wed, 12 Aug 2026 09:19:39 +0530	[thread overview]
Message-ID: <d760d5c7-6e2e-45c3-b38e-108571d94cf1@intel.com> (raw)
In-Reply-To: <20260811175844.2613721-3-suraj.kandpal@intel.com>


On 8/11/2026 11:28 PM, Suraj Kandpal wrote:
> DDI_CLK_VALFREQ is programmed with the port clock, which for DP is the
> symbol clock computed assuming 8b/10b encoding (link_rate / 10). For
> DP 128b/132b (UHBR) rates and for HDMI FRL the port clock needs to
> be modfied.
> On silicon DDI_CLK_VALFREQ is a scratch register with no
> functional impact, so the bug is not observed.
> Use intel_ddi_link_symbol_clock() to write the correct DDI clock in
> kHz.

Perhaps can be re-phrased as :

DDI_CLK_VALFREQ does not configure hardware, it only records the 
frequency software intends to set, so there is no functional impact.

Patch LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>


>
> Fixes: 51390cc0e00a ("drm/i915/mtl: Add Support for C10 PHY message bus and pll programming")
> Fixes: 73fc3abcb797 ("drm/i915/mtl: Enabling/disabling sequence Thunderbolt pll")
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_cx0_phy.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
> index 452062417ce9..dbebd7210848 100644
> --- a/drivers/gpu/drm/i915/display/intel_cx0_phy.c
> +++ b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
> @@ -3233,7 +3233,8 @@ static void intel_cx0pll_enable(struct intel_encoder *encoder,
>   	 * 8. Program DDI_CLK_VALFREQ to match intended DDI
>   	 * clock frequency.
>   	 */
> -	intel_de_write(display, DDI_CLK_VALFREQ(encoder->port), port_clock);
> +	intel_de_write(display, DDI_CLK_VALFREQ(encoder->port),
> +		       intel_ddi_link_symbol_clock(encoder, port_clock));
>   
>   	/*
>   	 * 9. Set PORT_CLOCK_CTL register PCLK PLL Request
> @@ -3406,7 +3407,7 @@ void intel_mtl_tbt_pll_enable_clock(struct intel_encoder *encoder, int port_cloc
>   	 * clock frequency.
>   	 */
>   	intel_de_write(display, DDI_CLK_VALFREQ(encoder->port),
> -		       port_clock);
> +		       intel_ddi_link_symbol_clock(encoder, port_clock));
>   }
>   
>   void intel_mtl_pll_enable(struct intel_encoder *encoder,

  reply	other threads:[~2026-08-12  3:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 17:58 [PATCH v2 0/3] Fix value being written to DDI_CLK_VALFREQ Suraj Kandpal
2026-08-11 17:58 ` [PATCH v2 1/3] drm/i915/ddi: add helper to compute DDI clock frequency Suraj Kandpal
2026-08-12  3:43   ` Nautiyal, Ankit K
2026-08-11 17:58 ` [PATCH v2 2/3] drm/i915/cx0: program DDI_CLK_VALFREQ with " Suraj Kandpal
2026-08-12  3:49   ` Nautiyal, Ankit K [this message]
2026-08-12  4:24     ` Kandpal, Suraj
2026-08-12  9:03       ` Jani Nikula
2026-08-12  9:11         ` Kandpal, Suraj
2026-08-11 17:58 ` [PATCH v2 3/3] drm/i915/lt_phy: " Suraj Kandpal
2026-08-12  3:50   ` Nautiyal, Ankit K
2026-08-12 17:26     ` Rodrigo Vivi
2026-08-11 18:05 ` ✓ CI.KUnit: success for Fix value being written to DDI_CLK_VALFREQ (rev2) 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=d760d5c7-6e2e-45c3-b38e-108571d94cf1@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --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