Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ville Syrjala" <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/cdclk: Ignore the DPLL0 override bit on SKL/derivatives
Date: Fri, 04 Dec 2026 23:32:00 +0000	[thread overview]
Message-ID: <sashiko-outbox-250809@kernel.org> (raw)
In-Reply-To: <20261204231720.922-1-ville.syrjala@linux.intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/i915: skl_ddi_dpll0_get_hw_state() reads override bit,
  breaking fastset
--

commit d965d59fcd0d0125b022c064ac6a5c54491c339f
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/i915/cdclk: Ignore the DPLL0 override bit on SKL/derivatives

This commit stops checking DPLL_CTRL1_OVERRIDE(SKL_DPLL0) in
skl_dpll0_update() so that SKL/derivative systems where the GOP leaves
that bit clear do not trigger a warning and CDCLK sanitization.

> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index 0f2f693c78d48..525b37e68fd87 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -1019,11 +1019,14 @@ static void skl_dpll0_update(struct intel_display *display,
>  
>  	val = intel_de_read(display, DPLL_CTRL1);
>  
> +	/*
> +	 * DPLL_CTRL1_OVERRIDE doesn't seem to do anything
> +	 * for DPLL0, and the firmware fails to set it on
> +	 * some systems (eg. HP 17-by0001nw). Ignore it.
> +	 */
>  	if (drm_WARN_ON(display->drm,
> -			(val & (DPLL_CTRL1_HDMI_MODE(SKL_DPLL0) |
> -				DPLL_CTRL1_SSC(SKL_DPLL0) |
> -				DPLL_CTRL1_OVERRIDE(SKL_DPLL0))) !=
> -			DPLL_CTRL1_OVERRIDE(SKL_DPLL0)))
> +			val & (DPLL_CTRL1_HDMI_MODE(SKL_DPLL0) |
> +			       DPLL_CTRL1_SSC(SKL_DPLL0))))
>  		return;

[Severity: Medium]
Does skipping CDCLK sanitization here leave DPLL_CTRL1_OVERRIDE(SKL_DPLL0)
clear during DPLL state readout and break fastset?

Previously, skl_sanitize_cdclk() reprogrammed DPLL0 with the override bit
set before intel_modeset_setup_hw_state().  Now skl_ddi_dpll0_get_hw_state()
reads hw_state->ctrl1 with the 0x3f mask and records bit 0 as 0, while
skl_ddi_dp_set_dpll_hw_state() always sets DPLL_CTRL1_OVERRIDE(0).

On the first non-internal atomic commit, intel_crtc_check_fastset() calls
skl_compare_hw_state(), which checks exact ctrl1 equality.  The bit 0
mismatch rejects fastset and forces a full modeset, or fails with -EINVAL
when DRM_MODE_ATOMIC_ALLOW_MODESET is not set.

If the GOP also routed a second active pipe to DPLL0 and a commit modesets
only the eDP CRTC, intel_find_dpll() fails its memcmp() against
dpll_state[DPLL0].hw_state and causes skl_get_dpll() to return -EINVAL.

Setting DPLL_CTRL1_OVERRIDE(0) in skl_ddi_dpll0_get_hw_state() when reading
out hw_state->ctrl1 would keep readout, skl_compare_hw_state(), and
intel_find_dpll() consistent.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204231720.922-1-ville.syrjala@linux.intel.com?part=1

  reply	other threads:[~2026-12-04 23:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 23:17 [PATCH] drm/i915/cdclk: Ignore the DPLL0 override bit on SKL/derivatives Ville Syrjala
2026-12-04 23:32 ` sashiko-bot [this message]
2026-12-05  0:14 ` ✓ i915.CI.BAT: success for " 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=sashiko-outbox-250809@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=ville.syrjala@linux.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