Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp895386rbb; Sun, 25 Feb 2024 08:47:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU//kjHqM5gw+SNxNFI0HZ8QOAYH8QnFltCnTp3LAvcCJujznue72cQMd5iVRPFYd7L/g9zbfon9pS9xUKdOlbjbhKu8WCjP7iOev+3JA== X-Google-Smtp-Source: AGHT+IFDTaLq9pf550E+DctHa+qpcjDiAMYFgO8+lFcfirpi5acnKcwTgBWJGacUAJRwbmGnyn/P X-Received: by 2002:a05:6a21:6315:b0:1a0:b414:a53f with SMTP id wu21-20020a056a21631500b001a0b414a53fmr6377953pzb.23.1708879623979; Sun, 25 Feb 2024 08:47:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708879623; cv=pass; d=google.com; s=arc-20160816; b=lpRifsl1exIypcKkWlhLf16MOa0nWZGK5Dv0oU/LzEeIj+S4dub58W7TycXyURwODq lMgluF6cSOMU2fz6Eqjeg52dc41zBLE4t9ZfjTuEoZLsVg8iGK+7/e0CcEo/LwllJzaX afX9YVqzkMPerksUfkuKlRIErxScLYtSwOLWO87pddoDFhn7cngyqT0n7ufyd8E0IllK gPZgx0BJ0isabkZd7LPciGU/dnY4YcxkKb4jf3cDMRAVIM2GCyM/3ErqaEyxITcn5424 tBpovRo3z6NvgP3XggDiG2XnU7DFIj0al0uXyXtZLZuaDu2nc4hrXlVQWmwpXHBHO1/u ZpnQ== 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:in-reply-to:subject:cc:to:from:references :dkim-signature; bh=KLvix7hOqGdcmlVqOW3S7yNP24rggDpe3G67MMT5Wy8=; fh=EaV+wGchyBp0DwbZBbsC6Iin7R/lbdE3MMxPqDTg+0g=; b=T6EsJzNMB0UQ3HD0t2gxCj8wVh7w3PvjrCqUL+st0ZIm8rIyqYaGb9+xuvmd0a3njW wAVznA84eibgybySnO/vQX0B33Zk4bAxl5PVaOqy77GRAb/VGaYxBvFRHZ+VDt/ToN5K dEHs140j9khoqt8/NYm4XJNDw+91NSqsWrAUJJnmT8FQGa7qYkfyPN/oPM4oF5dqObR/ jCc8WaZt4KKdhqBlnio26o+IXiZxkkj8cubNK4YRK3G029wsBw6qSr00po6prIcx7bMc VdTSjoD7AruENmo5f5/LjUHcl3tqMqhqh26IANxJhxUlHIBqJgmOAGXSD68YqocHtDXi m+zQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oltmanns.dev header.s=MBO0001 header.b=wzEYAgtx; 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-80206-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80206-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oltmanns.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p6-20020aa78606000000b006e4e5f0a6ffsi2401602pfn.87.2024.02.25.08.47.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 08:47:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80206-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@oltmanns.dev header.s=MBO0001 header.b=wzEYAgtx; 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-80206-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80206-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BB809B20E60 for ; Sun, 25 Feb 2024 16:47:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6FC617BB5; Sun, 25 Feb 2024 16:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oltmanns.dev header.i=@oltmanns.dev header.b="wzEYAgtx" Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) (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 96775175B6; Sun, 25 Feb 2024 16:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708879600; cv=none; b=AsAstzvELbkHP/9zONbD1T+mXAkDk1U08uuZ5hKo2wpQj+/evBqs3Ul480mTgn2JAvFf6kTi5iGMYDUjC8Hi5oCNMkrGzQjS6dg9rCRdh60Ve8+FfxDWVkOgONVCkehWr/xmGPtebmyeIuzgwAMEW5e3RkUmTfyeAlfhIFLaMv0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708879600; c=relaxed/simple; bh=0IaysRnkSUJ7kafD+lVXCwhXE6tPyPunpWCjBWUijxo=; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID: MIME-Version:Content-Type; b=S0BKGWqU7+LZBdxjpXAUPj2jxa5bnTizqSk8slIhQZ84jU+SlVw2PgIRtLn4tFzQfoI5jzphJRHKywsIJG18ryVBhD5jGlJWDsKnf9H3fQrh1TfFG9Q7ymHo/QCptGZg24s087hlAbjzIx+IIeS5KIv1vL2oFh7AdGmJ2gckP/E= 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=wzEYAgtx; arc=none smtp.client-ip=80.241.56.172 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 smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (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-202.mailbox.org (Postfix) with ESMTPS id 4TjV512SKkz9sWt; Sun, 25 Feb 2024 17:46:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oltmanns.dev; s=MBO0001; t=1708879589; 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=KLvix7hOqGdcmlVqOW3S7yNP24rggDpe3G67MMT5Wy8=; b=wzEYAgtxIWOE/MbT9GVIjTxl0alloTW3tYRA4CooKsH2iJ+EVMMmWBKAO3MpOjbvNB5YTT ztRp6X8h/3VtEd4ymtHXM4ND8X0rocTb6GwwgEUUXFCFfF7GoC1aGzoIU8HplcwyqbErUH y5hVYMH17/cFwaleV7b2b3W10eGEOkIj25l/LOfuEKIRxKA+1TOpRtQx8mQi8IjmzRdgsy Y2XCYv54na1xCZWJAR3WP0hxIwzJDhJ31QFsLvRN8OZU+XtsmfP43cEPVXG+SZHUgKEPY6 xkl7ArtkrKlI48AYkpYv3SgMkaqMACDWNbd0TCPDvWLLWEhuuX51TcHxNHu3Vg== References: <20240205-pinephone-pll-fixes-v2-0-96a46a2d8c9b@oltmanns.dev> <20240205-pinephone-pll-fixes-v2-5-96a46a2d8c9b@oltmanns.dev> <87sf1zxb0s.fsf@oltmanns.dev> From: Frank Oltmanns To: Maxime Ripard Cc: Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , 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, Icenowy Zheng Subject: Re: [PATCH v2 5/6] drm/panel: st7703: Drive XBD599 panel at higher clock rate In-reply-to: Date: Sun, 25 Feb 2024 17:46:16 +0100 Message-ID: <87o7c4mqzr.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 Hi Maxime, 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: >> >> On 2024-02-08 at 20:05:08 +0100, Maxime Ripard wrote: >> > [[PGP Signed Part:Undecided]] >> > Hi Frank, >> > >> > 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. >> >> >> >> This is the relevant clock tree: >> >> pll-mipi >> >> tcon0 >> >> tcon-data-clock >> >> >> >> 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: >> >> crtc_clock * 1000 * (24 / 4) / 4 >> >> >> >> tcon-data-clock runs at tcon0 / 4 (fixed divisor), so it requests a >> >> parent rate of >> >> 4 * (crtc_clock * 1000 * (24 / 4) / 4) >> >> >> >> Since tcon0 is a ccu_mux, the rate of tcon0 equals the rate of pll-mipi. >> >> >> >> pll-mipi's constraint to run at 500MHz or higher forces us to have a >> >> crtc_clock >= 83333 kHz if we want a 60 Hz vertical refresh rate. >> >> >> >> 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. >> >> >> >> Signed-off-by: Frank Oltmanns >> > >> > 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. >> > >> > The PLL setup is something for the MIPI-DSI driver to adjust, not for >> > the panel to care for. >> > >> >> 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. :) >> >> 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). >> >> While I appreciate other suggestion as well, I'll look into options for >> using a different divisor than 4. > > 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. > 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. 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. Best regards, Frank [1]: https://www.kernel.org/doc/html/v6.7/process/submitting-patches.html#describe-your-changes [2]: https://lore.kernel.org/lkml/87wmsvo0fh.fsf@oltmanns.dev/ > > Maxime > > [[End of PGP Signed Part]]