Message ID | 20250227170012.124768-9-marex@denx.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | arm64: dts: imx95: Add support for Mali G310 GPU | expand |
On Thu, Feb 27, 2025 at 05:58:08PM +0100, Marek Vasut wrote: > The instance of the GPU populated in Freescale i.MX95 is the > Mali G310, add support for this variant. > > Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Frank Li <Frank.Li@nxp.com> > --- > Cc: Boris Brezillon <boris.brezillon@collabora.com> > Cc: Conor Dooley <conor+dt@kernel.org> > Cc: David Airlie <airlied@gmail.com> > Cc: Fabio Estevam <festevam@gmail.com> > Cc: Krzysztof Kozlowski <krzk+dt@kernel.org> > Cc: Liviu Dudau <liviu.dudau@arm.com> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > Cc: Maxime Ripard <mripard@kernel.org> > Cc: Pengutronix Kernel Team <kernel@pengutronix.de> > Cc: Philipp Zabel <p.zabel@pengutronix.de> > Cc: Rob Herring <robh@kernel.org> > Cc: Sascha Hauer <s.hauer@pengutronix.de> > Cc: Sebastian Reichel <sre@kernel.org> > Cc: Shawn Guo <shawnguo@kernel.org> > Cc: Simona Vetter <simona@ffwll.ch> > Cc: Steven Price <steven.price@arm.com> > Cc: Thomas Zimmermann <tzimmermann@suse.de> > Cc: devicetree@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Cc: imx@lists.linux.dev > Cc: linux-arm-kernel@lists.infradead.org > --- > drivers/gpu/drm/panthor/panthor_drv.c | 1 + > drivers/gpu/drm/panthor/panthor_gpu.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c > index 06fe46e320738..2504a456d45c4 100644 > --- a/drivers/gpu/drm/panthor/panthor_drv.c > +++ b/drivers/gpu/drm/panthor/panthor_drv.c > @@ -1591,6 +1591,7 @@ static struct attribute *panthor_attrs[] = { > ATTRIBUTE_GROUPS(panthor); > > static const struct of_device_id dt_match[] = { > + { .compatible = "fsl,imx95-mali" }, /* G310 */ > { .compatible = "rockchip,rk3588-mali" }, > { .compatible = "arm,mali-valhall-csf" }, > {} > diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c > index 0f07ef7d9aea7..2371ab8e50627 100644 > --- a/drivers/gpu/drm/panthor/panthor_gpu.c > +++ b/drivers/gpu/drm/panthor/panthor_gpu.c > @@ -67,6 +67,7 @@ struct panthor_model { > } > > static const struct panthor_model gpu_models[] = { > + GPU_MODEL(g310, 0, 0), /* NXP i.MX95 */ > GPU_MODEL(g610, 10, 7), > {}, > }; > -- > 2.47.2 >
Hi Marek, On 25-02-27, Marek Vasut wrote: > The instance of the GPU populated in Freescale i.MX95 is the > Mali G310, add support for this variant. > > Signed-off-by: Marek Vasut <marex@denx.de> > --- > Cc: Boris Brezillon <boris.brezillon@collabora.com> > Cc: Conor Dooley <conor+dt@kernel.org> > Cc: David Airlie <airlied@gmail.com> > Cc: Fabio Estevam <festevam@gmail.com> > Cc: Krzysztof Kozlowski <krzk+dt@kernel.org> > Cc: Liviu Dudau <liviu.dudau@arm.com> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > Cc: Maxime Ripard <mripard@kernel.org> > Cc: Pengutronix Kernel Team <kernel@pengutronix.de> > Cc: Philipp Zabel <p.zabel@pengutronix.de> > Cc: Rob Herring <robh@kernel.org> > Cc: Sascha Hauer <s.hauer@pengutronix.de> > Cc: Sebastian Reichel <sre@kernel.org> > Cc: Shawn Guo <shawnguo@kernel.org> > Cc: Simona Vetter <simona@ffwll.ch> > Cc: Steven Price <steven.price@arm.com> > Cc: Thomas Zimmermann <tzimmermann@suse.de> > Cc: devicetree@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Cc: imx@lists.linux.dev > Cc: linux-arm-kernel@lists.infradead.org > --- > drivers/gpu/drm/panthor/panthor_drv.c | 1 + > drivers/gpu/drm/panthor/panthor_gpu.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c > index 06fe46e320738..2504a456d45c4 100644 > --- a/drivers/gpu/drm/panthor/panthor_drv.c > +++ b/drivers/gpu/drm/panthor/panthor_drv.c > @@ -1591,6 +1591,7 @@ static struct attribute *panthor_attrs[] = { > ATTRIBUTE_GROUPS(panthor); > > static const struct of_device_id dt_match[] = { > + { .compatible = "fsl,imx95-mali" }, /* G310 */ ^ nxp? Can we switch to nxp instead? Regards, Marco > { .compatible = "rockchip,rk3588-mali" }, > { .compatible = "arm,mali-valhall-csf" }, > {} > diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c > index 0f07ef7d9aea7..2371ab8e50627 100644 > --- a/drivers/gpu/drm/panthor/panthor_gpu.c > +++ b/drivers/gpu/drm/panthor/panthor_gpu.c > @@ -67,6 +67,7 @@ struct panthor_model { > } > > static const struct panthor_model gpu_models[] = { > + GPU_MODEL(g310, 0, 0), /* NXP i.MX95 */ > GPU_MODEL(g610, 10, 7), > {}, > }; > -- > 2.47.2 > > >
On 2/27/25 9:17 PM, Marco Felsch wrote: [...] >> diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c >> index 06fe46e320738..2504a456d45c4 100644 >> --- a/drivers/gpu/drm/panthor/panthor_drv.c >> +++ b/drivers/gpu/drm/panthor/panthor_drv.c >> @@ -1591,6 +1591,7 @@ static struct attribute *panthor_attrs[] = { >> ATTRIBUTE_GROUPS(panthor); >> >> static const struct of_device_id dt_match[] = { >> + { .compatible = "fsl,imx95-mali" }, /* G310 */ > ^ > nxp? > > Can we switch to nxp instead? We can ... is that the current recommendation ? Why not stick with fsl , is that deprecated now ?
Hi Marek, Am Donnerstag, 27. Februar 2025, 17:58:08 CET schrieb Marek Vasut: > The instance of the GPU populated in Freescale i.MX95 is the > Mali G310, add support for this variant. > > Signed-off-by: Marek Vasut <marex@denx.de> > --- > Cc: Boris Brezillon <boris.brezillon@collabora.com> > Cc: Conor Dooley <conor+dt@kernel.org> > Cc: David Airlie <airlied@gmail.com> > Cc: Fabio Estevam <festevam@gmail.com> > Cc: Krzysztof Kozlowski <krzk+dt@kernel.org> > Cc: Liviu Dudau <liviu.dudau@arm.com> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > Cc: Maxime Ripard <mripard@kernel.org> > Cc: Pengutronix Kernel Team <kernel@pengutronix.de> > Cc: Philipp Zabel <p.zabel@pengutronix.de> > Cc: Rob Herring <robh@kernel.org> > Cc: Sascha Hauer <s.hauer@pengutronix.de> > Cc: Sebastian Reichel <sre@kernel.org> > Cc: Shawn Guo <shawnguo@kernel.org> > Cc: Simona Vetter <simona@ffwll.ch> > Cc: Steven Price <steven.price@arm.com> > Cc: Thomas Zimmermann <tzimmermann@suse.de> > Cc: devicetree@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Cc: imx@lists.linux.dev > Cc: linux-arm-kernel@lists.infradead.org > --- > drivers/gpu/drm/panthor/panthor_drv.c | 1 + > drivers/gpu/drm/panthor/panthor_gpu.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c > index 06fe46e320738..2504a456d45c4 100644 > --- a/drivers/gpu/drm/panthor/panthor_drv.c > +++ b/drivers/gpu/drm/panthor/panthor_drv.c > @@ -1591,6 +1591,7 @@ static struct attribute *panthor_attrs[] = { > ATTRIBUTE_GROUPS(panthor); > > static const struct of_device_id dt_match[] = { > + { .compatible = "fsl,imx95-mali" }, /* G310 */ > { .compatible = "rockchip,rk3588-mali" }, > { .compatible = "arm,mali-valhall-csf" }, > {} > diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c > index 0f07ef7d9aea7..2371ab8e50627 100644 > --- a/drivers/gpu/drm/panthor/panthor_gpu.c > +++ b/drivers/gpu/drm/panthor/panthor_gpu.c > @@ -67,6 +67,7 @@ struct panthor_model { > } > > static const struct panthor_model gpu_models[] = { > + GPU_MODEL(g310, 0, 0), /* NXP i.MX95 */ Are you sure about 0, 0? With this I get > [drm] mali-unknown id 0xac74 major 0x0 minor 0x0 status 0x1 Using GPU_MODEL(g310, 10, 4) I get: > [drm] mali-g310 id 0xac74 major 0x0 minor 0x0 status 0x1 Note the output is GPU_VER_MAJOR() but this table is for GPU_ARCH_MAJOR() (and the corresponding minor). Best regards, Alexander > GPU_MODEL(g610, 10, 7), > {}, > }; >
On 25-02-27, Marek Vasut wrote: > On 2/27/25 9:17 PM, Marco Felsch wrote: > > [...] > > > > diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c > > > index 06fe46e320738..2504a456d45c4 100644 > > > --- a/drivers/gpu/drm/panthor/panthor_drv.c > > > +++ b/drivers/gpu/drm/panthor/panthor_drv.c > > > @@ -1591,6 +1591,7 @@ static struct attribute *panthor_attrs[] = { > > > ATTRIBUTE_GROUPS(panthor); > > > static const struct of_device_id dt_match[] = { > > > + { .compatible = "fsl,imx95-mali" }, /* G310 */ > > ^ > > nxp? > > > > Can we switch to nxp instead? > We can ... is that the current recommendation ? > > Why not stick with fsl , is that deprecated now ? Nope I don't think so but I do see patches adding 'nxp' as vendor (mostly external chips) and some with 'fsl' (mostly soc internal ip cores). My hope was that at some point we could switch to 'nxp' only and make use of this vendor-prefix. Of course NXP should start with that switch but this seems not to happen :/ It's more a nit but maybe this triggers NXP to make use of the 'nxp' vendor-prefix as well once they upstream a new base dtsi. Regards, Marco
Hi Marek and Alexander, On 28/02/2025 10:21, Alexander Stein wrote: > Hi Marek, > > Am Donnerstag, 27. Februar 2025, 17:58:08 CET schrieb Marek Vasut: >> The instance of the GPU populated in Freescale i.MX95 is the >> Mali G310, add support for this variant. >> >> Signed-off-by: Marek Vasut <marex@denx.de> >> --- >> Cc: Boris Brezillon <boris.brezillon@collabora.com> >> Cc: Conor Dooley <conor+dt@kernel.org> >> Cc: David Airlie <airlied@gmail.com> >> Cc: Fabio Estevam <festevam@gmail.com> >> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org> >> Cc: Liviu Dudau <liviu.dudau@arm.com> >> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> >> Cc: Maxime Ripard <mripard@kernel.org> >> Cc: Pengutronix Kernel Team <kernel@pengutronix.de> >> Cc: Philipp Zabel <p.zabel@pengutronix.de> >> Cc: Rob Herring <robh@kernel.org> >> Cc: Sascha Hauer <s.hauer@pengutronix.de> >> Cc: Sebastian Reichel <sre@kernel.org> >> Cc: Shawn Guo <shawnguo@kernel.org> >> Cc: Simona Vetter <simona@ffwll.ch> >> Cc: Steven Price <steven.price@arm.com> >> Cc: Thomas Zimmermann <tzimmermann@suse.de> >> Cc: devicetree@vger.kernel.org >> Cc: dri-devel@lists.freedesktop.org >> Cc: imx@lists.linux.dev >> Cc: linux-arm-kernel@lists.infradead.org >> --- >> drivers/gpu/drm/panthor/panthor_drv.c | 1 + >> drivers/gpu/drm/panthor/panthor_gpu.c | 1 + >> 2 files changed, 2 insertions(+) >> >> diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c >> index 06fe46e320738..2504a456d45c4 100644 >> --- a/drivers/gpu/drm/panthor/panthor_drv.c >> +++ b/drivers/gpu/drm/panthor/panthor_drv.c >> @@ -1591,6 +1591,7 @@ static struct attribute *panthor_attrs[] = { >> ATTRIBUTE_GROUPS(panthor); >> >> static const struct of_device_id dt_match[] = { >> + { .compatible = "fsl,imx95-mali" }, /* G310 */ No sure the comment about G310 is needed. >> { .compatible = "rockchip,rk3588-mali" }, >> { .compatible = "arm,mali-valhall-csf" }, >> {} >> diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c >> index 0f07ef7d9aea7..2371ab8e50627 100644 >> --- a/drivers/gpu/drm/panthor/panthor_gpu.c >> +++ b/drivers/gpu/drm/panthor/panthor_gpu.c >> @@ -67,6 +67,7 @@ struct panthor_model { >> } >> >> static const struct panthor_model gpu_models[] = { >> + GPU_MODEL(g310, 0, 0), /* NXP i.MX95 */ We can remove the comment about the SoC. This GPU model could be found in other vendor platforms. > > Are you sure about 0, 0? With this I get >> [drm] mali-unknown id 0xac74 major 0x0 minor 0x0 status 0x1 > > Using GPU_MODEL(g310, 10, 4) I get: >> [drm] mali-g310 id 0xac74 major 0x0 minor 0x0 status 0x1 I'd agree it should be GPU_MODEL(g310, 10, 4). Unless the GPU version has been changed by the vendor? > Note the output is GPU_VER_MAJOR() but this table is for GPU_ARCH_MAJOR() > (and the corresponding minor). > > Best regards, > Alexander > >> GPU_MODEL(g610, 10, 7), >> {}, >> }; >> > > Kind regards, Florent
On 2/28/25 11:33 AM, Marco Felsch wrote: > On 25-02-27, Marek Vasut wrote: >> On 2/27/25 9:17 PM, Marco Felsch wrote: >> >> [...] >> >>>> diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c >>>> index 06fe46e320738..2504a456d45c4 100644 >>>> --- a/drivers/gpu/drm/panthor/panthor_drv.c >>>> +++ b/drivers/gpu/drm/panthor/panthor_drv.c >>>> @@ -1591,6 +1591,7 @@ static struct attribute *panthor_attrs[] = { >>>> ATTRIBUTE_GROUPS(panthor); >>>> static const struct of_device_id dt_match[] = { >>>> + { .compatible = "fsl,imx95-mali" }, /* G310 */ >>> ^ >>> nxp? >>> >>> Can we switch to nxp instead? >> We can ... is that the current recommendation ? >> >> Why not stick with fsl , is that deprecated now ? > > Nope I don't think so but I do see patches adding 'nxp' as vendor > (mostly external chips) and some with 'fsl' (mostly soc internal ip > cores). > > My hope was that at some point we could switch to 'nxp' only and make > use of this vendor-prefix. Of course NXP should start with that switch > but this seems not to happen :/ > > It's more a nit but maybe this triggers NXP to make use of the 'nxp' > vendor-prefix as well once they upstream a new base dtsi. OK, fixed.
On 2/28/25 11:21 AM, Alexander Stein wrote: Hi, >> diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c >> index 0f07ef7d9aea7..2371ab8e50627 100644 >> --- a/drivers/gpu/drm/panthor/panthor_gpu.c >> +++ b/drivers/gpu/drm/panthor/panthor_gpu.c >> @@ -67,6 +67,7 @@ struct panthor_model { >> } >> >> static const struct panthor_model gpu_models[] = { >> + GPU_MODEL(g310, 0, 0), /* NXP i.MX95 */ > > Are you sure about 0, 0? I am not. > With this I get >> [drm] mali-unknown id 0xac74 major 0x0 minor 0x0 status 0x1 > > Using GPU_MODEL(g310, 10, 4) I get: >> [drm] mali-g310 id 0xac74 major 0x0 minor 0x0 status 0x1 > > Note the output is GPU_VER_MAJOR() but this table is for GPU_ARCH_MAJOR() > (and the corresponding minor). The major 0x0 minor 0x0 is where I took the 0,0 from. Lemme update this.
On 2/28/25 12:23 PM, Florent Tomasin wrote: Hi, >>> diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c >>> index 06fe46e320738..2504a456d45c4 100644 >>> --- a/drivers/gpu/drm/panthor/panthor_drv.c >>> +++ b/drivers/gpu/drm/panthor/panthor_drv.c >>> @@ -1591,6 +1591,7 @@ static struct attribute *panthor_attrs[] = { >>> ATTRIBUTE_GROUPS(panthor); >>> >>> static const struct of_device_id dt_match[] = { >>> + { .compatible = "fsl,imx95-mali" }, /* G310 */ > No sure the comment about G310 is needed. > >>> { .compatible = "rockchip,rk3588-mali" }, >>> { .compatible = "arm,mali-valhall-csf" }, >>> {} >>> diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c >>> index 0f07ef7d9aea7..2371ab8e50627 100644 >>> --- a/drivers/gpu/drm/panthor/panthor_gpu.c >>> +++ b/drivers/gpu/drm/panthor/panthor_gpu.c >>> @@ -67,6 +67,7 @@ struct panthor_model { >>> } >>> >>> static const struct panthor_model gpu_models[] = { >>> + GPU_MODEL(g310, 0, 0), /* NXP i.MX95 */ > We can remove the comment about the SoC. This GPU model could be found > in other vendor platforms. Maybe it is a good idea to keep track of which GPU is in which SoC at least this way ? >> Are you sure about 0, 0? With this I get >>> [drm] mali-unknown id 0xac74 major 0x0 minor 0x0 status 0x1 >> >> Using GPU_MODEL(g310, 10, 4) I get: >>> [drm] mali-g310 id 0xac74 major 0x0 minor 0x0 status 0x1 > > I'd agree it should be GPU_MODEL(g310, 10, 4). Unless the GPU > version has been changed by the vendor? With the fix suggested by Alexander, I get the following output on boot, so I think 10/4 is OK ? panthor 4d900000.gpu: [drm] clock rate = 1000000000 panthor 4d900000.gpu: EM: created perf domain panthor 4d900000.gpu: [drm] mali-g310 id 0xac74 major 0x0 minor 0x0 status 0x1 panthor 4d900000.gpu: [drm] Features: L2:0x7110306 Tiler:0x809 Mem:0x1 MMU:0x2830 AS:0xff panthor 4d900000.gpu: [drm] shader_present=0x1 l2_present=0x1 tiler_present=0x1 panthor 4d900000.gpu: [drm] Firmware protected mode entry not be supported, ignoring panthor 4d900000.gpu: [drm] Firmware git sha: 8e5cfcfec20cc8aff8509d37e72babc935d34a3b panthor 4d900000.gpu: [drm] CSF FW using interface v1.1.0, Features 0x0 Instrumentation features 0x71 [drm] Initialized panthor 1.3.0 for 4d900000.gpu on minor 0
diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c index 06fe46e320738..2504a456d45c4 100644 --- a/drivers/gpu/drm/panthor/panthor_drv.c +++ b/drivers/gpu/drm/panthor/panthor_drv.c @@ -1591,6 +1591,7 @@ static struct attribute *panthor_attrs[] = { ATTRIBUTE_GROUPS(panthor); static const struct of_device_id dt_match[] = { + { .compatible = "fsl,imx95-mali" }, /* G310 */ { .compatible = "rockchip,rk3588-mali" }, { .compatible = "arm,mali-valhall-csf" }, {} diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c index 0f07ef7d9aea7..2371ab8e50627 100644 --- a/drivers/gpu/drm/panthor/panthor_gpu.c +++ b/drivers/gpu/drm/panthor/panthor_gpu.c @@ -67,6 +67,7 @@ struct panthor_model { } static const struct panthor_model gpu_models[] = { + GPU_MODEL(g310, 0, 0), /* NXP i.MX95 */ GPU_MODEL(g610, 10, 7), {}, };
The instance of the GPU populated in Freescale i.MX95 is the Mali G310, add support for this variant. Signed-off-by: Marek Vasut <marex@denx.de> --- Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: Conor Dooley <conor+dt@kernel.org> Cc: David Airlie <airlied@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org> Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Pengutronix Kernel Team <kernel@pengutronix.de> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Rob Herring <robh@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Sebastian Reichel <sre@kernel.org> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Simona Vetter <simona@ffwll.ch> Cc: Steven Price <steven.price@arm.com> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: imx@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org --- drivers/gpu/drm/panthor/panthor_drv.c | 1 + drivers/gpu/drm/panthor/panthor_gpu.c | 1 + 2 files changed, 2 insertions(+)