Message ID | 20240227034539.193573-3-aford173@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-82661-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2474302dyb; Mon, 26 Feb 2024 19:46:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXTS8SPU3cENGASJ6x26VfQdicAWVjjUjaCkFgElT3SLEoLsanZY6gHw6f1sil1g7ilGOC4+aF1xY8pndy2uepTUCzf9Q== X-Google-Smtp-Source: AGHT+IGVPREXY5q6LNhsULMFhHYdk5ejqyM5Wm0FTLDxW7G6w51IyCGd7+eDs0xp+0sJFEAQB2Uf X-Received: by 2002:a17:906:ae93:b0:a43:4876:9842 with SMTP id md19-20020a170906ae9300b00a4348769842mr3152276ejb.47.1709005617121; Mon, 26 Feb 2024 19:46:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709005617; cv=pass; d=google.com; s=arc-20160816; b=Cw/MooE/5xa9tBLLflQnR0e07g/Ha21NzmA+bOBc7uE9Nt8rRyY8AP2zfW+vh8tViw 7hAs7xlqkxIM0U1iFBZLVuvGIlqnbcfpfc7OIRfD5o4qq5EM/LLEtUzyo1efN9ygvfAV 2dmd3k5tC/kc88MBycTRnmXyXimZUr+rKP48SsutUgurnHCN7QZ/Ejykkl3UD5qsMpWt UUJJ4oP0i597f1YvCj8TvvevWdnt9vFLVb6bcpNOtCP0pULS2PDmwDwtIpRBVWWD6j9w yHRG0IFtHDpGPMmKVTQTTKafnHoBPVRXDvCTEDIXGiZ5uQB2uAJnW90JFBif2QA0ZjUk l9dQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=TFyPT0505OQhdGJk2meFYZ2auxbPN2hQffBG52zYkHM=; fh=mqhYLtsOKAPkjK/eLuqW9EELxeEY5XseSouZNxxx48c=; b=VdeBtO61Tclj9AY5sy1Hj4L9G6aV4svVxlpS449n6bNJ8zcKDKFFODMUKNn0z5JZi3 MXUgwbH6FDdALY0kGwUPOe4nSqJHLEeVopBzT9UwP8CAT/GhYXjbITmfY7Z1bB1StQ/0 5WlnZVY/iI5CA1l6o6o1Ixr5vAZthU/TLiod3vI/mIpdNQzuOBOWX2OK3yD+2R7cpMT5 aECrPlAyiapx4uDZ2L+9YDO3RbbJ8vqoUxri0FYyApbs13C/QlGwcyMI7EiMdmOsCXxi ZfBwXBmbupNU4WjdgocpPqtK7eSuDTlWh5syCWGBcKAuabxwU81Qr4qvRz5nThuyRday PI9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=m3qjROJL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-82661-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82661-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id uz27-20020a170907119b00b00a3e6dc386d7si336496ejb.826.2024.02.26.19.46.56 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 19:46:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82661-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=m3qjROJL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-82661-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82661-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 190181F23088 for <ouuuleilei@gmail.com>; Tue, 27 Feb 2024 03:46:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52F733717F; Tue, 27 Feb 2024 03:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m3qjROJL" Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F8B04D11F; Tue, 27 Feb 2024 03:46:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709005562; cv=none; b=L2JX3Ju0pN8k45/yAIj6mXnH60qsa3I5u5p4lHEtpIE+k3OHUej9M50AP/TKX6OorXFqNBx1QSbpUMSu3fnszl15wjPXi81eKSXGYqm34AYo+BBG2zEBiKyXRpqJIQdSIDUryH7v3L5uqp9+m4lTAHbaRQm1CiSvvgjxXm14hog= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709005562; c=relaxed/simple; bh=X5b3IjGl60IeajeIm28amEMfCeRIG7fmScXSfjrAU4o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NdxVhCjVBI+O+7i//MqrhDhrVo1OtK0jRyu+7kbxyFAhG886ogIjQNM9eYzp/BElb1ujx+UP+nHSBbfvHLl8ioaBExZNzJnihs2cRJgp2q3YEz4KcT9Y200hWB3dCJLC+e/faqjM5zkHCckAqRyW2vVZlJvXGdNdmW+mqCsA6r4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=m3qjROJL; arc=none smtp.client-ip=209.85.166.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-il1-f176.google.com with SMTP id e9e14a558f8ab-3657d1d4516so13604835ab.2; Mon, 26 Feb 2024 19:46:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709005560; x=1709610360; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TFyPT0505OQhdGJk2meFYZ2auxbPN2hQffBG52zYkHM=; b=m3qjROJL1UeVnRzCK4GcEBi1aS5HZtoSFxC+RQs4hXGPKz8uZkNBfW0HLno8nHNv+q v8a+oek01gYo2enZpWA9FV0gFymynse/WEabTVupS9tCPx1s5PY3I2o73sUjs3Y96LKW zTOx8/Pidnbr+bhypO8eHDzbxvq8VU3Gdjw2YEv3h2HeFWm1wEEMFVWetXBy50pVMGW9 AlVR7pFmT3TMnjk8S0H7Jr0W2B1mAjzFn+zWu7Q8gwXL1NONVQ//PCRoukRjniHsX597 ANRxmr+Joo9LWBmV1FXO6L5oEfwXAcKVFk1l2bLLRiLu71zTQ3FbVKMndmSUQc4m5hIT kWaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709005560; x=1709610360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TFyPT0505OQhdGJk2meFYZ2auxbPN2hQffBG52zYkHM=; b=vgHYpuck+Mldyld0P3cYGDHCCp9b+nJifkMhhwdGFqVQBP6VNkocacYp0UZesdWsAK 5pcULsb4Afsx2/wu0Z73v/Egd//yZF51cUfZnNqiYYNjIe9sLcnmmlLx/2R/XPE2c+an 5d9YhSNKkigk1JuwGeiZngju+UuU8LSN7KIrnwqDLFYKJFq/5GQImOWolKIgGrd2RdUP YRY5CrGSG94ta5Nt/AIzqrP78yVdYiCtKpIAOWxRCxqMp9ErSjfHTvOP8xjlJTauJotZ RIYYIbC4jrnOcYen49aSv9TQyoLHGmI4y7XqSdUn0qM6DE/X9Vy3TjgmVr40C4nVirnU /New== X-Forwarded-Encrypted: i=1; AJvYcCUPycAypPwjldodCuk70E7wkCXtx3FN7Qv0B6b1jp9vGIT47kiPL2iah1j8aQ3a0U03YTVmHpyIwwxXtjwi7n9C3+HRy+6IMXJhH9zHmm9rVNWIOiQNY6nrYO1cBNZATqc3u0WTDJP+9t6YX5PYoZMos7jbxaItzVsVbI/xHJaMeowy7lsY9q/9Yfin X-Gm-Message-State: AOJu0YxIS+24JA2T0TJREAQoCsGE/sRpVovsDDSy5/9tUmc/iJ6OG9Eb CHNZZRmD4xYDglmYOobSO6Oe42veQHUL2b7iGvlLHXY+6fLsjBO1 X-Received: by 2002:a92:dc86:0:b0:365:13af:84ba with SMTP id c6-20020a92dc86000000b0036513af84bamr9402827iln.5.1709005560378; Mon, 26 Feb 2024 19:46:00 -0800 (PST) Received: from aford-System-Version.lan ([2601:447:d002:5be:1712:c48b:aaa0:cd8b]) by smtp.gmail.com with ESMTPSA id w4-20020a92ad04000000b00362b4d251a5sm1891566ilh.25.2024.02.26.19.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 19:46:00 -0800 (PST) From: Adam Ford <aford173@gmail.com> To: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org Cc: aford@beaconembedded.com, Adam Ford <aford173@gmail.com>, Frank Binns <frank.binns@imgtec.com>, Matt Coster <matt.coster@imgtec.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Geert Uytterhoeven <geert+renesas@glider.be>, Magnus Damm <magnus.damm@gmail.com>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] arm64: dts: renesas: r8a774a1: Enable GPU Date: Mon, 26 Feb 2024 21:45:32 -0600 Message-ID: <20240227034539.193573-3-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240227034539.193573-1-aford173@gmail.com> References: <20240227034539.193573-1-aford173@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792022273595578235 X-GMAIL-MSGID: 1792022273595578235 |
Series |
gpu: powervr-rogue: Add PowerVR support for some Renesas devices
|
|
Commit Message
Adam Ford
Feb. 27, 2024, 3:45 a.m. UTC
The GPU on the RZ/G2M is a Rogue GX6250 which uses firmware
rogue_4.45.2.58_v1.fw available from Imagination.
When enumerated, it appears as:
powervr fd000000.gpu: [drm] loaded firmware powervr/rogue_4.45.2.58_v1.fw
powervr fd000000.gpu: [drm] FW version v1.0 (build 6513336 OS)
Signed-off-by: Adam Ford <aford173@gmail.com>
Comments
On Tue, Feb 27, 2024 at 4:46 AM Adam Ford <aford173@gmail.com> wrote: > The GPU on the RZ/G2M is a Rogue GX6250 which uses firmware > rogue_4.45.2.58_v1.fw available from Imagination. > > When enumerated, it appears as: > powervr fd000000.gpu: [drm] loaded firmware powervr/rogue_4.45.2.58_v1.fw > powervr fd000000.gpu: [drm] FW version v1.0 (build 6513336 OS) > > Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert
Hi Adam, Thanks for these patches! I'll just reply to this one patch, but my comments apply to them all. On 27/02/2024 03:45, Adam Ford wrote: > The GPU on the RZ/G2M is a Rogue GX6250 which uses firmware > rogue_4.45.2.58_v1.fw available from Imagination. > > When enumerated, it appears as: > powervr fd000000.gpu: [drm] loaded firmware powervr/rogue_4.45.2.58_v1.fw > powervr fd000000.gpu: [drm] FW version v1.0 (build 6513336 OS) These messages are printed after verifying the firmware blob’s headers, *before* attempting to upload it to the device. Just because they appear in dmesg does *not* imply the device is functional beyond the handful of register reads in pvr_load_gpu_id(). Since Mesa does not yet have support for this GPU, there’s not a lot that can be done to actually test these bindings. When we added upstream support for the first GPU (the AXE core in TI’s AM62), we opted to wait until userspace was sufficiently progressed to the point it could be used for testing. This thought process still applies when adding new GPUs. Our main concern is that adding bindings for GPUs implies a level of support that cannot be tested. That in turn may make it challenging to justify UAPI changes if/when they’re needed to actually make these GPUs functional. > Signed-off-by: Adam Ford <aford173@gmail.com> > > diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > index a8a44fe5e83b..8923d9624b39 100644 > --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > @@ -2352,6 +2352,16 @@ gic: interrupt-controller@f1010000 { > resets = <&cpg 408>; > }; > > + gpu: gpu@fd000000 { > + compatible = "renesas,r8a774a1-gpu", "img,img-axe"; The GX6250 is *not* an AXE core - it shouldn’t be listed as compatible with one. For prior art, see [1] where we added support for the MT8173 found in Elm Chromebooks R13 (also a Series6XT GPU). > + reg = <0 0xfd000000 0 0x20000>; > + clocks = <&cpg CPG_MOD 112>; > + clock-names = "core"; Series6XT cores have three clocks (see [1] again). I don’t have a Renesas TRM to hand – do you know if their docs go into detail on the GPU integration? > + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; > + power-domains = <&sysc R8A774A1_PD_3DG_B>; > + resets = <&cpg 112>; > + }; > + > pciec0: pcie@fe000000 { > compatible = "renesas,pcie-r8a774a1", > "renesas,pcie-rcar-gen3"; As you probably expect by this point, I have to nack this series for now. I appreciate your effort here and I’ll be happy to help you land these once Mesa gains some form of usable support to allow testing. Cheers, Matt [1]: https://gitlab.freedesktop.org/imagination/linux/-/blob/b3506b8bc45ed6d4005eb32a994df0e33d6613f1/arch/arm64/boot/dts/mediatek/mt8173.dtsi#L993-1006
Hi Matt, On Tue, Feb 27, 2024 at 10:31 AM Matt Coster <Matt.Coster@imgtec.com> wrote: > > Hi Adam, > > Thanks for these patches! I'll just reply to this one patch, but my > comments apply to them all. > > On 27/02/2024 03:45, Adam Ford wrote: > > The GPU on the RZ/G2M is a Rogue GX6250 which uses firmware > > rogue_4.45.2.58_v1.fw available from Imagination. > > > > When enumerated, it appears as: > > powervr fd000000.gpu: [drm] loaded firmware powervr/rogue_4.45.2.58_v1.fw > > powervr fd000000.gpu: [drm] FW version v1.0 (build 6513336 OS) > > These messages are printed after verifying the firmware blob’s headers, > *before* attempting to upload it to the device. Just because they appear > in dmesg does *not* imply the device is functional beyond the handful of > register reads in pvr_load_gpu_id(). > > Since Mesa does not yet have support for this GPU, there’s not a lot > that can be done to actually test these bindings. OK. > When we added upstream support for the first GPU (the AXE core in TI’s > AM62), we opted to wait until userspace was sufficiently progressed to > the point it could be used for testing. This thought process still > applies when adding new GPUs. > > Our main concern is that adding bindings for GPUs implies a level of > support that cannot be tested. That in turn may make it challenging to > justify UAPI changes if/when they’re needed to actually make these GPUs > functional. I guess that applies to "[PATCH 00/11] Device tree support for Imagination Series5 GPU", too, which has been in linux-next for about a month? https://lore.kernel.org/all/20240109171950.31010-1-afd@ti.com/ > > Signed-off-by: Adam Ford <aford173@gmail.com> > > > > diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > index a8a44fe5e83b..8923d9624b39 100644 > > --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > @@ -2352,6 +2352,16 @@ gic: interrupt-controller@f1010000 { > > resets = <&cpg 408>; > > }; > > > > + gpu: gpu@fd000000 { > > + compatible = "renesas,r8a774a1-gpu", "img,img-axe"; > > The GX6250 is *not* an AXE core - it shouldn’t be listed as compatible > with one. For prior art, see [1] where we added support for the MT8173 > found in Elm Chromebooks R13 (also a Series6XT GPU). IC. And the bindings in [2]. > > > + reg = <0 0xfd000000 0 0x20000>; > > + clocks = <&cpg CPG_MOD 112>; > > + clock-names = "core"; > > Series6XT cores have three clocks (see [1] again). I don’t have a > Renesas TRM to hand – do you know if their docs go into detail on the > GPU integration? Not really. The diagram in the Hardware User's Manual just shows the following clock inputs: - Clock (ZGϕ) from CPG, - Clock (S3D1ϕ) from CPG, - MSTP (ST112) from CPG. ZG is the main (programmable) 3DGE clock, running at up to 600 MHz. S3D1 is the fixed 266 MHz AXI bus clock. MSTP112 is the gateable module clock (part of the SYSC/CPG clock domain), and its parent is ZG. According to the sources: - "core" is the primary clock used by the entire GPU core, so we use MSTP112 for that. - "sys" is the optional system bus clock, so that could be S3D1, - "mem" is the optional memory clock, no idea what that would map to. But IMHO the two optional clocks do not matter at all (the driver doesn't care about their rates, and just enables them together with the core clock), and S3D1 is always-on, so I'd just limit clocks to a single item. Just wondering: is the availability of 1 clock specific to AXE, or to the AXE integration on AM62x? > + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; > + power-domains = <&sysc R8A774A1_PD_3DG_B>; > + resets = <&cpg 112>; > + }; > [1]: https://gitlab.freedesktop.org/imagination/linux/-/blob/b3506b8bc45ed6d4005eb32a994df0e33d6613f1/arch/arm64/boot/dts/mediatek/mt8173.dtsi#L993-1006 [2] https://gitlab.freedesktop.org/imagination/linux/-/blob/b3506b8bc45ed6d4005eb32a994df0e33d6613f1/Documentation/devicetree/bindings/gpu/img,powervryaml Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68korg 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
On Tue, Feb 27, 2024 at 3:31 AM Matt Coster <Matt.Coster@imgtec.com> wrote: > > Hi Adam, > > Thanks for these patches! I'll just reply to this one patch, but my > comments apply to them all. > > On 27/02/2024 03:45, Adam Ford wrote: > > The GPU on the RZ/G2M is a Rogue GX6250 which uses firmware > > rogue_4.45.2.58_v1.fw available from Imagination. > > > > When enumerated, it appears as: > > powervr fd000000.gpu: [drm] loaded firmware powervr/rogue_4.45.2.58_v1.fw > > powervr fd000000.gpu: [drm] FW version v1.0 (build 6513336 OS) > > These messages are printed after verifying the firmware blob’s headers, > *before* attempting to upload it to the device. Just because they appear > in dmesg does *not* imply the device is functional beyond the handful of > register reads in pvr_load_gpu_id(). > > Since Mesa does not yet have support for this GPU, there’s not a lot > that can be done to actually test these bindings. > > When we added upstream support for the first GPU (the AXE core in TI’s > AM62), we opted to wait until userspace was sufficiently progressed to > the point it could be used for testing. This thought process still > applies when adding new GPUs. > > Our main concern is that adding bindings for GPUs implies a level of > support that cannot be tested. That in turn may make it challenging to > justify UAPI changes if/when they’re needed to actually make these GPUs > functional. I wrongly assumed that when the firmware was ready, there was some preliminary functionality, but it sounds like we need to work for Series6XT support to be added to the driver. I only used the AXE compatible since it appeared to the be the only one and the existing binding document stated "model/revision is fully discoverable" which I interpreted to mean that the AXE compatible was sufficient. > > > Signed-off-by: Adam Ford <aford173@gmail.com> > > > > diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > index a8a44fe5e83b..8923d9624b39 100644 > > --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > @@ -2352,6 +2352,16 @@ gic: interrupt-controller@f1010000 { > > resets = <&cpg 408>; > > }; > > > > + gpu: gpu@fd000000 { > > + compatible = "renesas,r8a774a1-gpu", "img,img-axe"; > > The GX6250 is *not* an AXE core - it shouldn’t be listed as compatible > with one. For prior art, see [1] where we added support for the MT8173 > found in Elm Chromebooks R13 (also a Series6XT GPU). > > > + reg = <0 0xfd000000 0 0x20000>; > > + clocks = <&cpg CPG_MOD 112>; > > + clock-names = "core"; > > Series6XT cores have three clocks (see [1] again). I don’t have a > Renesas TRM to hand – do you know if their docs go into detail on the > GPU integration? > > > + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; > > + power-domains = <&sysc R8A774A1_PD_3DG_B>; > > + resets = <&cpg 112>; > > + }; > > + > > pciec0: pcie@fe000000 { > > compatible = "renesas,pcie-r8a774a1", > > "renesas,pcie-rcar-gen3"; > > As you probably expect by this point, I have to nack this series for > now. I appreciate your effort here and I’ll be happy to help you land I get that. I wasn't sure if I should have even pushed this, but I wanted to get a little traction, because I know there are people like myself who want to use the 3D in the Renesas boards, but don't want to use the closed-source blobs tied to EULA and NDA documents. > these once Mesa gains some form of usable support to allow testing. Is there a way for your group to add me to the CC list when future updates are submitted? I'd like to follow this and resubmit when it's ready. > > Cheers, > Matt > > [1]: https://gitlab.freedesktop.org/imagination/linux/-/blob/b3506b8bc45ed6d4005eb32a994df0e33d6613f1/arch/arm64/boot/dts/mediatek/mt8173.dtsi#L993-1006
On Tue, Feb 27, 2024 at 5:04 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > Hi Matt, > > On Tue, Feb 27, 2024 at 10:31 AM Matt Coster <Matt.Coster@imgtec.com> wrote: > > > > Hi Adam, > > > > Thanks for these patches! I'll just reply to this one patch, but my > > comments apply to them all. > > > > On 27/02/2024 03:45, Adam Ford wrote: > > > The GPU on the RZ/G2M is a Rogue GX6250 which uses firmware > > > rogue_4.45.2.58_v1.fw available from Imagination. > > > > > > When enumerated, it appears as: > > > powervr fd000000.gpu: [drm] loaded firmware powervr/rogue_4.45.2.58_v1.fw > > > powervr fd000000.gpu: [drm] FW version v1.0 (build 6513336 OS) > > > > These messages are printed after verifying the firmware blob’s headers, > > *before* attempting to upload it to the device. Just because they appear > > in dmesg does *not* imply the device is functional beyond the handful of > > register reads in pvr_load_gpu_id(). > > > > Since Mesa does not yet have support for this GPU, there’s not a lot > > that can be done to actually test these bindings. > > OK. > > > When we added upstream support for the first GPU (the AXE core in TI’s > > AM62), we opted to wait until userspace was sufficiently progressed to > > the point it could be used for testing. This thought process still > > applies when adding new GPUs. > > > > Our main concern is that adding bindings for GPUs implies a level of > > support that cannot be tested. That in turn may make it challenging to > > justify UAPI changes if/when they’re needed to actually make these GPUs > > functional. > > I guess that applies to "[PATCH 00/11] Device tree support for > Imagination Series5 GPU", too, which has been in linux-next for about > a month? > https://lore.kernel.org/all/20240109171950.31010-1-afd@ti.com/ > > > > Signed-off-by: Adam Ford <aford173@gmail.com> > > > > > > diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > > index a8a44fe5e83b..8923d9624b39 100644 > > > --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > > +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > > @@ -2352,6 +2352,16 @@ gic: interrupt-controller@f1010000 { > > > resets = <&cpg 408>; > > > }; > > > > > > + gpu: gpu@fd000000 { > > > + compatible = "renesas,r8a774a1-gpu", "img,img-axe"; > > > > The GX6250 is *not* an AXE core - it shouldn’t be listed as compatible > > with one. For prior art, see [1] where we added support for the MT8173 > > found in Elm Chromebooks R13 (also a Series6XT GPU). > > IC. And the bindings in [2]. > > > > > > + reg = <0 0xfd000000 0 0x20000>; > > > + clocks = <&cpg CPG_MOD 112>; > > > + clock-names = "core"; > > > > Series6XT cores have three clocks (see [1] again). I don’t have a > > Renesas TRM to hand – do you know if their docs go into detail on the > > GPU integration? > > Not really. The diagram in the Hardware User's Manual just shows the > following clock inputs: > - Clock (ZGϕ) from CPG, > - Clock (S3D1ϕ) from CPG, > - MSTP (ST112) from CPG. > > ZG is the main (programmable) 3DGE clock, running at up to 600 MHz. > S3D1 is the fixed 266 MHz AXI bus clock. > MSTP112 is the gateable module clock (part of the SYSC/CPG clock > domain), and its parent is ZG. > > According to the sources: > - "core" is the primary clock used by the entire GPU core, so we use > MSTP112 for that. > - "sys" is the optional system bus clock, so that could be S3D1, > - "mem" is the optional memory clock, no idea what that would map to. > > But IMHO the two optional clocks do not matter at all (the driver > doesn't care about their rates, and just enables them together with > the core clock), and S3D1 is always-on, so I'd just limit clocks to > a single item. Matt, When the time is right, and the driver is ready for Series 6XT-based systems, would Geert's rationale for supporting one clock be acceptable if I added his clock description to the commit message? > > Just wondering: is the availability of 1 clock specific to AXE, or to > the AXE integration on AM62x? > > > + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; > > + power-domains = <&sysc R8A774A1_PD_3DG_B>; > > + resets = <&cpg 112>; > > + }; > > > [1]: https://gitlab.freedesktop.org/imagination/linux/-/blob/b3506b8bc45ed6d4005eb32a994df0e33d6613f1/arch/arm64/boot/dts/mediatek/mt8173.dtsi#L993-1006 > > [2] https://gitlab.freedesktop.org/imagination/linux/-/blob/b3506b8bc45ed6d4005eb32a994df0e33d6613f1/Documentation/devicetree/bindings/gpu/img,powervr.yaml > > > 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
diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi index a8a44fe5e83b..8923d9624b39 100644 --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi @@ -2352,6 +2352,16 @@ gic: interrupt-controller@f1010000 { resets = <&cpg 408>; }; + gpu: gpu@fd000000 { + compatible = "renesas,r8a774a1-gpu", "img,img-axe"; + reg = <0 0xfd000000 0 0x20000>; + clocks = <&cpg CPG_MOD 112>; + clock-names = "core"; + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&sysc R8A774A1_PD_3DG_B>; + resets = <&cpg 112>; + }; + pciec0: pcie@fe000000 { compatible = "renesas,pcie-r8a774a1", "renesas,pcie-rcar-gen3";