Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1634586pxb; Mon, 13 Sep 2021 01:57:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk+I4ImFu5fzsu8WVUmgpA6H4kue9M5YlNCi8sMCoNCMgcvx6XRK3rH5IxAItlH33Qiqbg X-Received: by 2002:aa7:de93:: with SMTP id j19mr12107226edv.241.1631523455194; Mon, 13 Sep 2021 01:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631523455; cv=none; d=google.com; s=arc-20160816; b=vE/fh/5zm1itpTnMKNxE+fk+nTiqJWwSqfXkzoX+EHr7d+j7OTo7Gc+oRYpwaUYqJ+ QZh/A1HfkVXs4qXypou9N16MnMKANU41IRMYrSvK0pk7aFgFhAnjthRCFfWgwsBWY+Wh WcJx7vyLnDmgmZCMeJcxWF3kFdik3lHTZoDeOXNpLbCzh7eQkzcb8rXvt0S8DDgr3Wxc pmO2m75p5NHLm4WNfFJ9qoGrI2ElirKMf4tzFfoKTmPki9z8XpzViWeV2KJVFI/1fn6F tBYwR/IFoxClcQmcWt3OxFif6UyTMMyRxDBx5XWn05WCDjKus62NTm02L5QHg+Y4i5Fl ttjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=E9ATmExEsloEipz6Tw3Ycqz066RoVvKH+XB80hcZnoQ=; b=QCC7M+3wuIYGGLfs9x1T0KWph9Dc9FLBKQbd0DUleIjIc99UjKsCodAoxcQM9kpKth 8zxU4/BDkhCpVdnh9SIbl78FiEHQxLYqOeU2Y7XlZ8yM06wHtHJu+QOHdJn8/0582sXD oCR2+GhvowhwE171k1drEA9iqoQKWRDNQflMFgB2TqMEKAljNNo4MTEI8BsBZi9ZvT3W lbzM9x25wpRrn2+3Lc2eCK8d4yuA9EpCvdA5IC0jHHX+WkVDvFAa6fsAxTpaRde8sF13 Xj62H3U52NkSXYFyUyewtP+astpxa6e7m9YD2AEfJnX9KkB4uebGVskWyJUKET7rHBvy KZDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si6309297ejk.6.2021.09.13.01.57.09; Mon, 13 Sep 2021 01:57:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238276AbhIMIzM (ORCPT + 99 others); Mon, 13 Sep 2021 04:55:12 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:62893 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237801AbhIMIzL (ORCPT ); Mon, 13 Sep 2021 04:55:11 -0400 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 5001B40003; Mon, 13 Sep 2021 08:53:52 +0000 (UTC) Date: Mon, 13 Sep 2021 10:53:51 +0200 From: Paul Kocialkowski To: Maxime Ripard Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, linux-staging@lists.linux.dev, Yong Deng , Mauro Carvalho Chehab , Rob Herring , Sakari Ailus , Hans Verkuil , Chen-Yu Tsai , Jernej Skrabec , Greg Kroah-Hartman , Helen Koike , Laurent Pinchart , Thomas Petazzoni Subject: Re: [PATCH 01/22] clk: sunxi-ng: v3s: Make the ISP PLL clock public Message-ID: References: <20210910184147.336618-1-paul.kocialkowski@bootlin.com> <20210910184147.336618-2-paul.kocialkowski@bootlin.com> <20210913075417.ampb2jt4quftpqzj@gilmour> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jDKl5hLx33khB+zy" Content-Disposition: inline In-Reply-To: <20210913075417.ampb2jt4quftpqzj@gilmour> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jDKl5hLx33khB+zy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon 13 Sep 21, 09:54, Maxime Ripard wrote: > On Fri, Sep 10, 2021 at 08:41:26PM +0200, Paul Kocialkowski wrote: > > In order to reparent the CSI module clock to the ISP PLL via > > device-tree, export the ISP PLL clock declaration in the public > > device-tree header. >=20 > You use clk_set_rate_exclusive in the ISP driver on the module clock so > it should prevent what you're mentioning from happening. It does, but then it breaks display support entirely (because the DRM driver doesn't use clk_set_rate_exclusive). The bottomline is that using the same PLL for both display and camera easily results in conflicts. > If it doesn't, then clk_set_rate_exclusive has a bug and should be > fixed. >=20 > Either way, using assigned-clock-parents is not a good solution here > either, it only makes sure that this is the case when probe is run. I'm not sure what could provide better guarantees. There is a clock parenting API (in the clock framework) which may, but this implies providing the parent clock to the driver which seems way out of line since this is a platform-specific matter that should certainly not be handled by the driver. I also tried hardcoding the reparenting bit in the CCU driver, but this felt less clean than doing it in device-tree. What do you think? > > Details regarding why the CSI module clock is best parented to the ISP > > PLL are provided in the related commit. >=20 > This is relevant to this commit too and "the related commit" is far too > blurry when you consider the entire Linux git history. Fair enough! Cheers, Paul --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --jDKl5hLx33khB+zy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmE/EZ8ACgkQ3cLmz3+f v9GAXgf/WonaK8RTTtsz/x2Qh5N5DUQf8yAr5T68Jmx1Vo0uTy0bCi81Er1mcels 4i6fI+7VeDZT5eopMWHisHVtgCj0u9mACqHgNnH6izOCei7WU1I9NANeIqDDZeow QVK16HSwIMpe5Be5UTu/tloyf8WGxcmEXTLyAhYSW3wynlegWFx7qe0GpSby7SCW moBvtsHEQ9k3FlvvRtwnZEuUWuBFf5eWN/o0dHy69BL92MYCA0D4lDg0phCrZzru ru41/xE+7fKLDTcOUCoVoKQX4Sh23iymP7dzk+YDbXjN8httuTe0HjZiC89sMDX/ NMsXWS3qM/Owy4KyJP7K4dfSLylwQQ== =Rhfu -----END PGP SIGNATURE----- --jDKl5hLx33khB+zy--