From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380588; b=J6c2gkhmPLd6KY+0nJNtC33Ye8qVHgNzdbxHOfVEvcc20mw4uOU0S6FMDT6f0KEOYMOq oJQaKKzbqc961qFkVxUjqmLAB9vGT7+6tJrDuc4P+BDcqJIkQOGpKAGV5n0Foy7DBOmPE x0XEsdQC4Cs3rHey6V3f1jg8rdOFmOG9NHdRT32do6ZsIPTNKD6Jm28ihxr2KhIfw1TMd 8rDLQwShZIaUtwWneSO+HnPjfijfgAc4ascNnMGYhyoWU/AIOr30ouMC7PqPKqvMVaB9C Hc1C9LqPft2uVlnSStCcvWU/nMYXAzEsVOoyYkUCgNUEHa6KCoVE+o7/wm7vsWQy6vA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380588; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=V7hiTtIlZbDI2hepdB1gP9eXlu6OJIkBZtDQ+zgFH0Q=; b=K0rMYdTFRdgEsYpV3pDGirZJFB1bvMNYoilaMS1d62xpfIW/BUgI6FXS8E4MUTaJTT33 sUB2A/zBDPhHGYQLXFVUpEuSqzqPNtXZFBH+fTzjsMJaa8+nonxDxPH2mgRTApo4/nRIE dqxpdKQucR0u3lV4jIrhv56osINULkIJlgiONK/66TcUoMA9NQ2t1x8Lv3iC54qcSWEao SliMrouAlURr9vnZNVEtwht8hshlgNxCPvgnpnneeXxSq1ItLDZ5dtBUP7ZXIeUYPJ1XZ hgRqWABlcb8ojxQWx6PC6lpD7xF1smLX6Qg59fiy59zKQn5v/U85NTntklNH1QZUz7g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=FLEdWE2t; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0CB8606A682; Fri, 4 Dec 2026 10:36:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=FLEdWE2t Received: by smtp.kernel.org (Postfix) with ESMTPSA id 419231F00931; Fri, 4 Dec 2026 10:36:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380588; bh=V7hiTtIlZbDI2hepdB1gP9eXlu6OJIkBZtDQ+zgFH0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FLEdWE2t+bYGS+yhWlTvtdw7Ls82emnuu4MdPeIuyXVVBUc3G+OxZsA6Fel9Ud85c oSdaUKQcKUc8ldISK3inSPUGlBDJSTD7BbP8g3ERcj370DSCb6BUOPD1BV5CdFCz4y XAKS6CYEb6snlYOWjwj7Sf+d3E+HBW58wsNtD4ZI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Mika Kahola , Joonas Lahtinen Subject: [PATCH 7.3 338/742] drm/i915/cdclk: Ignore SWF18 in SKL CDCLK sanitization Date: Fri, 4 Dec 2026 19:03:22 +0900 Message-ID: <20261204100644.028448534@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ville Syrjälä commit 9e7a9295c90e28e1bb6e88b76aaa91839266352b upstream. Currently on SKL/derivatives we are checking whether the VBIOS/GOP programmed the SWF18 scratch register appropriately. SWF18 is where the VBIOS/GOP should stuff some information about what outputs it enabled. A related register SWF06 is where the VBIOS/GOP is supposed to stuff the maximum CDCLK frequency. I think only SWF06 is really used by the Windows driver (and even that only up to and including ADL), the other stuff it doesn't even look at. Apparently at least some coreboot based systems don't set these scratch registers up at all. SWF18 not being populated leads us to reprogram the CDCLK PLL during driver initialization, while the display pipes are still potentially active. We also set CDCLK to its minimum frequency, under the assumption that nothing actually needs a higher CDCLK frequency when it hasn't even been correctly initialized. Due to some other changes in the code we may no longer force a full CDCLK recalculation and reprogramming upon the first atomic commit, so CDCLK can remain at a potentially too low a frequency indefinitely. To fix this let's just stop looking at SWF18 completely. We don't look at that register on any other platform either, and neither does Windows from what I can see. We also do an actual readout of the CDCLK state from the hardware so we should be able to spot if anything is wrong enough to need reprogramming. v2: Rewrite the commit message to mix up SWF06 vs. SWF18 Cc: stable@vger.kernel.org Fixes: ba91b9eecb47 ("drm/i915/cdclk: Decouple cdclk from state->modeset") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16595 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/17423 Signed-off-by: Ville Syrjälä Link: https://patch.msgid.link/20261105124737.24456-1-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola (cherry picked from commit a6e9767ca2e353277aa06d4c796093ef71a191b6) Signed-off-by: Joonas Lahtinen Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/display/intel_cdclk.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) --- a/drivers/gpu/drm/i915/display/intel_cdclk.c +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c @@ -1229,18 +1229,7 @@ static void skl_set_cdclk(struct intel_d static void skl_sanitize_cdclk(struct intel_display *display) { - 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 - */ - 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; - } + u32 cdctl, expected; intel_update_cdclk(display); intel_cdclk_dump_config(display, &display->cdclk.hw, "Current CDCLK");