Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1864681rbb; Tue, 27 Feb 2024 03:55:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV8WtcBP3JWqplQQrJTdZ9fLOX/tQehE+RXJwQiG4HrTraAlKHvFrfVFCJWwZVYleAcboFz7Gs3szcB7OdqCqRU66txN84jPKrjHCEHXQ== X-Google-Smtp-Source: AGHT+IH57JhBgm93y3rioPKuLTnuDyXZZquh8DvdmK6e7pz92yS+dRHQiHAnYV09oo764Bs7+Rfw X-Received: by 2002:a17:906:22c6:b0:a3e:59e5:a38f with SMTP id q6-20020a17090622c600b00a3e59e5a38fmr5919961eja.11.1709034913611; Tue, 27 Feb 2024 03:55:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709034913; cv=pass; d=google.com; s=arc-20160816; b=yhxqAMBq36cEj2YQEw+AixFfoDN0hqFMwNLIYPot1kT9RTs7VU8QMqm1r9zArCOu/M KsxTszX5ReAZf59JjOo3TFkbRtEL6ZpL2aI2zYNJYmU37W9EpRVOME5s+mnE+mXCg74A 9lJzL6cIyhmAJEsoCVzJG3X2zatzTqDwlUWScQMz0/9TjeZpUs3eNChv4w2ikUUrcx4K f2iQJ6IHmC8tvPFWytNH++a1B9QFa7yvwqTVGX/IKIglnrAieG8ngTBPZnNt5xxrx0sm Jfhz1+OKK/yaU4tSwwFqnVK6rHj83QQE82VKmimYT7KTyxhgJK2xSZbaH7YmDctSQzHX ez2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=m4ZJKN0Q446qEQVH8mpv7kUe4f1OhDtxTG8dtoHu+5I=; fh=GLUVYlirGAocByfhWUJwfa298/rZCSI485edyESTF+E=; b=dh5uX9uEoyRZy5KTYpzU+njAZA0T9M2zeLQPP8NHhgXY+BzeH2hBMYR3rcJGVgQ12Q sWCAyGq1MDz1Q2ZxNmNRdxi7//dPxOcAowiIAz5FtPUixtoqiDwhDCKlbZwdzH4MLUuU d5uDMDqJdhtgg8GIWte7IsOqfjMyM9u0HRNXkzgjjnulVMaYfwjo8KQyADgQn2X7yMF9 5R4N1nuCUlKVLReL18sfIpcnNiw2TEfMpcE7K7kl50Hc8PSOIeK8ksiCPQMYsmCFIkN1 VoYt+MwU731Kbvb8uxzsAedEh1itqaUdze+gpgfJHwKEl5HQhaPXHXTv7CNgHQRSuS6I wTuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WQySPxZh; 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-83149-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83149-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qb32-20020a1709077ea000b00a3e5616271bsi718417ejc.8.2024.02.27.03.55.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 03:55:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83149-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WQySPxZh; 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-83149-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83149-linux.lists.archive=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 391CB1F29B19 for ; Tue, 27 Feb 2024 11:55:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FBFF13A261; Tue, 27 Feb 2024 11:55:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WQySPxZh" Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (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 B404E1386C8; Tue, 27 Feb 2024 11:55:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709034903; cv=none; b=DTZBzmfpcmIgVk4l6t4ThOXoHtg8IbBwoo2/HaUm6UixCi3lvOVQRKnoF2Wwln8cvBg+IgV/6BAJVXGYRiFgSS6Ig9wHG6gJJ+nvTrtnjoQ5ZH7jTmUJ+5+Ajdb0kf7wEWkKIJie4YKl8Yyl+LzSeAtUSQpSEJh0ZkCLcfXLEzA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709034903; c=relaxed/simple; bh=FUyhKiJCVkumDr18k9AE+n3vk0YM19EfHCPUG652SPY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=bOpPVhhdYjiNxYfqIcKeHa4ZzGVwl7B3aSLZ73D/S/Isgl63QRCWEBMtHqCKFnDfFlg8PLYS83TRlLKVt/p+tHV0FjMbeo6HMCpYL/aB+jfz7t+Scblzlmnt7WyV6StRBa5ky0FcoSjLHi3cT1H81/RRtZABWbiC0fFKnbsC4jE= 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=WQySPxZh; arc=none smtp.client-ip=209.85.216.44 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-pj1-f44.google.com with SMTP id 98e67ed59e1d1-29ad73b4686so1069958a91.0; Tue, 27 Feb 2024 03:55:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709034901; x=1709639701; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=m4ZJKN0Q446qEQVH8mpv7kUe4f1OhDtxTG8dtoHu+5I=; b=WQySPxZhL3KuqMW3scxSr6Gzp0rMIKyAJDy1erDequ4Nv5rKpi1/XlpZQd9IlWYFcl S8hVlaJQTLdNfsp81/zIW0GB1z2joXVZYvI+hY1WdBlCd2qv1mNyrMEK3uqYkNoa1yZ0 DpJJx/Jz4OYDmTR7B9PyL5NXdxPTz7jwDVZTqOZ3P/ClCEzxBCBwDIVppZq82DO8GeiP 2juESsI8Q96uHCCf8t8ykC/oEJ+IoxujVyr1arfn+4eByFstAfAR5RwASabE8S6V/Vya n+EToYICaJR3EJl3hF9b3P2RFlimijS/0u7nQtkU4H/LlcMOJPa2AhIN7EIfSuAyPSbf ysog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709034901; x=1709639701; 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=m4ZJKN0Q446qEQVH8mpv7kUe4f1OhDtxTG8dtoHu+5I=; b=MZJ3rw2E6ayvDm62lsiE7avE8PiQRkFAnQtSADXm2gWy9PRCfhBkxlDyiIM85LNwiH BvFSRmN/PFYnWJqHTXyCmDQwb8Pjo14rBxwc7myEtq/77aZvdOz23aWN0sXdiV3u8hyh pi36HIQ3AYqh8cb1spc0OA5vteIEFDFTpTd5pHrtAct9/Mj3/if5xGOn6BAxR249fSW2 y0L/FchR1qvWk2kW8iyTLMHnrWQZYN8PDThI4nITWWX2tidZXzJGB7mJ3POWjJO02fcy Fa8djDQDNC5LMrsUnyCO8LDp2fgIblnNOz4gBv4cI1rbYkNpVVouGJ6agGMYPlrNHiAy FaPQ== X-Forwarded-Encrypted: i=1; AJvYcCVCC1YiNCc7RbjdvBADdnujGFlXXFhhT1MKdFl8gH0OpZVe3aqM9+59Le8ycqfpMvi8Cf6E8nwXSw8zZYkzbnYSJrC9TrPLsfgK4CZXtmu68RN9uoqpQ4tFCWSJh5+GUNijnmXl/hsHT9ZqtnJ4CnCXWiviplchMhWVyp4JxRdXq829m5Tj67kEMojg X-Gm-Message-State: AOJu0YxmgmlvHLonUnSzEc6R+pBj3CCteH/igBIKgkgkkzj18G+ixI5w O/ZZxm1ST49va0C4seF0SOgrSwoGNSdAdYm0GHJemAVElmyepOGrXFcMF+kkTcLPC0hszdBWXal pmjkfvq0UmTWy8TfCF1N2oB/fk3g= X-Received: by 2002:a17:90a:5d0d:b0:299:9d8:d7c9 with SMTP id s13-20020a17090a5d0d00b0029909d8d7c9mr7489843pji.18.1709034900760; Tue, 27 Feb 2024 03:55:00 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240227034539.193573-1-aford173@gmail.com> <20240227034539.193573-3-aford173@gmail.com> <39aead3b-b809-4c9c-8a5d-c0be2b36ea47@imgtec.com> In-Reply-To: From: Adam Ford Date: Tue, 27 Feb 2024 05:54:49 -0600 Message-ID: Subject: Re: [PATCH 2/6] arm64: dts: renesas: r8a774a1: Enable GPU To: Geert Uytterhoeven Cc: Matt Coster , "dri-devel@lists.freedesktop.org" , "linux-renesas-soc@vger.kernel.org" , Adam Ford , Frank Binns , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 27, 2024 at 5:04=E2=80=AFAM Geert Uytterhoeven wrote: > > Hi Matt, > > On Tue, Feb 27, 2024 at 10:31=E2=80=AFAM Matt Coster 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=E2=80=99s = headers, > > *before* attempting to upload it to the device. Just because they appea= r > > in dmesg does *not* imply the device is functional beyond the handful o= f > > register reads in pvr_load_gpu_id(). > > > > Since Mesa does not yet have support for this GPU, there=E2=80=99s 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=E2= =80=99s > > 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=E2=80=99re needed to actually make th= ese 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 > > > > > > diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/b= oot/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 =3D <&cpg 408>; > > > }; > > > > > > + gpu: gpu@fd000000 { > > > + compatible =3D "renesas,r8a774a1-gpu", "img,img= -axe"; > > > > The GX6250 is *not* an AXE core - it shouldn=E2=80=99t be listed as com= patible > > 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 =3D <0 0xfd000000 0 0x20000>; > > > + clocks =3D <&cpg CPG_MOD 112>; > > > + clock-names =3D "core"; > > > > Series6XT cores have three clocks (see [1] again). I don=E2=80=99t have= a > > Renesas TRM to hand =E2=80=93 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=CF=95) from CPG, > - Clock (S3D1=CF=95) 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 =3D ; > > + power-domains =3D <&sysc R8A774A1_PD_3DG_B>; > > + resets =3D <&cpg 112>; > > + }; > > > [1]: https://gitlab.freedesktop.org/imagination/linux/-/blob/b3506b8bc4= 5ed6d4005eb32a994df0e33d6613f1/arch/arm64/boot/dts/mediatek/mt8173.dtsi#L99= 3-1006 > > [2] https://gitlab.freedesktop.org/imagination/linux/-/blob/b3506b8bc45ed= 6d4005eb32a994df0e33d6613f1/Documentation/devicetree/bindings/gpu/img,power= vr.yaml > > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m6= 8k.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