2023-06-16 13:00:04

by Juerg Haefliger

[permalink] [raw]
Subject: [PATCH] drm/msm/adreno: Update MODULE_FIRMWARE macros

Add missing MODULE_FIRMWARE macros and remove some for firmwares that
the driver no longer references.

Signed-off-by: Juerg Haefliger <[email protected]>
---
drivers/gpu/drm/msm/adreno/adreno_device.c | 23 ++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
index 8cff86e9d35c..9f70d7c1a72a 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -364,17 +364,32 @@ MODULE_FIRMWARE("qcom/a330_pm4.fw");
MODULE_FIRMWARE("qcom/a330_pfp.fw");
MODULE_FIRMWARE("qcom/a420_pm4.fw");
MODULE_FIRMWARE("qcom/a420_pfp.fw");
+MODULE_FIRMWARE("qcom/a506_zap.mdt");
+MODULE_FIRMWARE("qcom/a508_zap.mdt");
+MODULE_FIRMWARE("qcom/a512_zap.mdt");
MODULE_FIRMWARE("qcom/a530_pm4.fw");
MODULE_FIRMWARE("qcom/a530_pfp.fw");
MODULE_FIRMWARE("qcom/a530v3_gpmu.fw2");
MODULE_FIRMWARE("qcom/a530_zap.mdt");
-MODULE_FIRMWARE("qcom/a530_zap.b00");
-MODULE_FIRMWARE("qcom/a530_zap.b01");
-MODULE_FIRMWARE("qcom/a530_zap.b02");
+MODULE_FIRMWARE("qcom/a540_gpmu.fw2");
+MODULE_FIRMWARE("qcom/a540_zap.mdt");
+MODULE_FIRMWARE("qcom/a615_zap.mdt");
MODULE_FIRMWARE("qcom/a619_gmu.bin");
MODULE_FIRMWARE("qcom/a630_sqe.fw");
MODULE_FIRMWARE("qcom/a630_gmu.bin");
-MODULE_FIRMWARE("qcom/a630_zap.mbn");
+MODULE_FIRMWARE("qcom/a630_zap.mdt");
+MODULE_FIRMWARE("qcom/a640_gmu.bin");
+MODULE_FIRMWARE("qcom/a640_zap.mdt");
+MODULE_FIRMWARE("qcom/a650_gmu.bin");
+MODULE_FIRMWARE("qcom/a650_sqe.fw");
+MODULE_FIRMWARE("qcom/a650_zap.mdt");
+MODULE_FIRMWARE("qcom/a660_gmu.bin");
+MODULE_FIRMWARE("qcom/a660_sqe.fw");
+MODULE_FIRMWARE("qcom/a660_zap.mdt");
+MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
+MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
+MODULE_FIRMWARE("qcom/yamato_pfp.fw");
+MODULE_FIRMWARE("qcom/yamato_pm4.fw");

static inline bool _rev_match(uint8_t entry, uint8_t id)
{
--
2.37.2



2023-06-16 15:39:54

by Brian Masney

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/adreno: Update MODULE_FIRMWARE macros

Hi Juerg,

On Fri, Jun 16, 2023 at 02:28:15PM +0200, Juerg Haefliger wrote:
> Add missing MODULE_FIRMWARE macros and remove some for firmwares that
> the driver no longer references.
>
> Signed-off-by: Juerg Haefliger <[email protected]>
> ---
> drivers/gpu/drm/msm/adreno/adreno_device.c | 23 ++++++++++++++++++----
> 1 file changed, 19 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
> index 8cff86e9d35c..9f70d7c1a72a 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> @@ -364,17 +364,32 @@ MODULE_FIRMWARE("qcom/a330_pm4.fw");
> MODULE_FIRMWARE("qcom/a330_pfp.fw");
> MODULE_FIRMWARE("qcom/a420_pm4.fw");
> MODULE_FIRMWARE("qcom/a420_pfp.fw");
> +MODULE_FIRMWARE("qcom/a506_zap.mdt");
> +MODULE_FIRMWARE("qcom/a508_zap.mdt");
> +MODULE_FIRMWARE("qcom/a512_zap.mdt");
> MODULE_FIRMWARE("qcom/a530_pm4.fw");
> MODULE_FIRMWARE("qcom/a530_pfp.fw");
> MODULE_FIRMWARE("qcom/a530v3_gpmu.fw2");
> MODULE_FIRMWARE("qcom/a530_zap.mdt");
> -MODULE_FIRMWARE("qcom/a530_zap.b00");
> -MODULE_FIRMWARE("qcom/a530_zap.b01");
> -MODULE_FIRMWARE("qcom/a530_zap.b02");
> +MODULE_FIRMWARE("qcom/a540_gpmu.fw2");
> +MODULE_FIRMWARE("qcom/a540_zap.mdt");
> +MODULE_FIRMWARE("qcom/a615_zap.mdt");
> MODULE_FIRMWARE("qcom/a619_gmu.bin");
> MODULE_FIRMWARE("qcom/a630_sqe.fw");
> MODULE_FIRMWARE("qcom/a630_gmu.bin");
> -MODULE_FIRMWARE("qcom/a630_zap.mbn");
> +MODULE_FIRMWARE("qcom/a630_zap.mdt");
> +MODULE_FIRMWARE("qcom/a640_gmu.bin");
> +MODULE_FIRMWARE("qcom/a640_zap.mdt");
> +MODULE_FIRMWARE("qcom/a650_gmu.bin");
> +MODULE_FIRMWARE("qcom/a650_sqe.fw");
> +MODULE_FIRMWARE("qcom/a650_zap.mdt");
> +MODULE_FIRMWARE("qcom/a660_gmu.bin");
> +MODULE_FIRMWARE("qcom/a660_sqe.fw");
> +MODULE_FIRMWARE("qcom/a660_zap.mdt");
> +MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
> +MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
> +MODULE_FIRMWARE("qcom/yamato_pfp.fw");
> +MODULE_FIRMWARE("qcom/yamato_pm4.fw");

You should rebase this on top of the latest -next since the a690 needs
to be added as well.

Brian


2023-06-16 16:13:37

by Akhil P Oommen

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/adreno: Update MODULE_FIRMWARE macros

On Fri, Jun 16, 2023 at 02:28:15PM +0200, Juerg Haefliger wrote:
>
> Add missing MODULE_FIRMWARE macros and remove some for firmwares that
> the driver no longer references.
>
> Signed-off-by: Juerg Haefliger <[email protected]>
> ---
> drivers/gpu/drm/msm/adreno/adreno_device.c | 23 ++++++++++++++++++----
> 1 file changed, 19 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
> index 8cff86e9d35c..9f70d7c1a72a 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> @@ -364,17 +364,32 @@ MODULE_FIRMWARE("qcom/a330_pm4.fw");
> MODULE_FIRMWARE("qcom/a330_pfp.fw");
> MODULE_FIRMWARE("qcom/a420_pm4.fw");
> MODULE_FIRMWARE("qcom/a420_pfp.fw");
> +MODULE_FIRMWARE("qcom/a506_zap.mdt");
> +MODULE_FIRMWARE("qcom/a508_zap.mdt");
> +MODULE_FIRMWARE("qcom/a512_zap.mdt");
> MODULE_FIRMWARE("qcom/a530_pm4.fw");
> MODULE_FIRMWARE("qcom/a530_pfp.fw");
> MODULE_FIRMWARE("qcom/a530v3_gpmu.fw2");
> MODULE_FIRMWARE("qcom/a530_zap.mdt");
> -MODULE_FIRMWARE("qcom/a530_zap.b00");
> -MODULE_FIRMWARE("qcom/a530_zap.b01");
> -MODULE_FIRMWARE("qcom/a530_zap.b02");
Why are these not required when "qcom/a530_zap.mdt" is present?

mdt & b0* binaries are different partitions of the same secure
firmware. Even though we specify only the .mdt file here, the PIL driver
will load the *.b0* file automatically. OTOH, "*.mbn" is a standalone
unified binary format.

If the requirement is to ensure that all necessary firmwares are part of
your distribution, you should include the *.b0* files too here.

-Akhil

> +MODULE_FIRMWARE("qcom/a540_gpmu.fw2");
> +MODULE_FIRMWARE("qcom/a540_zap.mdt");
> +MODULE_FIRMWARE("qcom/a615_zap.mdt");
> MODULE_FIRMWARE("qcom/a619_gmu.bin");
> MODULE_FIRMWARE("qcom/a630_sqe.fw");
> MODULE_FIRMWARE("qcom/a630_gmu.bin");
> -MODULE_FIRMWARE("qcom/a630_zap.mbn");
> +MODULE_FIRMWARE("qcom/a630_zap.mdt");
> +MODULE_FIRMWARE("qcom/a640_gmu.bin");
> +MODULE_FIRMWARE("qcom/a640_zap.mdt");
> +MODULE_FIRMWARE("qcom/a650_gmu.bin");
> +MODULE_FIRMWARE("qcom/a650_sqe.fw");
> +MODULE_FIRMWARE("qcom/a650_zap.mdt");
> +MODULE_FIRMWARE("qcom/a660_gmu.bin");
> +MODULE_FIRMWARE("qcom/a660_sqe.fw");
> +MODULE_FIRMWARE("qcom/a660_zap.mdt");
> +MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
> +MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
> +MODULE_FIRMWARE("qcom/yamato_pfp.fw");
> +MODULE_FIRMWARE("qcom/yamato_pm4.fw");
>
> static inline bool _rev_match(uint8_t entry, uint8_t id)
> {
> --
> 2.37.2
>

2023-06-17 01:11:04

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/adreno: Update MODULE_FIRMWARE macros

On 16/06/2023 18:55, Akhil P Oommen wrote:
> On Fri, Jun 16, 2023 at 02:28:15PM +0200, Juerg Haefliger wrote:
>>
>> Add missing MODULE_FIRMWARE macros and remove some for firmwares that
>> the driver no longer references.
>>
>> Signed-off-by: Juerg Haefliger <[email protected]>
>> ---
>> drivers/gpu/drm/msm/adreno/adreno_device.c | 23 ++++++++++++++++++----
>> 1 file changed, 19 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
>> index 8cff86e9d35c..9f70d7c1a72a 100644
>> --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
>> +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
>> @@ -364,17 +364,32 @@ MODULE_FIRMWARE("qcom/a330_pm4.fw");
>> MODULE_FIRMWARE("qcom/a330_pfp.fw");
>> MODULE_FIRMWARE("qcom/a420_pm4.fw");
>> MODULE_FIRMWARE("qcom/a420_pfp.fw");
>> +MODULE_FIRMWARE("qcom/a506_zap.mdt");
>> +MODULE_FIRMWARE("qcom/a508_zap.mdt");
>> +MODULE_FIRMWARE("qcom/a512_zap.mdt");
>> MODULE_FIRMWARE("qcom/a530_pm4.fw");
>> MODULE_FIRMWARE("qcom/a530_pfp.fw");
>> MODULE_FIRMWARE("qcom/a530v3_gpmu.fw2");
>> MODULE_FIRMWARE("qcom/a530_zap.mdt");
>> -MODULE_FIRMWARE("qcom/a530_zap.b00");
>> -MODULE_FIRMWARE("qcom/a530_zap.b01");
>> -MODULE_FIRMWARE("qcom/a530_zap.b02");
> Why are these not required when "qcom/a530_zap.mdt" is present?
>
> mdt & b0* binaries are different partitions of the same secure
> firmware. Even though we specify only the .mdt file here, the PIL driver
> will load the *.b0* file automatically. OTOH, "*.mbn" is a standalone
> unified binary format.
>
> If the requirement is to ensure that all necessary firmwares are part of
> your distribution, you should include the *.b0* files too here.

I'd say, we should drop all zap files from this list. Linux-firmware
does not provide files with such names. The zap file name depends on the
SoC and the platform name.

Juerg, could you please split the patch into two parts:
- pfp/pm4/sqe firmware names (which can be merged pretty quickly, as
there is no controversy) and zap files changes (after we finish
discussion in this thread).

>
> -Akhil
>
>> +MODULE_FIRMWARE("qcom/a540_gpmu.fw2");
>> +MODULE_FIRMWARE("qcom/a540_zap.mdt");
>> +MODULE_FIRMWARE("qcom/a615_zap.mdt");
>> MODULE_FIRMWARE("qcom/a619_gmu.bin");
>> MODULE_FIRMWARE("qcom/a630_sqe.fw");
>> MODULE_FIRMWARE("qcom/a630_gmu.bin");
>> -MODULE_FIRMWARE("qcom/a630_zap.mbn");
>> +MODULE_FIRMWARE("qcom/a630_zap.mdt");
>> +MODULE_FIRMWARE("qcom/a640_gmu.bin");
>> +MODULE_FIRMWARE("qcom/a640_zap.mdt");
>> +MODULE_FIRMWARE("qcom/a650_gmu.bin");
>> +MODULE_FIRMWARE("qcom/a650_sqe.fw");
>> +MODULE_FIRMWARE("qcom/a650_zap.mdt");
>> +MODULE_FIRMWARE("qcom/a660_gmu.bin");
>> +MODULE_FIRMWARE("qcom/a660_sqe.fw");
>> +MODULE_FIRMWARE("qcom/a660_zap.mdt");
>> +MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
>> +MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
>> +MODULE_FIRMWARE("qcom/yamato_pfp.fw");
>> +MODULE_FIRMWARE("qcom/yamato_pm4.fw");
>>
>> static inline bool _rev_match(uint8_t entry, uint8_t id)
>> {
>> --
>> 2.37.2
>>

--
With best wishes
Dmitry


2023-06-20 06:14:44

by Juerg Haefliger

[permalink] [raw]
Subject: [PATCH v2] drm/msm/adreno: Add missing MODULE_FIRMWARE macros

The driver references some firmware files that don't have corresponding
MODULE_FIRMWARE macros and thus won't be listed via modinfo. Fix that.

Signed-off-by: Juerg Haefliger <[email protected]>

---
v2:
- Drop addition and removal of zap files (needs more discussion)
- Add new a690_gmu.bin
- Update commit subject and message accordingly
---
drivers/gpu/drm/msm/adreno/adreno_device.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
index cb94cfd137a8..7c1f9a844009 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -397,10 +397,21 @@ MODULE_FIRMWARE("qcom/a530_zap.mdt");
MODULE_FIRMWARE("qcom/a530_zap.b00");
MODULE_FIRMWARE("qcom/a530_zap.b01");
MODULE_FIRMWARE("qcom/a530_zap.b02");
+MODULE_FIRMWARE("qcom/a540_gpmu.fw2");
MODULE_FIRMWARE("qcom/a619_gmu.bin");
MODULE_FIRMWARE("qcom/a630_sqe.fw");
MODULE_FIRMWARE("qcom/a630_gmu.bin");
MODULE_FIRMWARE("qcom/a630_zap.mbn");
+MODULE_FIRMWARE("qcom/a640_gmu.bin");
+MODULE_FIRMWARE("qcom/a650_gmu.bin");
+MODULE_FIRMWARE("qcom/a650_sqe.fw");
+MODULE_FIRMWARE("qcom/a660_gmu.bin");
+MODULE_FIRMWARE("qcom/a660_sqe.fw");
+MODULE_FIRMWARE("qcom/a690_gmu.bin");
+MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
+MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
+MODULE_FIRMWARE("qcom/yamato_pfp.fw");
+MODULE_FIRMWARE("qcom/yamato_pm4.fw");

static inline bool _rev_match(uint8_t entry, uint8_t id)
{
--
2.37.2


2023-06-20 06:21:27

by Juerg Haefliger

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/adreno: Update MODULE_FIRMWARE macros

On Fri, 16 Jun 2023 21:25:01 +0530
Akhil P Oommen <[email protected]> wrote:

> On Fri, Jun 16, 2023 at 02:28:15PM +0200, Juerg Haefliger wrote:
> >
> > Add missing MODULE_FIRMWARE macros and remove some for firmwares that
> > the driver no longer references.
> >
> > Signed-off-by: Juerg Haefliger <[email protected]>
> > ---
> > drivers/gpu/drm/msm/adreno/adreno_device.c | 23 ++++++++++++++++++----
> > 1 file changed, 19 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
> > index 8cff86e9d35c..9f70d7c1a72a 100644
> > --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> > +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> > @@ -364,17 +364,32 @@ MODULE_FIRMWARE("qcom/a330_pm4.fw");
> > MODULE_FIRMWARE("qcom/a330_pfp.fw");
> > MODULE_FIRMWARE("qcom/a420_pm4.fw");
> > MODULE_FIRMWARE("qcom/a420_pfp.fw");
> > +MODULE_FIRMWARE("qcom/a506_zap.mdt");
> > +MODULE_FIRMWARE("qcom/a508_zap.mdt");
> > +MODULE_FIRMWARE("qcom/a512_zap.mdt");
> > MODULE_FIRMWARE("qcom/a530_pm4.fw");
> > MODULE_FIRMWARE("qcom/a530_pfp.fw");
> > MODULE_FIRMWARE("qcom/a530v3_gpmu.fw2");
> > MODULE_FIRMWARE("qcom/a530_zap.mdt");
> > -MODULE_FIRMWARE("qcom/a530_zap.b00");
> > -MODULE_FIRMWARE("qcom/a530_zap.b01");
> > -MODULE_FIRMWARE("qcom/a530_zap.b02");
> Why are these not required when "qcom/a530_zap.mdt" is present?
>
> mdt & b0* binaries are different partitions of the same secure
> firmware. Even though we specify only the .mdt file here, the PIL driver
> will load the *.b0* file automatically. OTOH, "*.mbn" is a standalone
> unified binary format.

Ah thanks for the clarification.


> If the requirement is to ensure that all necessary firmwares are part of
> your distribution, you should include the *.b0* files too here.

I'll look into that. IMO, everything that the drivers can load should be
listed for completeness.

...Juerg


> -Akhil
>
> > +MODULE_FIRMWARE("qcom/a540_gpmu.fw2");
> > +MODULE_FIRMWARE("qcom/a540_zap.mdt");
> > +MODULE_FIRMWARE("qcom/a615_zap.mdt");
> > MODULE_FIRMWARE("qcom/a619_gmu.bin");
> > MODULE_FIRMWARE("qcom/a630_sqe.fw");
> > MODULE_FIRMWARE("qcom/a630_gmu.bin");
> > -MODULE_FIRMWARE("qcom/a630_zap.mbn");
> > +MODULE_FIRMWARE("qcom/a630_zap.mdt");
> > +MODULE_FIRMWARE("qcom/a640_gmu.bin");
> > +MODULE_FIRMWARE("qcom/a640_zap.mdt");
> > +MODULE_FIRMWARE("qcom/a650_gmu.bin");
> > +MODULE_FIRMWARE("qcom/a650_sqe.fw");
> > +MODULE_FIRMWARE("qcom/a650_zap.mdt");
> > +MODULE_FIRMWARE("qcom/a660_gmu.bin");
> > +MODULE_FIRMWARE("qcom/a660_sqe.fw");
> > +MODULE_FIRMWARE("qcom/a660_zap.mdt");
> > +MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
> > +MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
> > +MODULE_FIRMWARE("qcom/yamato_pfp.fw");
> > +MODULE_FIRMWARE("qcom/yamato_pm4.fw");
> >
> > static inline bool _rev_match(uint8_t entry, uint8_t id)
> > {
> > --
> > 2.37.2
> >


Attachments:
(No filename) (849.00 B)
OpenPGP digital signature

2023-06-22 19:20:40

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v2] drm/msm/adreno: Add missing MODULE_FIRMWARE macros

On 20/06/2023 08:40, Juerg Haefliger wrote:
> The driver references some firmware files that don't have corresponding
> MODULE_FIRMWARE macros and thus won't be listed via modinfo. Fix that.
>
> Signed-off-by: Juerg Haefliger <[email protected]>
>
> ---
> v2:
> - Drop addition and removal of zap files (needs more discussion)
> - Add new a690_gmu.bin
> - Update commit subject and message accordingly
> ---
> drivers/gpu/drm/msm/adreno/adreno_device.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)

Reviewed-by: Dmitry Baryshkov <[email protected]>


--
With best wishes
Dmitry