Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2786111lqz; Wed, 3 Apr 2024 08:33:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW5qhNZ+Xw7pjyaaAoRBrJ2a+Yr3JckIlAL+hyq7s/eSZVlqbmPwTf6F1Whp3AKnrOK2p9Q/le/Rws9W34RJP+d8iekoY0Z00B3ElDzUQ== X-Google-Smtp-Source: AGHT+IG54WPkBbe5g0zspy7Kf4y58ddS7ikXYfhrxSB95DmGJPUVkXuHYNHo4+bRSpip4SAB4E8W X-Received: by 2002:ad4:420b:0:b0:699:2656:aac1 with SMTP id k11-20020ad4420b000000b006992656aac1mr2253440qvp.6.1712158428186; Wed, 03 Apr 2024 08:33:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712158428; cv=pass; d=google.com; s=arc-20160816; b=YNjpUsBv3+nImQ+Yj3mfKuXgryqnKcOQvNgDdfHhNHVJHzDFJaaW2z2E+9tnteho58 H92E7PyHJwJBL/1bQZH92EvbUTyCo63qRF6EoyaV8NEqghfvXmVaNL+KXxwPR3XPG6e6 +851UMGfrIRXprCaqdFfEc3OaISKJP0Xi83MU3LJYbDdWJviNdLEwFapYzEigVFXpDWs Dlc4D1q3SE4wfS77lUoNGYH+JM0ZI4x44NuNBaazX1fLIP8qNMfMr7TE99a3TuS5G6i4 MS1NEUUh5/2WJ916EX7GdOb+9uhg1EmL98Di73a6kEf7iPD05XUatwo7Xc+8BML5w6LD Y2RA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=n2n+ZKpSrp4swBYXFDHQkoo9IbN9JMu4th1fbKoqZBc=; fh=XmXf9kA2OME/Yhd4j4WmruKVGCsG2rMWob/p0ui36mI=; b=e/ZHEH/IXBn/R5aGNyaczJp36VPM4BkNgQ7KdAVpQbBpv9yLLI4Vk+wlwAa9y9OX2d Ov+WD6+JjlS2x2tV9azNpmWVsObHknrS33HQU/YqGNp5Zipnn/aV6d+HAIZxRdHhsMIa lZ0eXAem5x+ZJvmr0Ff/8t7+7c+WBWlL3xg98xTDYN6hmsNVed8OTiClEF0D6B/CPwJs 9KNcLPr8CEQ9DDkQU3Wkb9HCVs3xTqrI9cKb9eH/E8FGIZXYWOBZ4gYph9Rk595fU+w7 z8MjTyq6KIXwaRRgaD3SQQT04h2gxDAr8BiqSspVeV8cSb/TcAExjVDxLfqvBueM8xo/ +Tvw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oltmanns.dev header.s=MBO0001 header.b=Zj3aw+bf; arc=pass (i=1 spf=pass spfdomain=oltmanns.dev dkim=pass dkdomain=oltmanns.dev dmarc=pass fromdomain=oltmanns.dev); spf=pass (google.com: domain of linux-kernel+bounces-130095-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130095-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oltmanns.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y5-20020a0ce805000000b00696aeac4bcfsi14302843qvn.40.2024.04.03.08.33.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 08:33:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130095-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@oltmanns.dev header.s=MBO0001 header.b=Zj3aw+bf; arc=pass (i=1 spf=pass spfdomain=oltmanns.dev dkim=pass dkdomain=oltmanns.dev dmarc=pass fromdomain=oltmanns.dev); spf=pass (google.com: domain of linux-kernel+bounces-130095-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130095-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oltmanns.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CD1811C25CE1 for ; Wed, 3 Apr 2024 15:32:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0930B14A4CE; Wed, 3 Apr 2024 15:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oltmanns.dev header.i=@oltmanns.dev header.b="Zj3aw+bf" Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F549149DFD; Wed, 3 Apr 2024 15:32:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712158327; cv=none; b=bndFbxRvGPn8yKpHOawTQIi6xAKQ/7hbauLLBK59qTk/u6m+QbNkRq1/H5Ds0sN3WtCFO7a/feVeocXsOmQIUCLx6xGm/o7pDI9HNsNK25q60Z1SdDDalMA4K3R/dJa8fvOLWdNhqJXx4Zk6JA/e48reIlEbQB67ETMv2S/SGdM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712158327; c=relaxed/simple; bh=yWSydggSbm1G+VEOEgMaeofH6CeF1v5JS+YuRRk5dZ4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=BNsG5XiUz2Rk54hAyOgBk9NHLlnvKIwEAhgAbfLeJMvBdLaBfdS6Qmlpf+7M5taEnXan+1VR6cY7hb+tbkaExO0r8tHnEp1KIocneVFY3d81u0TiNLMIla8cvZwlp/J/4MAlYvMnFStWvpv/tH38JP2O5aRLSNX5x6WsV9658A0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oltmanns.dev; spf=pass smtp.mailfrom=oltmanns.dev; dkim=pass (2048-bit key) header.d=oltmanns.dev header.i=@oltmanns.dev header.b=Zj3aw+bf; arc=none smtp.client-ip=80.241.56.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oltmanns.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oltmanns.dev Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4V8pdX4LwNz9t5n; Wed, 3 Apr 2024 17:32:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oltmanns.dev; s=MBO0001; t=1712158320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n2n+ZKpSrp4swBYXFDHQkoo9IbN9JMu4th1fbKoqZBc=; b=Zj3aw+bfzHPcedx2v+nnf9eMoegQ03ywBf22sAYq1igWjyjxfWspgpEdXP+toRFDfjWILC 31YpGl3BaR7xvYNvRNHU+XG6npSj3PWOz1grAoSDd8y/V7hyMjH6hkiZmJCN8Yfv0HlyB8 OfyGMlJZ3IIx2SDx8StMvAPWOFwO3/YHN8RMPf38YqlOh90PpyydehqkyAzWHuyxEJaw0A 6hU4M7i8WtArjTGGwQlrZ45LqrogdpVKoRMsHLCCtCEn8elKxvrYVGOSLnTuCDRDz1sdHN J41aLXX41KWhJwVppvieT755HFxfVJR6LCB3CwQebhH8TNSqGUU180kEN4PNgA== From: Frank Oltmanns To: Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard Cc: Guido =?utf-8?Q?G=C3=BCnther?= , Purism Kernel Team , Ondrej Jirman , Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, stable@vger.kernel.org, Diego Roversi , Erico Nunes Subject: Re: [PATCH v4 0/5] Pinephone video out fixes (flipping between two frames) In-Reply-To: <20240310-pinephone-pll-fixes-v4-0-46fc80c83637@oltmanns.dev> (Frank Oltmanns's message of "Sun, 10 Mar 2024 14:21:10 +0100") References: <20240310-pinephone-pll-fixes-v4-0-46fc80c83637@oltmanns.dev> Date: Wed, 03 Apr 2024 17:31:47 +0200 Message-ID: <87frw2a2e4.fsf@oltmanns.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4V8pdX4LwNz9t5n Dear clk and sunxi-ng maintainers, Patches 1-4 have been reviewed and there are no pending issues. If there is something else you need me to do to get this applied, please let me know. Thanks, Frank On 2024-03-10 at 14:21:10 +0100, Frank Oltmanns wrote: > On some pinephones the video output sometimes freezes (flips between two > frames) [1]. It seems to be that the reason for this behaviour is that > PLL-MIPI is outside its limits, and the GPU is not running at a fixed > rate. > > In this patch series I propose the following changes: > 1. sunxi-ng: Adhere to the following constraints given in the > Allwinner A64 Manual regarding PLL-MIPI: > * M/N <= 3 > * (PLL_VIDEO0)/M >= 24MHz > * 500MHz <= clockrate <= 1400MHz > > 2. Remove two operating points from the A64 DTS OPPs, so that the GPU > runs at a fixed rate of 432 MHz. > > Note, that when pinning the GPU to 432 MHz the issue [1] completely > disappears for me. I've searched the BSP and could not find any > indication that supports the idea of having the three OPPs. The only > frequency I found in the BPSs for A64 is 432 MHz, which has also proven > stable for me. > > I very much appreciate your feedback! > > [1] https://gitlab.com/postmarketOS/pmaports/-/issues/805 > > Signed-off-by: Frank Oltmanns > --- > Changes in v4: > - sunxi-ng: common: Address review comments. > - Link to v3: https://lore.kernel.org/r/20240304-pinephone-pll-fixes-v3-0-94ab828f269a@oltmanns.dev > > Changes in v3: > - dts: Pin GPU to 432 MHz. > - nkm and a64: Move minimum and maximum rate handling to the common part > of the sunxi-ng driver. > - Removed st7703 patch from series. > - Link to v2: https://lore.kernel.org/r/20240205-pinephone-pll-fixes-v2-0-96a46a2d8c9b@oltmanns.dev > > Changes in v2: > - dts: Increase minimum GPU frequency to 192 MHz. > - nkm and a64: Add minimum and maximum rate for PLL-MIPI. > - nkm: Use the same approach for skipping invalid rates in > ccu_nkm_find_best() as in ccu_nkm_find_best_with_parent_adj(). > - nkm: Improve names for ratio struct members and hence get rid of > describing comments. > - nkm and a64: Correct description in the commit messages: M/N <= 3 > - Remove patches for nm as they were not needed. > - st7703: Rework the commit message to cover more background for the > change. > - Link to v1: https://lore.kernel.org/r/20231218-pinephone-pll-fixes-v1-0-e238b6ed6dc1@oltmanns.dev > > --- > Frank Oltmanns (5): > clk: sunxi-ng: common: Support minimum and maximum rate > clk: sunxi-ng: a64: Set minimum and maximum rate for PLL-MIPI > clk: sunxi-ng: nkm: Support constraints on m/n ratio and parent rate > clk: sunxi-ng: a64: Add constraints on PLL-MIPI's n/m ratio and parent rate > arm64: dts: allwinner: a64: Run GPU at 432 MHz > > arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 8 -------- > drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 14 +++++++++----- > drivers/clk/sunxi-ng/ccu_common.c | 19 +++++++++++++++++++ > drivers/clk/sunxi-ng/ccu_common.h | 3 +++ > drivers/clk/sunxi-ng/ccu_nkm.c | 21 +++++++++++++++++++++ > drivers/clk/sunxi-ng/ccu_nkm.h | 2 ++ > 6 files changed, 54 insertions(+), 13 deletions(-) > --- > base-commit: dcb6c8ee6acc6c347caec1e73fb900c0f4ff9806 > change-id: 20231218-pinephone-pll-fixes-0ccdfde273e4 > > Best regards,