Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/cdclk: Ignore the DPLL0 override bit on SKL/derivatives
@ 2026-12-04 23:17 Ville Syrjala
  2026-12-04 23:32 ` sashiko-bot
  2026-12-05  0:14 ` ✓ i915.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Ville Syrjala @ 2026-12-04 23:17 UTC (permalink / raw)
  To: intel-gfx; +Cc: stable, Mateusz Jończyk

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Apparently the GOP fails to set the DPLL0 override bit on
some systems (eg. HP 17-by0001nw). Based on additional local
testing that bit doesn't actually seem to do anything for DPLL0.

Ignore the override bit during readout. This avoids triggering
the WARN and CDCLK sanitization (with outputs still enabled)
on affected systems. Continue setting the override bit during
normal CDCLK programming just to keep the code otherwise fully
in line with the spec.

Cc: stable@vger.kernel.org
Tested-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Fixes: a6e9767ca2e3 ("drm/i915/cdclk: Ignore SWF18 in SKL CDCLK sanitization")
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/17997
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_cdclk.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index 0f2f693c78d4..525b37e68fd8 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;
 
 	switch (val & DPLL_CTRL1_LINK_RATE_MASK(SKL_DPLL0)) {
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915/cdclk: Ignore the DPLL0 override bit on SKL/derivatives
  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
  2026-12-05  0:14 ` ✓ i915.CI.BAT: success for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-12-04 23:32 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* ✓ i915.CI.BAT: success for drm/i915/cdclk: Ignore the DPLL0 override bit on SKL/derivatives
  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
@ 2026-12-05  0:14 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2026-12-05  0:14 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 6055 bytes --]

== Series Details ==

Series: drm/i915/cdclk: Ignore the DPLL0 override bit on SKL/derivatives
URL   : https://patchwork.freedesktop.org/series/180569/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_19674 -> Patchwork_180569v1
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/index.html

Participating hosts (40 -> 39)
------------------------------

  Missing    (1): bat-dg2-13 

Known issues
------------

  Here are the changes found in Patchwork_180569v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@fbdev@eof:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][1] ([i915#17464]) +3 other tests skip
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@fbdev@eof.html

  * igt@fbdev@info:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][2] ([i915#1849])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@fbdev@info.html

  * igt@gem_huc_copy@huc-copy:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][3] ([i915#17456] / [i915#2190])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@parallel-random-engines:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][4] ([i915#11671] / [i915#4613]) +3 other tests skip
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@intel_hwmon@hwmon-read:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][5] ([i915#11680]) +1 other test skip
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@intel_hwmon@hwmon-read.html

  * igt@kms_dsc@dsc-basic:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][6] ([i915#11190]) +16 other tests skip
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@kms_dsc@dsc-basic.html

  * igt@kms_flip@basic-plain-flip:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][7] ([i915#3637]) +3 other tests skip
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@kms_flip@basic-plain-flip.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][8] ([i915#17465])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][9] ([i915#17466])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@kms_frontbuffer_tracking@basic.html

  * igt@kms_pm_backlight@basic-brightness:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][10] ([i915#17462])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@kms_pm_backlight@basic-brightness.html

  * igt@kms_psr@psr-primary-page-flip:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][11] ([i915#9732]) +3 other tests skip
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@kms_psr@psr-primary-page-flip.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][12] ([i915#17463])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-fence-flip:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][13] ([i915#17467])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@prime_vgem@basic-fence-flip.html

  
#### Possible fixes ####

  * igt@i915_module_load@load:
    - fi-kbl-8809g:       [ABORT][14] ([i915#18016]) -> [PASS][15]
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19674/fi-kbl-8809g/igt@i915_module_load@load.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/fi-kbl-8809g/igt@i915_module_load@load.html

  * igt@vgem_basic@unload:
    - bat-rpls-4:         [DMESG-WARN][16] ([i915#13400]) -> [PASS][17]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19674/bat-rpls-4/igt@vgem_basic@unload.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/bat-rpls-4/igt@vgem_basic@unload.html

  
  [i915#11190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11190
  [i915#11671]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11671
  [i915#11680]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11680
  [i915#13400]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13400
  [i915#17456]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17456
  [i915#17462]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17462
  [i915#17463]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17463
  [i915#17464]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17464
  [i915#17465]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17465
  [i915#17466]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17466
  [i915#17467]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17467
  [i915#18016]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/18016
  [i915#1849]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1849
  [i915#2190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2190
  [i915#3637]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3637
  [i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
  [i915#9732]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732


Build changes
-------------

  * Linux: CI_DRM_19674 -> Patchwork_180569v1

  CI-20190529: 20190529
  CI_DRM_19674: a7d5d527e32a2e5e2340a39958360b5fb80c7205 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_9227: 9227
  Patchwork_180569v1: a7d5d527e32a2e5e2340a39958360b5fb80c7205 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_180569v1/index.html

[-- Attachment #2: Type: text/html, Size: 7015 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-05  0:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-12-05  0:14 ` ✓ i915.CI.BAT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox