The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Simona Vetter <simona.vetter@ffwll.ch>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Intel Graphics <intel-gfx@lists.freedesktop.org>,
	DRI <dri-devel@lists.freedesktop.org>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux Next Mailing List" <linux-next@vger.kernel.org>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: linux-next: manual merge of the drm-intel tree with the origin tree
Date: Tue, 30 Jun 2026 16:32:13 +0100	[thread overview]
Message-ID: <akPhfS7S4guPimFF@sirena.org.uk> (raw)

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

Hi all,

Today's linux-next merge of the drm-intel tree got a conflict in:

  drivers/gpu/drm/i915/display/intel_cdclk.c

between commit:

  2ee8dbd880b14 ("drm/i915/cdclk: Fix up CDCLK_FREQ_DECIMAL without a full PLL re-enable")

from the origin tree and commits:

  3f9de66f8acbf ("drm/i915/cdclk: Fix up CDCLK_FREQ_DECIMAL without a full PLL re-enable")
  795e90164a3b8 ("drm/i915/cdclk: Print the reason for the CDCLK sanitization")
  67d77d9472c66 ("drm/i915/cdclk: Introduce bxt_cdclk_cd2x_pipe_mask() and use it")
  8984b402e02ff ("drm/i915/cdclk: Use the TGL+ CD2x pipe select bits also on ICL")

from the drm-intel tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined drivers/gpu/drm/i915/display/intel_cdclk.c
index 7bc9b956554ba,d3c5e3438d192..0000000000000
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@@ -1229,23 -1229,28 +1229,28 @@@ static void skl_set_cdclk(struct intel_
  
  static void skl_sanitize_cdclk(struct intel_display *display)
  {
- 	u32 cdctl, expected;
+ 	u32 cdctl, expected, swf18;
  
  	/*
  	 * check if the pre-os initialized the display
  	 * There is SWF18 scratchpad register defined which is set by the
  	 * pre-os which can be used by the OS drivers to check the status
  	 */
- 	if ((intel_de_read(display, SWF_ILK(0x18)) & 0x00FFFFFF) == 0)
+ 	swf18 = intel_de_read(display, SWF_ILK(0x18));
+ 	if ((swf18 & 0x00FFFFFF) == 0) {
+ 		drm_dbg_kms(display->drm, "Sanitizing CDCLK due to SWF18 0x%x\n", swf18);
  		goto sanitize;
+ 	}
  
  	intel_update_cdclk(display);
  	intel_cdclk_dump_config(display, &display->cdclk.hw, "Current CDCLK");
  
  	/* Is PLL enabled and locked ? */
  	if (display->cdclk.hw.vco == 0 ||
- 	    display->cdclk.hw.cdclk == display->cdclk.hw.bypass)
+ 	    display->cdclk.hw.cdclk == display->cdclk.hw.bypass) {
+ 		drm_dbg_kms(display->drm, "Sanitizing CDCLK due to PLL not enabled/locked\n");
  		goto sanitize;
+ 	}
  
  	/* DPLL okay; verify the cdclock
  	 *
@@@ -1261,8 -1266,11 +1266,11 @@@
  		cdctl &= ~CDCLK_FREQ_DECIMAL_MASK;
  		cdctl |= expected & CDCLK_FREQ_DECIMAL_MASK;
  
- 		if (cdctl != expected)
+ 		if (cdctl != expected) {
+ 			drm_dbg_kms(display->drm, "Sanitizing CDCLK due to CDCLK_CTL 0x%x, expected 0x%x)\n",
+ 				    intel_de_read(display, CDCLK_CTL), expected);
  			goto sanitize;
+ 		}
  
  		drm_dbg_kms(display->drm, "Sanitizing CDCLK decimal divider (CDCLK_CTL 0x%x, expected 0x%x)\n",
  			    intel_de_read(display, CDCLK_CTL), expected);
@@@ -1274,8 -1282,6 +1282,6 @@@
  	return;
  
  sanitize:
- 	drm_dbg_kms(display->drm, "Sanitizing cdclk programmed by pre-os\n");
- 
  	/* force cdclk programming */
  	display->cdclk.hw.cdclk = 0;
  	/* force full PLL disable + enable */
@@@ -1938,14 -1944,17 +1944,17 @@@ static void adlp_cdclk_pll_crawl(struc
  	display->cdclk.hw.vco = vco;
  }
  
+ static u32 bxt_cdclk_cd2x_pipe_mask(struct intel_display *display)
+ {
+ 	if (DISPLAY_VER(display) >= 11)
+ 		return ICL_CDCLK_CD2X_PIPE_MASK;
+ 	else
+ 		return BXT_CDCLK_CD2X_PIPE_MASK;
+ }
+ 
  static u32 bxt_cdclk_cd2x_pipe(struct intel_display *display, enum pipe pipe)
  {
- 	if (DISPLAY_VER(display) >= 12) {
- 		if (pipe == INVALID_PIPE)
- 			return TGL_CDCLK_CD2X_PIPE_NONE;
- 		else
- 			return TGL_CDCLK_CD2X_PIPE(pipe);
- 	} else if (DISPLAY_VER(display) >= 11) {
+ 	if (DISPLAY_VER(display) >= 11) {
  		if (pipe == INVALID_PIPE)
  			return ICL_CDCLK_CD2X_PIPE_NONE;
  		else
@@@ -2340,18 -2349,24 +2349,24 @@@ static void bxt_sanitize_cdclk(struct i
  	intel_cdclk_dump_config(display, &display->cdclk.hw, "Current CDCLK");
  
  	if (display->cdclk.hw.vco == 0 ||
- 	    display->cdclk.hw.cdclk == display->cdclk.hw.bypass)
+ 	    display->cdclk.hw.cdclk == display->cdclk.hw.bypass) {
+ 		drm_dbg_kms(display->drm, "Sanitizing CDCLK due to PLL not enabled/locked\n");
  		goto sanitize;
+ 	}
  
  	/* Make sure this is a legal cdclk value for the platform */
  	cdclk = bxt_calc_cdclk(display, display->cdclk.hw.cdclk);
- 	if (cdclk != display->cdclk.hw.cdclk)
+ 	if (cdclk != display->cdclk.hw.cdclk) {
+ 		drm_dbg_kms(display->drm, "Sanitizing CDCLK due to bad CDCLK frequency\n");
  		goto sanitize;
+ 	}
  
  	/* Make sure the VCO is correct for the cdclk */
  	vco = bxt_calc_cdclk_pll_vco(display, cdclk);
- 	if (vco != display->cdclk.hw.vco)
+ 	if (vco != display->cdclk.hw.vco) {
+ 		drm_dbg_kms(display->drm, "Sanitizing CDCLK due to bad VCO frequency\n");
  		goto sanitize;
+ 	}
  
  	/*
  	 * Some BIOS versions leave an incorrect decimal frequency value and
@@@ -2366,7 -2381,7 +2381,7 @@@
  	 * dividers both syncing to an active pipe, or asynchronously
  	 * (PIPE_NONE).
  	 */
- 	cdctl &= ~bxt_cdclk_cd2x_pipe(display, INVALID_PIPE);
+ 	cdctl &= ~bxt_cdclk_cd2x_pipe_mask(display);
  	cdctl |= bxt_cdclk_cd2x_pipe(display, INVALID_PIPE);
  
  	if (cdctl != expected) {
@@@ -2375,8 -2390,11 +2390,11 @@@
  			cdctl |= expected & CDCLK_FREQ_DECIMAL_MASK;
  		}
  
- 		if (cdctl != expected)
+ 		if (cdctl != expected) {
+ 			drm_dbg_kms(display->drm, "Sanitizing CDCLK due to CDCLK_CTL 0x%x, expected 0x%x\n",
+ 				    intel_de_read(display, CDCLK_CTL), expected);
  			goto sanitize;
+ 		}
  
  		drm_dbg_kms(display->drm, "Sanitizing CDCLK decimal divider (CDCLK_CTL 0x%x, expected 0x%x)\n",
  			    intel_de_read(display, CDCLK_CTL), expected);
@@@ -2388,8 -2406,6 +2406,6 @@@
  	return;
  
  sanitize:
- 	drm_dbg_kms(display->drm, "Sanitizing cdclk programmed by pre-os\n");
- 
  	/* force cdclk programming */
  	display->cdclk.hw.cdclk = 0;
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-06-30 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 15:32 Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-02-23 13:21 linux-next: manual merge of the drm-intel tree with the origin tree Mark Brown

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=akPhfS7S4guPimFF@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona.vetter@ffwll.ch \
    --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