Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4483669rdh; Wed, 29 Nov 2023 02:50:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IE798Iu94ctAXGumXYOFQ8oUfiVpySh+S8Ep+p6wVpyfb99NqAV8tvjYCPJPAUTO9ZEnsN7 X-Received: by 2002:a05:6871:4089:b0:1e9:badb:acaa with SMTP id kz9-20020a056871408900b001e9badbacaamr24342989oab.23.1701255023018; Wed, 29 Nov 2023 02:50:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701255022; cv=none; d=google.com; s=arc-20160816; b=QEx2h8Lcpwd/ibn2udTnKU2XyfZBGej+fgvbanhs0p5rQDe7YTHPeG/VLAQPChEShy pqf0H9FTudbA3lCEr75Glp3aUnKzq6XbXn4pSLRTti1qk0gmJO5GUGMVa6diBtBBFRl0 SDSFCogpdbCPrHPb6O9XUV5et/sAQk8navpdAjGMdO12GUqNp6dkmCZOLwp1Ym2TIenR lmaA/4aBZ/y5WNrlT50MOH2k2ODPaEdfRcziRxIuJEnnmLkZ2EdhjBvvGE5cntCr0vM3 BGWBZ7dBOW70HJ3ISFW2QTFishGnDjQSbeeGQKBIc16OSfSPLmiDUMSlH6i8QZ3LvKl4 LGdw== 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; bh=dbv9eLVw98OCN4Zz3LVcAZDDpGWm6wDYngtIP/CwUB4=; fh=zps5f7AhwQN+l1NJD8cszVgp0VzFdHe6y6vVwrQi+rw=; b=tIQ6XL4QA774dW4VU3oIwpOEnG8er+ZGtizbJGUd3BVFHl8uJ+LX8I1Az60QCywTU7 0qwl1Aa9+mEYHdiC5NGRz6V7hYVnhmG3eQjk7jg6URnf35Axaj+Jkg4zvr33g1riJAMn DSJz0VrHsT6wsXndZq5dOW+kMSBcBmrBxNgsFxv4kFINfmSQPAAA9Dl8XYn45LLSOICs luOxDEm9ZkbwHooMjIoC5loeQu5Bw16VPHxDB/cT6tmguxAl2+hlN9WkuSfpDGbJxOXe NokOAw05H8jOW8WJ4asoFAPKaM3CSUlCl2C8zlEXBIcQi9jC+IPJmDzb1RJkrDPau0gs wRfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T4tSTzMW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id bg6-20020a056a02010600b005bf77518da0si14254361pgb.613.2023.11.29.02.50.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 02:50:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T4tSTzMW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id BE0EE808EE78; Wed, 29 Nov 2023 02:50:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229588AbjK2Ktz (ORCPT + 99 others); Wed, 29 Nov 2023 05:49:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjK2Kty (ORCPT ); Wed, 29 Nov 2023 05:49:54 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B7A310CE for ; Wed, 29 Nov 2023 02:50:01 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F4C6C433C8; Wed, 29 Nov 2023 10:50:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701255000; bh=FrNAcwg/8bjiAPz/eSYCESKcNWmbd0LQldJWLX7qG5o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T4tSTzMWkYPpuNpE7/MfdQLHeEPCwSykWBYttORCRo7zFgD+VvmYcBVIQG7ETI6rT qWPOwcQkBp/75gdvAmeggNw+TLE2Gejew+yRA1RAz6vUjrQz7AQnNMZHauwZH+cRLK f6Xte5V7kVc4YySqlw7rtZEMwCBTgAjSXWa6JViOPh1DNN+MMIl0VZjtCAYLEpSonw Tm2wfp3Tjj1Yl6TrkbtQ834kfANHvTLzHOVYQjU76go1yZDmnfiRCqAWtZoyXj6K3V BIWH+ZiKt5JD6jWI5/1FIQbJh8TzR+fscSekAhpewjliPhrmolHXJCaEhR10KjEU0J Siaa/26o1bxKw== Date: Wed, 29 Nov 2023 11:49:57 +0100 From: Maxime Ripard To: Geert Uytterhoeven Cc: Javier Martinez Canillas , Frank Binns , Donald Robson , Matt Coster , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Sarah Walker , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] drm/imagination: DRM_POWERVR should depend on ARCH_K3 Message-ID: References: <87o7fdbszs.fsf@minerva.mail-host-address-is-not-set> <7hee65pmdl5pajm2kgqld22xfi4iox4s2psswu2mdlfk6u6f7x@w4ecogdx6uj6> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yx7wzbz23427lvci" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 29 Nov 2023 02:50:20 -0800 (PST) --yx7wzbz23427lvci Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 29, 2023 at 11:10:51AM +0100, Geert Uytterhoeven wrote: > On Wed, Nov 29, 2023 at 10:23=E2=80=AFAM Maxime Ripard wrote: > > On Wed, Nov 29, 2023 at 09:58:12AM +0100, Geert Uytterhoeven wrote: > > > On Wed, Nov 29, 2023 at 9:35=E2=80=AFAM Maxime Ripard wrote: > > > > On Tue, Nov 28, 2023 at 08:16:18PM +0100, Geert Uytterhoeven wrote: > > > > > On Tue, Nov 28, 2023 at 8:03=E2=80=AFPM Javier Martinez Canillas > > > > > wrote: > > > > > > Geert Uytterhoeven writes: > > > > > > > The Imagination Technologies PowerVR Series 6 GPU is currentl= y only > > > > > > > supported on Texas Instruments K3 AM62x SoCs. Hence add a de= pendency on > > > > > > > ARCH_K3, to prevent asking the user about this driver when co= nfiguring a > > > > > > > kernel without Texas Instruments K3 Multicore SoC support. > > > > > > > > > > > > > > Fixes: 4babef0708656c54 ("drm/imagination: Add skeleton Power= VR driver") > > > > > > > Signed-off-by: Geert Uytterhoeven > > > > > > > > > In any case, I agree with you that restricting to only K3 makes= sense. > > > > > > > > > > I am looking forward to adding || SOC_AM33XX || ARCH_RENESAS || .= =2E., > > > > > eventually ;-) > > > > > > > > I disagree. This is to handle a generic IP, just like panfrost, lim= a, or > > > > etnaviv, and we certaintly don't want to maintain the Kconfig list = of > > > > every possible architecture and SoC family it might or might not be > > > > found. > > > > > > While PowerVR is a generic IP, I believe it needs a non-generic > > > firmware, which is currently only available for AM62x SoCs. I just asked, it's not true in most cases. There's some exceptions (GX6250 for example) that could require different firmwares depending on the SoC it's used in, but it's not the case here. > > I'm not sure it's actually true, but let's consider it is. Then what? If > > the firmware isn't there and/or the DT bits too, then nothing will > > happen. We would have wasted a couple of 100kB on a system that is > > taking somewhere in the 100MB-10GB range, and that's pretty much it. >=20 > I am talking about posing the question to the user to enable the driver > or not. Which applies to everyone who configures a kernel. If that user doesn't use a defconfig, doesn't use any variant of *defconfig make target. Plus, the driver still isn't enabled by default. > > If you have we take that patch in though, we have: > > > > - To keep merging patches as firmwares become available. >=20 > You need to keep merging patches to update DT bindings, DTS, > SoC-specific drivers, the DRM driver itself, ... too. The DT binding and DRM driver is already there, the SoC specific drivers are probably already there by the time you reach GPU enablement, and the DT doesn't have to be upstream. > > - If we update linux-firmware only, then the driver is still not > > loading even though it could. > > > > - If we have gotten our firmware through some other mean, then the > > driver is still not loading even though it could. >=20 > You will still need to update parts of the kernel, too. Not really, no. We can use the AM62x as an example. The only thing that was required to enable the driver (excluding the driver itself of course) was a single DT patch, without anything you've mentioned so far. > As long as none of that has happened, asking about the PowerVR driver > on non-AM62x hardware is futile... Maybe. Just like asking whether you want to enable the UMS driver on platforms that don't have a USB controller. Or, closer to us, whether you want to enable AMDGPU on platforms without a PCIe bus. We *never* do that. If only because we can't. We don't have a per-SoC Kconfig option, so even if we were to merge your patch, we would still ask about the PowerVR driver on, let's say, the AM69 that isn't an AM62x and is just as futile according to you. Or for the TDA4VM, or... The other reason is that it's just impossible to maintain. You wouldn't expect everyone, once they got their USB support in, to amend the Kconfig dependencies for every USB driver out there, would you? > > It makes life harder for everyone: maintainers, users, devs, based on > > the state of some external project that might or might not be updated in > > sync. > > > > > Once it becomes truly generic, I'm happy to drop all platform > > > dependencies. Until then, there is no point in asking everyone who > > > configures an arm64 kernel about this driver, unless they also enabled > > > K3 support. > > > > Whether it's truly generic, whatever that means, is irrelevant here. >=20 > It is. >=20 > BTW, playing the devil's advocate: why is there a dependency on ARM64? > PowerVR GPUs are also present on (at least) arm32 and Intel? I would welcome any patch extending that requirement, or droping that requirement. > Oh, dropping that would expose this question to Linus, causing his > wrath to come down on you... ;-) Don't threaten me with a good time. Also, it's already the case for AMDGPU or etnaviv, so I'm not sure what Linus would have to say about it exactly. Maxime --yx7wzbz23427lvci Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZWcXVQAKCRDj7w1vZxhR xe4iAP0S8WUtCdEHdQaJxR3zaKr/rzw0303I3Yl5JmXICbRBewD+N4wMbPUxk5VL ksYWrqfbRmLdl9IYAysuz9gws84lSA0= =avTD -----END PGP SIGNATURE----- --yx7wzbz23427lvci--