Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp11595rdb; Thu, 21 Dec 2023 00:59:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IHK1NyIizYdTTbxdmOZBpx9mzcF1BbdBO9/C+ialAlZRgXb1gqLHuBXsBLzHy8ZY112Shkd X-Received: by 2002:aa7:8d4b:0:b0:6ce:3aca:c5f1 with SMTP id s11-20020aa78d4b000000b006ce3acac5f1mr22348612pfe.50.1703149168829; Thu, 21 Dec 2023 00:59:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703149168; cv=none; d=google.com; s=arc-20160816; b=jFdkvjk2dBRrMIr4MKmc0gdwMIkj+n86522LBqFa0+XMlNgNoVisnYR+1QydfHB87P Sw0HTUoR17itfTQdiGBpmf3KImM/Tmv81hDu4W8gA3x2NeKiRfPHVTGdi5Vb9r+EHrlQ 9/FpOK1JA/MHLX0YfEY7SdYpeLC32lDIy4f2gUscuFDdafQHvhezk4/Dqxq9G3bCRTgv eMdM/d8QoeXtsGL8sQKyYk+zkAhBER72d9ZkKhWNl9PPrWr/BGsN0jYXtrQUtQYzxaAG joOsjcVF/9MLlPwL6DesTF4buZJhcPj9tCrMdgaYU0IclIGeopO1zAqBq6Asg5/W5l7v 36ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fB7cSFi7dOiCHfApzCX144rpq9QXvKVy01lVOkOryQo=; fh=mcnIo6+ZFRV/3PTYUnwvXzayGMNUZrbj9dIygjzUBFw=; b=WIfWCP2Q259qRRG2HfXM8FR1L9hg7KwWPdGnv7nZcDJsq+FGUSpfjq8KY41G+2GHpE yM9cHZCz+yXhTyaXTiNY9KcBCvRwYS1liTQEQOtW30Mmf8EwRz5ZquCPI0BBAc++XiTg EU6tIT2oI+aW0PjvXt25FUJQ9+ETyDXVgllpMq6a/OlFY0XEfEQFrgxAcGsMO7fhmjdC GuUxiLTclL4hncYrDUTT8XM5Dez8MzfRyAz882BpRpdX25bTsVQPFEB5T0qtX6s0C3qy AbllJTjZhHiv7uGVzhJ0EhvBGE3e+fi9HRZNng4+INDIHPs0STF1YEH47uaX6LHd3gAR 4FNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VigeQnGA; spf=pass (google.com: domain of linux-kernel+bounces-8032-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t23-20020aa79397000000b006d96712f9d9si1181601pfe.263.2023.12.21.00.59.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 00:59:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8032-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VigeQnGA; spf=pass (google.com: domain of linux-kernel+bounces-8032-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 034CC284082 for ; Thu, 21 Dec 2023 08:59:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6C66208AE; Thu, 21 Dec 2023 08:58:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VigeQnGA" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D95A82031D; Thu, 21 Dec 2023 08:58:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1671C433C8; Thu, 21 Dec 2023 08:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703149136; bh=wm1PdQNBEorVmceg+YsKLt+qojEwDpCAuzfzZgHVPgE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VigeQnGAvfmjN1u9Rrte0ikdLP8ceGGjw8Is02oIVlhEtVlzAbWrmwsKtby8x308u 2krFnQHVp1O4cm1aa1JE4uAPUuE8+hf6EFP/zrmSy3o/vcqKbAoov58W4fWhkF0f0f bGCT5uDgSpcu2gOyddd1xZELcbRHGsWRqhkOpHh/cMGZWOcX69DHMaqT8MTv4PF9FS w9UBSRNz6CRuSLrhl8L5FdtjxrZCnyY74iMVcleiK0Zsp4IKYSuH6fzbAl6dbD3TgX U2u0z0H8KtqM7UHaXfLjnf+73p5B3856lJiwZA7GBJNtdvEbXtxycchxCdcBdLaXfV aHRQ406P7hitw== Date: Thu, 21 Dec 2023 09:58:53 +0100 From: Maxime Ripard To: "H. Nikolaus Schaller" Cc: Andrew Davis , Frank Binns , Donald Robson , Matt Coster , Adam Ford , Ivaylo Dimitrov , Maarten Lankhorst , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , =?utf-8?Q?Beno=C3=AEt?= Cousson , Tony Lindgren , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Paul Cercueil , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-omap@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH RFC 01/10] dt-bindings: gpu: Add PowerVR Series5 SGX GPUs Message-ID: References: <23livt5mcc64bb6lkeec2uxp5cyn4wfekwaj6wzrjnrkndvwgj@6tveqglqpr4v> <6BC60156-89E2-4734-BD00-B49A9A6C1D7A@goldelico.com> <6gpehpoz54f5lxhmvirqbfwmq7dpgiroy27cljpvu66wtn7aqy@lgrh7wysyxnp> <22cny5aumc5wafsrjd3j55zcjbjf2viip64kfbjiqis2grtd6t@wg5dxeuzil6l> <3E03E913-48E1-49EC-A6C9-EAC1612E65E7@goldelico.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cuiar5zluuku2kr2" Content-Disposition: inline In-Reply-To: <3E03E913-48E1-49EC-A6C9-EAC1612E65E7@goldelico.com> --cuiar5zluuku2kr2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 18, 2023 at 11:54:47AM +0100, H. Nikolaus Schaller wrote: >=20 >=20 > > Am 18.12.2023 um 11:14 schrieb Maxime Ripard : > >=20 > > On Mon, Dec 18, 2023 at 10:28:09AM +0100, H. Nikolaus Schaller wrote: > >> Hi Maxime, > >>=20 > >>> Am 15.12.2023 um 14:33 schrieb Maxime Ripard : > >>>=20 > >>>>>=20 > >>>>> It's for a separate architecture, with a separate driver, maintaine= d out > >>>>> of tree by a separate community, with a separate set of requirement= s as > >>>>> evidenced by the other thread. And that's all fine in itself, but > >>>>> there's very little reason to put these two bindings in the same fi= le. > >>>>>=20 > >>>>> We could also turn this around, why is it important that it's in the > >>>>> same file? > >>>>=20 > >>>> Same vendor. And enough similarity in architectures, even a logical = sequence > >>>> of development of versions (SGX =3D Version 5, Rogue =3D Version 6+)= behind. > >>>> (SGX and Rogue seem to be just trade names for their architecture de= velopment). > >>>=20 > >>> Again, none of that matters for *where* the binding is stored. > >>=20 > >> So what then speaks against extending the existing bindings file as pr= oposed > >> here? > >=20 > > I mean, apart from everything you quoted, then sure, nothing speaks > > against it. > >=20 > >>>> AFAIK bindings should describe hardware and not communities or drive= rs > >>>> or who is currently maintaining it. The latter can change, the first= not. > >>>=20 > >>> Bindings are supposed to describe hardware indeed. Nothing was ever s= aid > >>> about where those bindings are supposed to be located. > >>>=20 > >>> There's hundreds of other YAML bindings describing devices of the same > >>> vendors and different devices from the same generation. > >>=20 > >> Usually SoC seem to be split over multiple files by subsystem. Not by = versions > >> or generations. If the subsystems are similar enough they share the sa= me bindings > >> doc instead of having one for each generation duplicating a lot of cod= e. > >>=20 > >> Here is a comparable example that combines multiple vendors and genera= tions: > >>=20 > >> Documentation/devicetree/bindings/usb/generic-ehci.yaml > >=20 > > EHCI is a single interface for USB2.0 controllers. It's a standard API, > > and is made of a single driver that requires minor modifications to deal > > with multiple devices. > >=20 > > We're very far from the same situation here. >=20 > How far are we really? There's one binding for one driver. You suggest one binding for two drivers. > And, it is the purpose of the driver to handle different cases. >=20 > That there are currently two drivers is just a matter of history and > not a necessity. Cool, so what you're saying is that your plan is to support those GPUs upstream in the imagination driver? I guess we should delay this patch until we see that series then. > >>> If anything it'll make it easier for you. I'm really not sure why it = is > >>> controversial and you're fighting this so hard. > >>=20 > >> Well, you made it controversial by proposing to split what IMHO belong= s together. > >=20 > > No, reviews aren't controversial. > > The controversy started when you chose > > to oppose it while you could have just rolled with it. >=20 > Well, you asked >=20 > "I think it would be best to have a separate file for this, img,sgx.yaml > maybe?" >=20 > and >=20 > "Because it's more convenient?" >=20 > I understood that as an invitation for discussing the pros and cons > and working out the most convenient solution. And that involves > playing the devil's advocate which of course is controversial by > principle. >=20 > Now, IMHO all the pros and cons are on the table and the question is > who makes a decision how to go. You haven't listed any pro so far, you're claiming that the one I raise are irrelevant. > >> I feel that the original patch is good enough for its purpose and foll= ows > >> some design pattern that can be deduced from other binding docs. > >=20 > > [citation needed] >=20 > Joke: Documentation/devicetree/bindings/* - I am not aware of a formal an= alysis of course. >=20 > But see my example for ehci. It follows the pattern I mean. If clocks, re= gs, interrupts, > resets, and more properties are (almost) the same, then group them and ju= st differentiate > by different compatible strings. Again, EHCI is not something you can compare to. It's a binding to support a standard interface. You don't have the same interface and your driver will need to be different. And more importantly: bindings are meant to describe the hardware itself. How it's supported in Linux is irrelevant to the discussion. So, we could have: 10 drivers for the same binding, or 1 driver for 10 bindings. The two notions are orthogonal. > If necessary use some - if: clauses. >=20 > It is the task of drivers to handle the details. > > As my other (maybe more important) comment to this patch did indicate we = IMHO can easily > live with something like >=20 > + - items: > + - enum: > + - ti,am62-gpu # IMG AXE GPU model/revision is fully discov= erable > + - ti,omap3430-gpu # sgx530 Rev 121 > + - ti,omap3630-gpu # sgx530 Rev 125 > + - ingenic,jz4780-gpu # sgx540 Rev 130 > + - ti,omap4430-gpu # sgx540 Rev 120 > + - allwinner,sun6i-a31-gpu # sgx544 MP2 Rev 115 > + - ti,omap4470-gpu # sgx544 MP1 Rev 112 > + - ti,omap5432-gpu # sgx544 MP2 Rev 105 > + - ti,am5728-gpu # sgx544 MP2 Rev 116 > + - ti,am6548-gpu # sgx544 MP1 Rev 117 >=20 > And leave it to drivers using a table to deduce the generation and > revision or read it out from the chip. And there can even be different > drivers handling only a subset of the potential compatibles. >=20 > Then the currently-out-of-tree driver for the sgx5 can be reworked in > less than half an hour without loosing functionality. Again, you're making it harder than it needs to be for no particular reason other than the potential file name clash that can be addressed. Maxime --cuiar5zluuku2kr2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZYP+RAAKCRDj7w1vZxhR xXV6AQDDDrZBXTND+ZA5tJYZObZh1JN/uWCGtddmC+cdKRRazAD/TBl0erAktvMo xAQxFlpjvE94vKEMqz+0P/uaY9m2fQQ= =z99/ -----END PGP SIGNATURE----- --cuiar5zluuku2kr2--