Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1548510pxb; Thu, 16 Sep 2021 09:41:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2Bh3QIXKjoCXgJMs2lptADpuzkk5uXViX+xC43TS88anRe7gc6pPyfDJMO9BvcQrYPPwb X-Received: by 2002:a92:c84c:: with SMTP id b12mr4708970ilq.105.1631810481700; Thu, 16 Sep 2021 09:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631810481; cv=none; d=google.com; s=arc-20160816; b=aqPBzd1XWOTPSz4xGL+U1Aa56oLZA0sH2vJqA9WoW5FCO5ruZS2Y2c7wRyShJNUflE RhRKHI7UmzrgpjqrFuVd9vnEuhkMNOn9Qj2BsjUZ3kOB2qST3scYtm6DvsHlkPmihmCw btLsd8KBm8b+fcoP4Tn3I0CB+fQzqs2D8ifEMXehkUN3MMHKCUBc7AP4gFXjGfgLgs3n b3uUrx27Skm+kBHeRkJocyaalis7Kv09upaJwbUxNEP6PqcCZXg+CMNXyXIbsKRplvMZ UWMHBoP057dgjuX5ihpCkjDHcQT09xEtCJfaBt0yr4tqlWrhVD8CsHpYrVKGFqmUvITl EZsw== 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:dkim-signature :dkim-signature; bh=Lqt0we4A/T0SHYBhw0ZBiteVrFae9rbK0EPrRuFl3oY=; b=kobNNf8OBOBeD+YtTVE7lKDjMM3ah+I4FfUajG6PF45gOJF3NYzPeUamC49ft4ZYn1 nsU45zHsLnPkc77AdYh/9izCwhPsjCo3jBYqPN2k5JjVRvXu9HJIhqej66p7rjFHeWqk xjyaZNbwFoaoJn0SqmsIC1g68UPght3aaJkbz+BWfjBUi/rURHmju582GDi/V8pvfZJV sKcQWRDsTxoKz/R4muNK3mJUhJyBoutMbCHu9BUuAyGIpLiJoXWndezpR/ZbqSe++ftA iZhPYsRKnr2ietKE7CeIvGUUJBShmFn8QEd+fQ6QdMk7cOiQz3Y3+5eZ1pxdGTeJJfT0 zKyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=LnIWuare; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hzcmiTsk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b16si2618004ila.182.2021.09.16.09.41.11; Thu, 16 Sep 2021 09:41:21 -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; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=LnIWuare; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hzcmiTsk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244487AbhIPQjL (ORCPT + 99 others); Thu, 16 Sep 2021 12:39:11 -0400 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]:51859 "EHLO wnew2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243454AbhIPQba (ORCPT ); Thu, 16 Sep 2021 12:31:30 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id B62142B00B18; Thu, 16 Sep 2021 12:30:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 16 Sep 2021 12:30:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=Lqt0we4A/T0SHYBhw0ZBiteVrFa e9rbK0EPrRuFl3oY=; b=LnIWuareiS2jP4nnsunZoVLeH91/ijKlwjtNs0JMLTq W5SkajmnGWk707CsLe1azxnZa8myH4n+bFwA8ckwnQjA8EphQZ0JCTbh4Y6K4n92 g2g1F/E53xOP06kQjsn+JOMXRyEu2S88ZzuGGJQxDVYZTatLErit5ewiKV6u2BdI lsdp1cZ5a3HMBapmFj07mGRW4hl42aMEFuzE7fU2OxArRkU7uz0Iikxns502WK2A VurLq8I/YfExtRjENhb9CeCKHxLmcZVIj9cZsKuRCnd2TZcIYlaMPv+7tJ16zeKO lv+MK8f24hm/KgC6L9xe5JnBP56ZQ7rQAeA2NIPzziw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Lqt0we 4A/T0SHYBhw0ZBiteVrFae9rbK0EPrRuFl3oY=; b=hzcmiTskzfJ0LpViQyTC36 ukeBnRV3kVOlWsu8LkC8k3TIb0V6CrrFJkdx5Op//6RBN8W6uLa83Op2gJZ5M6bA 5CKZYAMI8pT3jB91IQObI/Zwdf7H9RY3lcqQvuTZhmouwzJmpjnAINJFQk9RZqCP oU/PuigbRr66lGhsqy7F+GrdxXBtRVpmg3VbU/sccLOyqg5GIWO6uiqOk+75rKvi GRDXS8VgLCMv6LllYt39AjMMPv/a9ZRqCUaBNHwX4nrPHQB95LHjWGSY5fpeEy9C I78PdIa9tVQJn/iwGijd8nj+guRXbXSpCIkz5ojHdqqkHjRo0hnQ5vsB7RyPdKEA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehgedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Sep 2021 12:30:03 -0400 (EDT) Date: Thu, 16 Sep 2021 18:30:00 +0200 From: Maxime Ripard To: Paul Kocialkowski 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: <20210916163000.6ezo6muhq23bewyi@gilmour> 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="6h7nudibxh245pvl" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6h7nudibxh245pvl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Salut Paul, On Mon, Sep 13, 2021 at 10:53:51AM +0200, Paul Kocialkowski wrote: > 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. >=20 > It does, but then it breaks display support entirely (because the DRM > driver doesn't use clk_set_rate_exclusive). >=20 > The bottomline is that using the same PLL for both display and camera > easily results in conflicts. The commit log should reflect that then > > 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. >=20 > 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. >=20 > I also tried hardcoding the reparenting bit in the CCU driver, but > this felt less clean than doing it in device-tree. >=20 > What do you think? This is essentially policy, and putting it in the DT fails for the reason we already discussed, but also if we ever want to change it for example to optimize it a bit. In this case, we would have to deal with the old and new DT, and the possible consequences. So yeah, hardcoding it in the clock driver seems like a more sensible choice. Maxime --6h7nudibxh245pvl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYUNxCAAKCRDj7w1vZxhR xTHSAP94s1QU8mIU0mn77banRpkH0ZGKIUjPYygrvhOgdlCSegD/UryBgzqTDNlY omqVVtLWlYLTj9NQE+yJaYV+lXE3oQo= =K8KU -----END PGP SIGNATURE----- --6h7nudibxh245pvl--