[PATCH v5 3/6] drm/panthor: Add support for Mali-G710, Mali-G510 and Mali-G310

Karunika Choo posted 6 patches 2 months, 2 weeks ago
There is a newer version of this series
[PATCH v5 3/6] drm/panthor: Add support for Mali-G710, Mali-G510 and Mali-G310
Posted by Karunika Choo 2 months, 2 weeks ago
This patch adds GPU model name and FW binary support for Mali-G710,
Mali-G510, and Mali-G310.

Signed-off-by: Karunika Choo <karunika.choo@arm.com>
---
 drivers/gpu/drm/panthor/panthor_fw.c | 2 ++
 drivers/gpu/drm/panthor/panthor_hw.c | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c
index 36f1034839c2..b7b454d16f12 100644
--- a/drivers/gpu/drm/panthor/panthor_fw.c
+++ b/drivers/gpu/drm/panthor/panthor_fw.c
@@ -1402,3 +1402,5 @@ int panthor_fw_init(struct panthor_device *ptdev)
 }
 
 MODULE_FIRMWARE("arm/mali/arch10.8/mali_csffw.bin");
+MODULE_FIRMWARE("arm/mali/arch10.10/mali_csffw.bin");
+MODULE_FIRMWARE("arm/mali/arch10.12/mali_csffw.bin");
diff --git a/drivers/gpu/drm/panthor/panthor_hw.c b/drivers/gpu/drm/panthor/panthor_hw.c
index f39010c0ca86..7f138974d43b 100644
--- a/drivers/gpu/drm/panthor/panthor_hw.c
+++ b/drivers/gpu/drm/panthor/panthor_hw.c
@@ -15,8 +15,14 @@ static char *get_gpu_model_name(struct panthor_device *ptdev)
 						GPU_PROD_MAJOR(gpu_id));
 
 	switch (product_id) {
+	case GPU_PROD_ID_MAKE(10, 2):
+		return "Mali-G710";
 	case GPU_PROD_ID_MAKE(10, 7):
 		return "Mali-G610";
+	case GPU_PROD_ID_MAKE(10, 3):
+		return "Mali-G510";
+	case GPU_PROD_ID_MAKE(10, 4):
+		return "Mali-G310";
 	}
 
 	return "(Unknown Mali GPU)";
-- 
2.49.0
Re: [PATCH v5 3/6] drm/panthor: Add support for Mali-G710, Mali-G510 and Mali-G310
Posted by Chia-I Wu 2 months, 2 weeks ago
On Mon, Jul 21, 2025 at 4:33 AM Karunika Choo <karunika.choo@arm.com> wrote:
>
> This patch adds GPU model name and FW binary support for Mali-G710,
> Mali-G510, and Mali-G310.
>
> Signed-off-by: Karunika Choo <karunika.choo@arm.com>
> ---
>  drivers/gpu/drm/panthor/panthor_fw.c | 2 ++
>  drivers/gpu/drm/panthor/panthor_hw.c | 6 ++++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c
> index 36f1034839c2..b7b454d16f12 100644
> --- a/drivers/gpu/drm/panthor/panthor_fw.c
> +++ b/drivers/gpu/drm/panthor/panthor_fw.c
> @@ -1402,3 +1402,5 @@ int panthor_fw_init(struct panthor_device *ptdev)
>  }
>
>  MODULE_FIRMWARE("arm/mali/arch10.8/mali_csffw.bin");
> +MODULE_FIRMWARE("arm/mali/arch10.10/mali_csffw.bin");
> +MODULE_FIRMWARE("arm/mali/arch10.12/mali_csffw.bin");
> diff --git a/drivers/gpu/drm/panthor/panthor_hw.c b/drivers/gpu/drm/panthor/panthor_hw.c
> index f39010c0ca86..7f138974d43b 100644
> --- a/drivers/gpu/drm/panthor/panthor_hw.c
> +++ b/drivers/gpu/drm/panthor/panthor_hw.c
> @@ -15,8 +15,14 @@ static char *get_gpu_model_name(struct panthor_device *ptdev)
>                                                 GPU_PROD_MAJOR(gpu_id));
>
>         switch (product_id) {
> +       case GPU_PROD_ID_MAKE(10, 2):
> +               return "Mali-G710";
>         case GPU_PROD_ID_MAKE(10, 7):
>                 return "Mali-G610";
> +       case GPU_PROD_ID_MAKE(10, 3):
> +               return "Mali-G510";
> +       case GPU_PROD_ID_MAKE(10, 4):
> +               return "Mali-G310";
We should keep the switch cases numerically sorted, unless the current
ordering has any significance (which deserves a comment).


>         }
>
>         return "(Unknown Mali GPU)";
> --
> 2.49.0
>
Re: [PATCH v5 3/6] drm/panthor: Add support for Mali-G710, Mali-G510 and Mali-G310
Posted by Erik Faye-Lund 2 months, 2 weeks ago
On Mon, 2025-07-21 at 12:13 +0100, Karunika Choo wrote:
> This patch adds GPU model name and FW binary support for Mali-G710,
> Mali-G510, and Mali-G310.
> 
> Signed-off-by: Karunika Choo <karunika.choo@arm.com>
> ---
>  drivers/gpu/drm/panthor/panthor_fw.c | 2 ++
>  drivers/gpu/drm/panthor/panthor_hw.c | 6 ++++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_fw.c
> b/drivers/gpu/drm/panthor/panthor_fw.c
> index 36f1034839c2..b7b454d16f12 100644
> --- a/drivers/gpu/drm/panthor/panthor_fw.c
> +++ b/drivers/gpu/drm/panthor/panthor_fw.c
> @@ -1402,3 +1402,5 @@ int panthor_fw_init(struct panthor_device
> *ptdev)
>  }
>  
>  MODULE_FIRMWARE("arm/mali/arch10.8/mali_csffw.bin");
> +MODULE_FIRMWARE("arm/mali/arch10.10/mali_csffw.bin");
> +MODULE_FIRMWARE("arm/mali/arch10.12/mali_csffw.bin");

This isn't a problem with this series per-se, but these (as well as the
ones you're adding in later commits here) are all missing from here:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/arm/mali

Any plans on upstreaming these so people without DDK access can
actually try these patches?

> diff --git a/drivers/gpu/drm/panthor/panthor_hw.c
> b/drivers/gpu/drm/panthor/panthor_hw.c
> index f39010c0ca86..7f138974d43b 100644
> --- a/drivers/gpu/drm/panthor/panthor_hw.c
> +++ b/drivers/gpu/drm/panthor/panthor_hw.c
> @@ -15,8 +15,14 @@ static char *get_gpu_model_name(struct
> panthor_device *ptdev)
>  						GPU_PROD_MAJOR(gpu_i
> d));
>  
>  	switch (product_id) {
> +	case GPU_PROD_ID_MAKE(10, 2):
> +		return "Mali-G710";
>  	case GPU_PROD_ID_MAKE(10, 7):
>  		return "Mali-G610";
> +	case GPU_PROD_ID_MAKE(10, 3):
> +		return "Mali-G510";
> +	case GPU_PROD_ID_MAKE(10, 4):
> +		return "Mali-G310";
>  	}
>  
>  	return "(Unknown Mali GPU)";
Re: [PATCH v5 3/6] drm/panthor: Add support for Mali-G710, Mali-G510 and Mali-G310
Posted by Liviu Dudau 2 months, 2 weeks ago
On Tue, Jul 22, 2025 at 10:29:21AM +0200, Erik Faye-Lund wrote:
> On Mon, 2025-07-21 at 12:13 +0100, Karunika Choo wrote:
> > This patch adds GPU model name and FW binary support for Mali-G710,
> > Mali-G510, and Mali-G310.
> > 
> > Signed-off-by: Karunika Choo <karunika.choo@arm.com>
> > ---
> >  drivers/gpu/drm/panthor/panthor_fw.c | 2 ++
> >  drivers/gpu/drm/panthor/panthor_hw.c | 6 ++++++
> >  2 files changed, 8 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/panthor/panthor_fw.c
> > b/drivers/gpu/drm/panthor/panthor_fw.c
> > index 36f1034839c2..b7b454d16f12 100644
> > --- a/drivers/gpu/drm/panthor/panthor_fw.c
> > +++ b/drivers/gpu/drm/panthor/panthor_fw.c
> > @@ -1402,3 +1402,5 @@ int panthor_fw_init(struct panthor_device
> > *ptdev)
> >  }
> >  
> >  MODULE_FIRMWARE("arm/mali/arch10.8/mali_csffw.bin");
> > +MODULE_FIRMWARE("arm/mali/arch10.10/mali_csffw.bin");
> > +MODULE_FIRMWARE("arm/mali/arch10.12/mali_csffw.bin");
> 
> This isn't a problem with this series per-se, but these (as well as the
> ones you're adding in later commits here) are all missing from here:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/arm/mali
> 
> Any plans on upstreaming these so people without DDK access can
> actually try these patches?

If you want to try the patches the cover letter has the link for the binaries.
Once we're happy with the patches I will send a pull request to linux-firmware for the binaries.

Best regards,
Liviu

> 
> > diff --git a/drivers/gpu/drm/panthor/panthor_hw.c
> > b/drivers/gpu/drm/panthor/panthor_hw.c
> > index f39010c0ca86..7f138974d43b 100644
> > --- a/drivers/gpu/drm/panthor/panthor_hw.c
> > +++ b/drivers/gpu/drm/panthor/panthor_hw.c
> > @@ -15,8 +15,14 @@ static char *get_gpu_model_name(struct
> > panthor_device *ptdev)
> >  						GPU_PROD_MAJOR(gpu_i
> > d));
> >  
> >  	switch (product_id) {
> > +	case GPU_PROD_ID_MAKE(10, 2):
> > +		return "Mali-G710";
> >  	case GPU_PROD_ID_MAKE(10, 7):
> >  		return "Mali-G610";
> > +	case GPU_PROD_ID_MAKE(10, 3):
> > +		return "Mali-G510";
> > +	case GPU_PROD_ID_MAKE(10, 4):
> > +		return "Mali-G310";
> >  	}
> >  
> >  	return "(Unknown Mali GPU)";

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
Re: [PATCH v5 3/6] drm/panthor: Add support for Mali-G710, Mali-G510 and Mali-G310
Posted by Liviu Dudau 2 months, 2 weeks ago
On Mon, Jul 21, 2025 at 12:13:41PM +0100, Karunika Choo wrote:
> This patch adds GPU model name and FW binary support for Mali-G710,
> Mali-G510, and Mali-G310.
> 
> Signed-off-by: Karunika Choo <karunika.choo@arm.com>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
>  drivers/gpu/drm/panthor/panthor_fw.c | 2 ++
>  drivers/gpu/drm/panthor/panthor_hw.c | 6 ++++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c
> index 36f1034839c2..b7b454d16f12 100644
> --- a/drivers/gpu/drm/panthor/panthor_fw.c
> +++ b/drivers/gpu/drm/panthor/panthor_fw.c
> @@ -1402,3 +1402,5 @@ int panthor_fw_init(struct panthor_device *ptdev)
>  }
>  
>  MODULE_FIRMWARE("arm/mali/arch10.8/mali_csffw.bin");
> +MODULE_FIRMWARE("arm/mali/arch10.10/mali_csffw.bin");
> +MODULE_FIRMWARE("arm/mali/arch10.12/mali_csffw.bin");
> diff --git a/drivers/gpu/drm/panthor/panthor_hw.c b/drivers/gpu/drm/panthor/panthor_hw.c
> index f39010c0ca86..7f138974d43b 100644
> --- a/drivers/gpu/drm/panthor/panthor_hw.c
> +++ b/drivers/gpu/drm/panthor/panthor_hw.c
> @@ -15,8 +15,14 @@ static char *get_gpu_model_name(struct panthor_device *ptdev)
>  						GPU_PROD_MAJOR(gpu_id));
>  
>  	switch (product_id) {
> +	case GPU_PROD_ID_MAKE(10, 2):
> +		return "Mali-G710";
>  	case GPU_PROD_ID_MAKE(10, 7):
>  		return "Mali-G610";
> +	case GPU_PROD_ID_MAKE(10, 3):
> +		return "Mali-G510";
> +	case GPU_PROD_ID_MAKE(10, 4):
> +		return "Mali-G310";
>  	}
>  
>  	return "(Unknown Mali GPU)";
> -- 
> 2.49.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯