Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1107155rbb; Sun, 25 Feb 2024 20:58:13 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCU9yOVfsS4Jqx/2+t+uv19DoLL3vmDVKTRlH9CLg5wG5rRvJ4k7uSv0ISNR1rObSluKp6v58zNrZyjGH3vhqzH+8raJZReuPJNiVng+Sw== X-Google-Smtp-Source: AGHT+IHaBWg7nd7NtVHm636MQMBVW/rMq+8/5ww+q4wvfw11pDVV5vq9j2nfRCUE/dr5+daw8fdn X-Received: by 2002:a05:6358:71c4:b0:17b:7ae9:2502 with SMTP id u4-20020a05635871c400b0017b7ae92502mr6272770rwu.31.1708923492982; Sun, 25 Feb 2024 20:58:12 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1708923492; cv=pass; d=google.com; s=arc-20160816; b=xTIdfZapKqiFNAj+X+tPrFjFMaKc2IX+3IqPEPQp6t6itESFJs1D89OYgnGof8rhEl paelWbFHTAsw/xa65vpsta9K7rSo3k8y25ek5tlANAQqX1m7dft2hUAyydCw4cHmguJg 23+Dkz7CsyyhBp6y3UPZ8GylznndNzmEoVOGcHPtS+06mWWKntYn2FneGeS40Qsg80rK 9BlEc0Hki1bSufFTVQhzfkMCfn7G78P/15xrNCG+w60fyTOTCE2uO7O5lSzISmQNpBVh iQmVzxpuuDa06vdrXzzF6lTTlabYE/dSnNTI0TV/KBlGxbXiRvAN34TzyK/jco7ydCSL 4yYQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:organization:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=QrAILGTlcUzfFUd66MJkWp2t/tRwrE6wC4UtelAjn54=; fh=V57ab69gFzg3FGJdFYY0nBudcB1TahPzpencAvqv5vA=; b=D/LZ3HHeIYEkpsgmGaGti07UyzISoBpfUq6KfPBCtDoXWGVIeZKjS8DZT9y/ixEUht 1v4DQToeAZo3go48N1twL18qxzjgX/NKHsRMYnZ2EvATf8CpsIVtmh3gLNOFQiBWzXil XUNjY/vLnK1lBPmZ6ZcsLVmsjSA/T/CAy1qSX0w55OIkNf3CP7AjAtVu+CzJjpKGItQ7 aqd47FLxMOKIaXDZ59ylP9aFMCbDsyVj8xzPnfRzVCID7Y0oDsAzNFHOVATI9L3XHJzn R5/ESiWZBz8Sc5tv4B+GoIkjBwfqMV5t4jlgjo8+3G7yKrygumioGq1u0zzH+HkLfd/d hU5w==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail2 header.b=p9ySF9IQ; arc=pass (i=2 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me); spf=pass (google.com: domain of linux-kernel+bounces-80557-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80557-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=icenowy.me Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r23-20020a635157000000b005d549553c07si3065654pgl.598.2024.02.25.20.58.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 20:58:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80557-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail2 header.b=p9ySF9IQ; arc=pass (i=2 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me); spf=pass (google.com: domain of linux-kernel+bounces-80557-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80557-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=icenowy.me 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 44B74B2089C for ; Mon, 26 Feb 2024 04:58:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C27C1B7FB; Mon, 26 Feb 2024 04:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@icenowy.me header.b="p9ySF9IQ" Received: from sender4-op-o12.zoho.com (sender4-op-o12.zoho.com [136.143.188.12]) (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 3DE7618EA8; Mon, 26 Feb 2024 04:58:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.12 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708923482; cv=pass; b=Odjvy/1W1ThozDqeqUeK56yYOFtqatZjuqwgYe1e3W4uaDD+StJ0Hmc1WAcQGQV4WSBN8wV6Hb0ddkQ7MFOih77Er+9vM/YMihJeujPDlL/1s9PE7phyESX7XFFm20XRpJJwfeXpK5gG/iyNYS5+bR09oLnephZFe8OMTaIlj2g= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708923482; c=relaxed/simple; bh=QrAILGTlcUzfFUd66MJkWp2t/tRwrE6wC4UtelAjn54=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=TVZKePTXchTrQXUye3Lv/yHrZx3DmplcYPGzd9siS5V/v6aq+tURPJk2CkpK1TVcNELfXFVdao1Z2V9GvhT6pzlllGlliRwAkdXCt6x5XemMctgeYrBj5zKAhKB8QGev/u6fDUM4S7j1VWKC0kjHrOkFyKt8sQ/QKMysRVRPP3I= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me; spf=pass smtp.mailfrom=icenowy.me; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@icenowy.me header.b=p9ySF9IQ; arc=pass smtp.client-ip=136.143.188.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icenowy.me ARC-Seal: i=1; a=rsa-sha256; t=1708923427; cv=none; d=zohomail.com; s=zohoarc; b=S9/egMTPtcK0XTfnP9q6hh4uwDIf4SH7mvB7B//loFH77TgHuG6C2eyT1uy0BTMmE2mhBatdg2QG+V9x8+nzEg80tAbYjeBurf8rxAceOpVGMtJYIkPHCTtWS7ywW1QdMLiSCWWrRUFQ1G83R9JxH06F2RgRHIAhJinILJP1csg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708923427; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=QrAILGTlcUzfFUd66MJkWp2t/tRwrE6wC4UtelAjn54=; b=TZrdFEPMPHMgm40I0n2fVtPCCMR4CzPNWq0/vNjM9Sq9gRB3NJYzJw1y7MFUkbOslUu6Ts0bZOA2rW6C+R1c0kDy9M/rsV1xKV+1h5rn//sMzGWsDdQoYrtXwtQy9i87Kj1nxdIOJ/zc/yeXW++qLNCqASftpa4sJUrhG8uzEko= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1708923427; s=zmail2; d=icenowy.me; i=uwu@icenowy.me; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Message-Id:Reply-To; bh=QrAILGTlcUzfFUd66MJkWp2t/tRwrE6wC4UtelAjn54=; b=p9ySF9IQVfZPeDuN3uhEIHKojM87TDibcGyxFn5fW1M9y+0mj8hG1090eN1PxpZu 8HZ7D7iTYvpIRvei6Tst9iMAU5iIBplr9wk0Gbph4LwrcNW0wk/awHDUrY8YdQZzJ9B yrsxq8JEDVpHaUt/m8evr7TmJb01ty3ke1FcAadg5tI+cK1WxHuDUbvnaj6MtHbXR0p dhOAn4XRifxDvga/T+iX5VcIXvyASoI4ZANtXoBYyplgJPv+mcPDQ4XcuZL/6nKSdnJ 4mXw6a1tm9mkY1hqJYIY0iZeex7fwG1pYGnT7NWkgu45dS4+t1niJjXJatiGkhBfiek AWXBUU3LMQ== Received: from edelgard.fodlan.icenowy.me (112.94.101.70 [112.94.101.70]) by mx.zohomail.com with SMTPS id 1708923424459946.3223816657112; Sun, 25 Feb 2024 20:57:04 -0800 (PST) Message-ID: <02c27b503f379aff28563dda6ad7e2718fe7229f.camel@icenowy.me> Subject: Re: [PATCH v2 5/6] drm/panel: st7703: Drive XBD599 panel at higher clock rate From: Icenowy Zheng To: Frank Oltmanns , Maxime Ripard Cc: Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Guido =?ISO-8859-1?Q?G=FCnther?= , 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 Date: Mon, 26 Feb 2024 12:56:55 +0800 In-Reply-To: <87o7c4mqzr.fsf@oltmanns.dev> References: <20240205-pinephone-pll-fixes-v2-0-96a46a2d8c9b@oltmanns.dev> <20240205-pinephone-pll-fixes-v2-5-96a46a2d8c9b@oltmanns.dev> <87sf1zxb0s.fsf@oltmanns.dev> <87o7c4mqzr.fsf@oltmanns.dev> Organization: Anthon Open-Source Community Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ZohoMailClient: External =E5=9C=A8 2024-02-25=E6=98=9F=E6=9C=9F=E6=97=A5=E7=9A=84 17:46 +0100=EF=BC= =8CFrank Oltmanns=E5=86=99=E9=81=93=EF=BC=9A > Hi Maxime, >=20 > On 2024-02-22 at 11:29:51 +0100, Maxime Ripard > wrote: > > [[PGP Signed Part:Undecided]] > > On Sun, Feb 11, 2024 at 04:42:43PM +0100, Frank Oltmanns wrote: > > >=20 > > > On 2024-02-08 at 20:05:08 +0100, Maxime Ripard > > > wrote: > > > > [[PGP Signed Part:Undecided]] > > > > Hi Frank, > > > >=20 > > > > On Mon, Feb 05, 2024 at 04:22:28PM +0100, Frank Oltmanns wrote: > > > > > This panel is used in the pinephone that runs on a Allwinner > > > > > A64 SOC. > > > > > The SOC requires pll-mipi to run at more than 500 MHz. > > > > >=20 > > > > > This is the relevant clock tree: > > > > > =C2=A0pll-mipi > > > > > =C2=A0=C2=A0=C2=A0 tcon0 > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 tcon-data-clock > > > > >=20 > > > > > tcon-data-clock has to run at 1/4 the DSI per-lane bit rate. > > > > > The XBD599 > > > > > has 24 bpp and 4 lanes. Therefore, the resulting requested > > > > > tcon-data-clock rate is: > > > > > =C2=A0=C2=A0=C2=A0 crtc_clock * 1000 * (24 / 4) / 4 > > > > >=20 > > > > > tcon-data-clock runs at tcon0 / 4 (fixed divisor), so it > > > > > requests a > > > > > parent rate of > > > > > =C2=A0=C2=A0=C2=A0 4 * (crtc_clock * 1000 * (24 / 4) / 4) > > > > >=20 > > > > > Since tcon0 is a ccu_mux, the rate of tcon0 equals the rate > > > > > of pll-mipi. > > > > >=20 > > > > > pll-mipi's constraint to run at 500MHz or higher forces us to > > > > > have a > > > > > crtc_clock >=3D 83333 kHz if we want a 60 Hz vertical refresh > > > > > rate. > > > > >=20 > > > > > Change [hv]sync_(start|end) so that we reach a clock rate of > > > > > 83502 kHz > > > > > so that it is high enough to align with pll-pipi limits. > > > > >=20 > > > > > Signed-off-by: Frank Oltmanns > > > >=20 > > > > That commit log is great, but it's kind of off-topic. It's a > > > > panel > > > > driver, it can be used on any MIPI-DSI controller, the only > > > > relevant > > > > information there should be the panel timings required in the > > > > datasheet. > > > >=20 > > > > The PLL setup is something for the MIPI-DSI driver to adjust, > > > > not for > > > > the panel to care for. > > > >=20 > > >=20 > > > I absolutely agree. It even was the reason for my submission of a > > > sunxi-ng patch series last year that was accepted, to make pll- > > > mipi more > > > flexible. :) > > >=20 > > > The only remaining option I currently see for adjusting the > > > sunxi-ng > > > driver to further accomodate the panel, is trying to use a higher > > > divisor than 4 for calculating tcon-data-clock from tcon0. I > > > remember > > > reading a discussion about this, but as far as I remember that > > > proposal > > > was rejected (by you, IIRC). > > >=20 > > > While I appreciate other suggestion as well, I'll look into > > > options for > > > using a different divisor than 4. > >=20 > > Like I said, I'm not against the patch at all, it looks great to me > > on > > principle. I just think you should completely rephrase the commit > > log > > using the datasheet as the only reliable source of the display > > timings. > > Whether sun4i can work around the panel requirements is something > > completely orthogonal to the discussion, and thus the commit log. > >=20 >=20 > I was trying to follow the guidelines [1] for describing the reason > behind my changes to the panel. My original commit message was a lot > shorter, which, understandably, resulted in follow up questions [2]. > With the current commit log, I'm trying to address those questions. > According to the device tree, the panel is only used in the > pinephone. > The only reason for the change is that the SoC used by the only user > of > this panel can not provide the rate the panel requests with the > current > values. I think this information is relevant. >=20 > Unfortunately, as described in [2], I cannot back these values with > any > datasheets because I couldn't find any. I could only find hints that > they are not publicly available. Icenowy (added to CC) submitted the > original values. Sorry but this kind of things are just magic from the vendor that I could hardly explain... >=20 > Best regards, > =C2=A0 Frank >=20 > [1]: > https://www.kernel.org/doc/html/v6.7/process/submitting-patches.html#desc= ribe-your-changes > [2]: https://lore.kernel.org/lkml/87wmsvo0fh.fsf@oltmanns.dev/ >=20 > >=20 > > Maxime > >=20 > > [[End of PGP Signed Part]] >=20