Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4537950rdh; Wed, 29 Nov 2023 04:26:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5sfCz4BCtY/WyYzDnDREOfSAZc9Etxguj2NzCxDo7J+HGxDa/8mW/OFjy8mIPpQDAbSGh X-Received: by 2002:a17:902:d2c6:b0:1cf:cf34:d4e0 with SMTP id n6-20020a170902d2c600b001cfcf34d4e0mr11608062plc.23.1701260799389; Wed, 29 Nov 2023 04:26:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701260799; cv=none; d=google.com; s=arc-20160816; b=kaDx2V7fz9Cu48Ay5Dk5PfcoUd7tl1aijBO74Z6jK+YtFins12uyklH/EdnwLwYzQa VAh5OQLTce3M46tlJIrlqFUtrLhVMLfePUDB0KwT3YGyPiPw+ffOLKiOfIpn3/SdTpke GROBozz5JibSnCPoqe2oYgtjkSwQxyoRaZUd+9eNnHc4HUdSQ5i8BDFepYEg04QUo7r6 NRL3t566429ngedbrEdQPYu/MH9yV+SqntuMWzIiHe2QlDhPr86b5rTq5CV67gwENwJw yX1WOOx9TzgrbLxjZn2WvpCkzr4gXcWq/IL8S3O8ZldsWvQrWZYX2PgqbDs5ehVQXds4 XAjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=GyWaNGzC5NoGEAwn75dnT+o9DqTAAHTUr/60MLpgwfo=; fh=2Z9WD+TrJEFqQPBMJAtkIVBfXx4Poi89zF0CRNJZy5o=; b=lbofR2QKRKT14ZQTkULTEPY4eJ8I15ppPTNAToV2XAy7K/sVItDSLKr6jvRw0UsYBJ f1iFsu1UZT+8Qt8tt5TOjVCvifWKhzRn2wGI2kSuA9f4fi4MFe2PedbzMs9QyI5FBlSm 2R6KvclOZxsBjDRqRwyToL1C87lHxY26p0Qp79jjLf5KC6DC2vA0x1skalLXWN4TWDQN JwsBAMSz3+xB8XQzbpduuPKHxX+9rVQVh8ti61sVNUUB5GQwvtmPO7fZ5VMzXbmpmGRG yJDsbLw45j4SHojqTgJAgzBJuGQqeFswkvYU/p65fM4E59Br+b0p5MPQVUCVElZQO9Dd /Qlw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id e7-20020a170902744700b001cfb43d6b36si9691022plt.619.2023.11.29.04.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 04:26:39 -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; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E676C804ADB6; Wed, 29 Nov 2023 04:26:35 -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 S231134AbjK2M0J convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 Nov 2023 07:26:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233662AbjK2M0H (ORCPT ); Wed, 29 Nov 2023 07:26:07 -0500 Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5026F10C0 for ; Wed, 29 Nov 2023 04:26:12 -0800 (PST) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-5cd2f1a198cso64268507b3.0 for ; Wed, 29 Nov 2023 04:26:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701260771; x=1701865571; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BClXgPLgGXGBMnRTdU0GNO6E3UTLxr7wrkB3O5VjiVA=; b=WWeORs1GPIxBnTZj+mZKBmogKmf5XEEM1PNIvg8ZeqN6HArYfcbY/1uiy82asQdxKK W8MXzgqIfQh+RYPth0hLGaxyZi8GYS+5F3TVrKP+LfFkVKAnJv+L/GcgbtZTHvgmaxTN X6ST4T958Gc8zDbc+mdxNbY/03G3b69c946cVRDS9YBY8oZpE+t0vexRulbs+nPIvfO9 +4YpfuQQ+4urxNFIIpEX4frROpzUVdRD1+IeuGs1ggF63zriRWVf53809VcLcYvoGB3w +tqhT8uU/5godmv/T6UX7X3erxJrHz+ieCkZAU4hbHc0GoLELcG62BPNu6qfC7TnSAGC hxdQ== X-Gm-Message-State: AOJu0Yzg8+TGw24dkL5VSx23bW4F45L3NezfpkBseHvFGh/+6RP33pz+ QEdvWx48c7wq8ekccm0PbD3dTBIg8B6CeQ== X-Received: by 2002:a0d:eb01:0:b0:5a7:ba53:6544 with SMTP id u1-20020a0deb01000000b005a7ba536544mr19520507ywe.12.1701260771245; Wed, 29 Nov 2023 04:26:11 -0800 (PST) Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com. [209.85.128.171]) by smtp.gmail.com with ESMTPSA id r191-20020a819ac8000000b005d15d044c44sm1075545ywg.102.2023.11.29.04.26.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Nov 2023 04:26:08 -0800 (PST) Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-5cc3dd21b0cso65906057b3.3 for ; Wed, 29 Nov 2023 04:26:08 -0800 (PST) X-Received: by 2002:a81:b617:0:b0:5ce:ff7e:e743 with SMTP id u23-20020a81b617000000b005ceff7ee743mr15259696ywh.17.1701260767780; Wed, 29 Nov 2023 04:26:07 -0800 (PST) MIME-Version: 1.0 References: <87o7fdbszs.fsf@minerva.mail-host-address-is-not-set> <7hee65pmdl5pajm2kgqld22xfi4iox4s2psswu2mdlfk6u6f7x@w4ecogdx6uj6> In-Reply-To: From: Geert Uytterhoeven Date: Wed, 29 Nov 2023 13:25:55 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/imagination: DRM_POWERVR should depend on ARCH_K3 To: Maxime Ripard 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 04:26:36 -0800 (PST) Hi Maxime, On Wed, Nov 29, 2023 at 12:34 PM Maxime Ripard wrote: > On Wed, Nov 29, 2023 at 12:08:17PM +0100, Geert Uytterhoeven wrote: > > On Wed, Nov 29, 2023 at 11:50 AM Maxime Ripard wrote: > > > On Wed, Nov 29, 2023 at 11:10:51AM +0100, Geert Uytterhoeven wrote: > > > > On Wed, Nov 29, 2023 at 10:23 AM Maxime Ripard wrote: > > > > > On Wed, Nov 29, 2023 at 09:58:12AM +0100, Geert Uytterhoeven wrote: > > > > > > On Wed, Nov 29, 2023 at 9:35 AM Maxime Ripard wrote: > > > > > > > On Tue, Nov 28, 2023 at 08:16:18PM +0100, Geert Uytterhoeven wrote: > > > > > > > > On Tue, Nov 28, 2023 at 8:03 PM Javier Martinez Canillas > > > > > > > > wrote: > > > > > > > > > Geert Uytterhoeven writes: > > > > > > > > > > The Imagination Technologies PowerVR Series 6 GPU is currently only > > > > > > > > > > supported on Texas Instruments K3 AM62x SoCs. Hence add a dependency on > > > > > > > > > > ARCH_K3, to prevent asking the user about this driver when configuring a > > > > > > > > > > kernel without Texas Instruments K3 Multicore SoC support. > > > > > > > > > > > > > > > > > > > > Fixes: 4babef0708656c54 ("drm/imagination: Add skeleton PowerVR 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 || ..., > > > > > > > > eventually ;-) > > > > > > > > > > > > > > I disagree. This is to handle a generic IP, just like panfrost, lima, 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. > > > > OK, please tell me how to use it on e.g. R-Car Gen3. > > I'm not very familiar with the R-Car family of SoCs. > > However, if I'm to trust that page: https://www.renesas.com/us/en/products/automotive-products/automotive-system-chips-socs > > None of them feature the same GPU than the AM62x, so that question is > completely different? According to the documentation I have, they contain PowerVR Series6XT or Series7XE GPUs. DRM_POWERVR claims to support "Imagination Technologies PowerVR (Series 6 or later) or IMG GPU". > > > > > 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. > > > > > > > > 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. > > > > > > > > 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 > > > > The DT binding only lists "ti,am62-gpu" with "img,img-axe" as a fallback. > > Sure. And the driver matches on img,img-axe, so it would probe fine even > with a different first compatible. > > > > are probably already there by the time you reach GPU enablement, and the > > > DT doesn't have to be upstream. > > > > And getting it upstream requires updating the bindings... > > Right. And you still don't have to put it upstream, so the binding isn't > a requirement either. Oh, how we love out-of-tree... > > > > > - 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. > > > > > > > > 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. > > > > Who added: > > > > Documentation/devicetree/bindings/gpu/img,powervr.yaml- - ti,am62-gpu > > Documentation/devicetree/bindings/gpu/img,powervr.yaml: - const: > > img,img-axe # IMG AXE GPU model/revision is fully discoverable > > > > ? > > Which is a formality, part of the upstreaming process, but not required > at all from a technical point of view to make a driver probe. > > > > > 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. > > > > Thanks for not checking ;-) > > > > if USB > > [...] > > source "drivers/usb/storage/Kconfig" > > > > config DRM_AMDGPU > > tristate "AMD GPU" > > depends on DRM && PCI && MMU > > I'm not seeing any platform Kconfig option there. There is no need for platform dependencies here because USB and PCI are better gatekeepers. > Most importantly, you were arguing that the GPU should be enabled only s/enabled/visible/ > on systems where the GPU is in the SoC, with a firmware in > linux-firmware, and the DT bits in. For now, because it is really only supported on AM62x If that claim is false, please tell me on which other platform it works. > And you're now making it equivalent to "the framework handling that > device is compiled in", which I fully agree with: of course a USB device > driver should only be compiled if the USB framework is there. > > But "having the framework compiled" and "a controller is functional on a > platform" is completely different, and you know that very well otherwise > you wouldn't have sent that patch in the first place. DRM is the framework. DRM_POWERVR is a driver for hardware that can only be used (for now) on a very limited platform subset. > > AMDGPU is a PCI device, and can be plugged everywhere you see a PCI > > slot. Etnaviv could indeed use some dependencies... > > It might be plugged in any PCIe slot. It will not work with any PCIe > controller. Why not? > Anyway, there's no point in discussing it further. We're at the point of > sending blank threats so it's not super productive anyway. > > As far as I'm concerned, and if there's no new actual technical > argument, Linus has stated multiple times he does not want to see Kconfig options that do not make sense and/or cannot be sued. Such options are wasting everyone's time. > NAK. Oh well... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds