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 2/3] drm/i915/ltphy: Compare only certain fields in state verify function
Date: Mon, 5 Jan 2026 10:59:03 +0530 [thread overview]
Message-ID: <758597f0-6f56-4737-accd-cb3f75256a30@intel.com> (raw)
In-Reply-To: <20251231052315.77828-2-suraj.kandpal@intel.com>
On 12/31/2025 10:53 AM, Suraj Kandpal wrote:
> Verify only the config[0,2] fields in the LT PHY state since these
> are the only reliable values we can get back when we read the VDR
> registers. The reason being that the state does not persist for other
> VDR registers when power gating comes into picture.
> Though not ideal this change does not hit us badly in perspective of how
> we use the compare function to decide if fastset is required or if we
> wrote the state correctly. VDR0_CONFIG and VDR1_CONFIG hold the values
> that indicate the PLL operating mode and link rate which is usually
> what we need to check if something has changed or not.
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_lt_phy.c | 17 +++++++++++------
> 1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_lt_phy.c b/drivers/gpu/drm/i915/display/intel_lt_phy.c
> index 9501ac861712..cc85818c2b7e 100644
> --- a/drivers/gpu/drm/i915/display/intel_lt_phy.c
> +++ b/drivers/gpu/drm/i915/display/intel_lt_phy.c
> @@ -2207,13 +2207,18 @@ bool
> intel_lt_phy_pll_compare_hw_state(const struct intel_lt_phy_pll_state *a,
> const struct intel_lt_phy_pll_state *b)
> {
> - if (memcmp(&a->config, &b->config, sizeof(a->config)) != 0)
> - return false;
> -
> - if (memcmp(&a->data, &b->data, sizeof(a->data)) != 0)
> - return false;
> + /*
> + * With LT PHY values other than VDR0_CONFIG and VDR2_CONFIG are
> + * unreliable and cannot always be read back since internally
> + * the after power gating values are not restored back to the
> + * shadow VDR registers, hence we do not compare the whole state
> + * just the two VDR registers.
This can be broken down into simpler sentences.
With above fixed:
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> + */
> + if (a->config[0] == b->config[0] &&
> + a->config[2] == b->config[2])
> + return true;
>
> - return true;
> + return false;
> }
>
> void intel_lt_phy_pll_readout_hw_state(struct intel_encoder *encoder,
next prev parent reply other threads:[~2026-01-05 5:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-31 5:23 [PATCH 1/3] drm/i915/ltphy: Remove state verification for LT PHY fields Suraj Kandpal
2025-12-31 5:23 ` [PATCH 2/3] drm/i915/ltphy: Compare only certain fields in state verify function Suraj Kandpal
2026-01-05 5:29 ` Nautiyal, Ankit K [this message]
2025-12-31 5:23 ` [PATCH 3/3] drm/i915/ltphy: Provide protection against unsupported modes Suraj Kandpal
2026-01-05 5:30 ` Nautiyal, Ankit K
2025-12-31 5:30 ` ✓ CI.KUnit: success for series starting with [1/3] drm/i915/ltphy: Remove state verification for LT PHY fields Patchwork
2025-12-31 6:10 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-31 7:10 ` ✓ Xe.CI.Full: " Patchwork
2026-01-05 5:27 ` [PATCH 1/3] " Nautiyal, Ankit K
2026-01-05 5:57 ` [PATCH v2 " Suraj Kandpal
2026-01-05 5:57 ` [PATCH v2 2/3] drm/i915/ltphy: Compare only certain fields in state verify function Suraj Kandpal
2026-01-05 5:57 ` [PATCH v2 3/3] drm/i915/ltphy: Provide protection against unsupported modes Suraj Kandpal
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=758597f0-6f56-4737-accd-cb3f75256a30@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