From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pz2-f12.google.com (mail-pz2-f12.google.com [74.125.228.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F31354718E9 for ; Wed, 30 Sep 2026 09:29:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.228.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790760553; cv=none; b=pPHWRIwNjSOoKO7ITc+vfDGT8iOF5/vpW1uKBrqqpepOx8A2bBPHbNIzyoP+cKREi6M845PDB4xXVKCePJgMPtaoPhQ0R1TZbsmBwmZhVr/FAVlcMfneq8QbeH2DwQXKYbyfFcKQi3fDdzKKmJd1zI/St5H8aAlVOIbGGrzzt6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790760553; c=relaxed/simple; bh=mknuXwZ95tcNOhem/WwO440N8fKuQ6mt+WRrlOPB8Xc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aQIZM8zPr+Lc2ceSyhezWoSogde0vhVg0EcaHpOT755q3a6kxKeuAcX++5Wz9xmvWmFqRPmYy4YJMtMFaz5gfCiSCbO3YmSY7OjVyPABbkz8Poj/S/MU4hVpt9uDd3tItCsJgMAPd2Z9b1/ZtsXSyIGTamL2SdHG/4gaYBnK+Tc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Yjp39Ie8; arc=none smtp.client-ip=74.125.228.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Yjp39Ie8" Received: by mail-pz2-f12.google.com with SMTP id 41be03b00d2f7-cc1ab17a156so156641a12.0 for ; Wed, 30 Sep 2026 02:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790760551; x=1791365351; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=dCuOczbTp0o8M/OdE7sBIXiBo8j5afblsAbUmAPXWJ0=; b=Yjp39Ie8iKUrFARXoyxkWhn0v7rlvOANVnCPkSCYTCpV3wwuQPnDc3lfCzjhgusk23 HHlmLKzWgP4sz09IK+Aa48Z7Tr6CXvjmYBTlHWbZjwcVod3PoRLus4xMwuHIMm0GrBS5 uaGLgmiMfI2Y/PVAiCaRvChuDQEuiU6cRd6Xm+X6Fgvf4eHgj27kL3Bj8Yaq5z4o3R2j hkFMNGp05A+pwJXecWfgO69GdP7Ahm+E0SN9loPwn9uvkAAHEKGETjB4uswlj6s0p0Om WdRpU3c5qFU9psPTG6YK79Vp/9cFUgvFUz2MsTvNS++1DPO8jPWHL/62gmKZyHdJmYVB FcGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790760551; x=1791365351; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=dCuOczbTp0o8M/OdE7sBIXiBo8j5afblsAbUmAPXWJ0=; b=fM8BC9J6rT7W6NTMLGDCXHl4ogG4D1lD9O71eml/LaVMXpJSj9+8NFIcTIS9cMfPpt EK6/eNoG7UBGYsSz+1o2LLVqgJfnwHm2y5NI+YzsZ0BIfxEXC+/maYW6qS8EwBi+fX0T sKx6JBkGel8MXsojHDkklFYIOZ+W+X5RJJ6C/ENAMLTEb4o4zcOS6lmzEonaB/dczQIv Ll+okbbs5Mr1CPH8jlMuciTUtspCDHGOoOZxSpDdFj96m+4+Rm7jpUyasc3TZwUiag7u 4afzNMqd2IIL9v7A726yWO2OuPknU853o9MCtgm2oNNXNXq638FMGgqaLEnr47lnD/OC nvcA== X-Forwarded-Encrypted: i=1; AKwUvBxoKHG/NHPvqItlUC5BMW9NZPI2m32yOUyjAainRQT/1jLMaHu/z263SvDOoZEhautjeBW8xp9UdFZsrVU=@vger.kernel.org X-Gm-Message-State: AFuF++lI6PUWgbKFJKu39c9oOicbs5kguHpUPj1gipUVPsBZ6ifh/hhN OKtLWN1Oz2czrplWBCYcVVifnGLd7jysIVuWEtsCTwghPkGjERI9ohyM X-Gm-Gg: AYBFou0DBTS6SUR1wha2hBvUxmllHLu6jBH7sk7afcWu+16LGnK9EF2uywDt2NxQ0KJ Mm25pajVwMIlYBrPV+xneZqttH0gEmtx5pypZ4zEFY5KgIB33GZfva+WQhMGGFQvwEoXaox6YcL hmOuiDQVhaM+oyFicDRW5OSxe8v1Cw25DmRHOxbPaGkQ6jUGIle1DKW2LnnX32aASYA7WPdN5kE gUYTSeCpagzfVuV1A405ucbafdvWJWkwbDVppIveQLg+VMlvcD5O0GHgl1wM27VIk7Tz9/HDwS+ CtWKNNdOcUUngvymyqNUWYVPvAIGZ+lJVIH0q19bddMYjuQLOAtzvOhvLzvkjFdCzfEBw02FFsj OVX5rvLfARyIf2eYRGdj9Tz8XHgvZNUIvGkCwOyOjKKb4EK7c6z7p8ZpXx0ammNHmnS2EQ7DJ9L N1b4irIFplhkm8//W9uq/eCvheztpaiQHV05bWrNZGM5cm5tW84imHicp/7e+8LdfUdlSh4KOgt ffEzGDsTsqrwmA= X-Received: by 2002:a05:6a00:4787:b0:882:b2a:4840 with SMTP id d2e1a72fcca58-88749bed3e0mr770897b3a.2.1790760551234; Wed, 30 Sep 2026 02:29:11 -0700 (PDT) Received: from jfliu-sfa1411.. ([129.227.183.200]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8872624c5b5sm493474b3a.43.2026.09.30.02.29.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2026 02:29:10 -0700 (PDT) From: Jianfeng Liu To: linux-clk@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, Bjorn Andersson , linux-kernel@vger.kernel.org, Dmitry Baryshkov , Abel Vesa , Stephen Boyd , Rajendra Nayak , Brian Masney , Jerome Brunet , Jianfeng Liu Subject: [PATCH] clk: qcom: dispcc-x1e80100: don't disable display PLLs in the unused-clock sweep Date: Wed, 30 Sep 2026 17:28:55 +0800 Message-ID: <20260930092904.5222-1-liujianfeng1994@gmail.com> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit UEFI leaves disp_cc_pll0 locked and running for the handover framebuffer. clk_disable_unused() runs before any display driver probes, finds it unused (no consumers, no CLK_IGNORE_UNUSED) and powers it down through alpha_pll_reset_lucid_evo_disable(). When the DPU driver later enables mdp_clk, alpha_pll_reset_lucid_evo_prepare() performs a full PLL reset and relock. On X1E80100 that relock can end up marginal, and whether it does is a per-boot analog lottery. A marginal PLL degrades the DPU core timing just enough that the DisplayPort controller drops every other MTP (micro transfer packet) of the pixel stream fed by the DPU. The result is static black vertical bands on the eDP panel: at 2560x1600, 24bpp, 4 lanes, one MTP is 4 * 64 symbols / 3 bytes per pixel = 85.33 pixels, so the screen splits into exactly 30 bands of which every second one is black (20 bands at 16bpp). This reproduces on roughly half of all boots and persists for the whole boot. The corruption is invisible to every register or clock-state dump: the PLL locks either way, only the lock quality differs, and all programmed values (DPU, DP controller MSA/TU, PHY, dispcc) are byte-identical between good and bad boots. The controller's internal BIST pattern stays clean on a corrupted boot, pinning the failure to the pixel ingest timing fed by the DPU. Verified on an Acer Swift SFA14-11 (X1E78100): - clk_ignore_unused on the cmdline: 7/7 boots clean - keeping only disp_cc_pll0 from the sweep: 10/10 boots clean - keeping any other clock from the sweep: still corrupts - with this patch: 10/10 boots clean Keep the firmware-provided PLL state by marking disp_cc_pll0 CLK_IGNORE_UNUSED, the same way gcc drivers protect CPU hfplls (cf. gcc-msm8960). Other drivers using clk_alpha_pll_reset_lucid_ole_ops for their display PLLs (sm8550, sm8650) may carry the same latent issue. Fixes: ee3f0739035f5 ("clk: qcom: Add dispcc clock driver for x1e80100") Signed-off-by: Jianfeng Liu Assisted-by: LLM --- drivers/clk/qcom/dispcc-x1e80100.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/clk/qcom/dispcc-x1e80100.c b/drivers/clk/qcom/dispcc-x1e80100.c index aed06203a886a..5613f1fdb2e4a 100644 --- a/drivers/clk/qcom/dispcc-x1e80100.c +++ b/drivers/clk/qcom/dispcc-x1e80100.c @@ -94,6 +94,21 @@ static struct clk_alpha_pll disp_cc_pll0 = { .clkr = { .hw.init = &(const struct clk_init_data) { .name = "disp_cc_pll0", + /* + * The boot firmware (UEFI) leaves disp_cc_pll0 locked + * and running for the handover framebuffer. + * clk_disable_unused() runs before any display driver + * probes, finds the PLL unused (no consumers, no + * CLK_IGNORE_UNUSED) and powers it down. The DPU + * driver then has to relock it via the reset-prepare + * sequence. On X1E80100 that relock can end up + * marginal (per-boot analog lottery), degrading the + * DPU core timing enough to corrupt eDP output at + * MTP granularity (every other micro transfer packet + * delivered blank, on ~50% of boots). Keeping the + * firmware PLL state avoids the relock entirely. + */ + .flags = CLK_IGNORE_UNUSED, .parent_data = &(const struct clk_parent_data) { .index = DT_BI_TCXO, }, --- base-commit: 6474fa070f2b8013b4b87350b775b8c3be6e8aac branch: dispcc-x1e80100-keep-disp-plls -- 2.47.3