diff mbox series

drm/msm/adreno: Add some missing MODULE_FIRMWARE entries

Message ID 20240604214018.238153-1-pbrobinson@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm/msm/adreno: Add some missing MODULE_FIRMWARE entries | expand

Commit Message

Peter Robinson June 4, 2024, 9:40 p.m. UTC
Add missing MODULE_FIRMWARE for firmware in linux-firmware,
this is needed for automatically adding firmware to things
like initrds when the drivers are built as modules. This is
useful for devices like the X13s and the RBx devices on
general distros.

Fixes: 5e7665b5e484b ("drm/msm/adreno: Add Adreno A690 support")
Fixes: 18397519cb622 ("drm/msm/adreno: Add A702 support")
Fixes: 3e7042ba87da ("drm/msm/adreno: Add ZAP firmware name to A635")
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/gpu/drm/msm/adreno/adreno_device.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Dmitry Baryshkov June 4, 2024, 10:17 p.m. UTC | #1
On Wed, 5 Jun 2024 at 00:40, Peter Robinson <pbrobinson@gmail.com> wrote:
>
> Add missing MODULE_FIRMWARE for firmware in linux-firmware,
> this is needed for automatically adding firmware to things
> like initrds when the drivers are built as modules. This is
> useful for devices like the X13s and the RBx devices on
> general distros.
>
> Fixes: 5e7665b5e484b ("drm/msm/adreno: Add Adreno A690 support")
> Fixes: 18397519cb622 ("drm/msm/adreno: Add A702 support")
> Fixes: 3e7042ba87da ("drm/msm/adreno: Add ZAP firmware name to A635")
> Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
> ---
>  drivers/gpu/drm/msm/adreno/adreno_device.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
> index c3703a51287b4..fede5159e7f5b 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> @@ -609,8 +609,11 @@ 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/a660_zap.mbn");

-ENOSUCHFILE. It should qcom/particular-SoC/a660_zap.mbn

> +MODULE_FIRMWARE("qcom/a702_sqe.fw");
>  MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
>  MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
> +MODULE_FIRMWARE("qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn");

I'm a bit sceptical here. Each device has its own zap MBN file (this
one is also a fancy named a690_zap.mbn).  Do we want to list all such
files? Consider all the vendors, which are open-source / Linux
friendly, like FairPhone, OnePlus, etc.

>  MODULE_FIRMWARE("qcom/yamato_pfp.fw");
>  MODULE_FIRMWARE("qcom/yamato_pm4.fw");
>
> --
> 2.45.1
>
Peter Robinson June 4, 2024, 10:30 p.m. UTC | #2
On Tue, 4 Jun 2024 at 23:18, Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> On Wed, 5 Jun 2024 at 00:40, Peter Robinson <pbrobinson@gmail.com> wrote:
> >
> > Add missing MODULE_FIRMWARE for firmware in linux-firmware,
> > this is needed for automatically adding firmware to things
> > like initrds when the drivers are built as modules. This is
> > useful for devices like the X13s and the RBx devices on
> > general distros.
> >
> > Fixes: 5e7665b5e484b ("drm/msm/adreno: Add Adreno A690 support")
> > Fixes: 18397519cb622 ("drm/msm/adreno: Add A702 support")
> > Fixes: 3e7042ba87da ("drm/msm/adreno: Add ZAP firmware name to A635")
> > Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
> > ---
> >  drivers/gpu/drm/msm/adreno/adreno_device.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
> > index c3703a51287b4..fede5159e7f5b 100644
> > --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> > +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> > @@ -609,8 +609,11 @@ 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/a660_zap.mbn");
>
> -ENOSUCHFILE. It should qcom/particular-SoC/a660_zap.mbn

> > +MODULE_FIRMWARE("qcom/a702_sqe.fw");
> >  MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
> >  MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
> > +MODULE_FIRMWARE("qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn");
>
> I'm a bit sceptical here. Each device has its own zap MBN file (this
> one is also a fancy named a690_zap.mbn).  Do we want to list all such
> files? Consider all the vendors, which are open-source / Linux
> friendly, like FairPhone, OnePlus, etc.

That's what's in linux-firmware, I would have thought they would be
SoC specific as opposed to device specific, but that's not what we
currently have, are we supposed to have devices that selectively work
based on what firmware they have?

> >  MODULE_FIRMWARE("qcom/yamato_pfp.fw");
> >  MODULE_FIRMWARE("qcom/yamato_pm4.fw");
> >
> > --
> > 2.45.1
> >
>
>
> --
> With best wishes
> Dmitry
Dmitry Baryshkov June 4, 2024, 10:54 p.m. UTC | #3
On Wed, 5 Jun 2024 at 01:30, Peter Robinson <pbrobinson@gmail.com> wrote:
>
> On Tue, 4 Jun 2024 at 23:18, Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
> >
> > On Wed, 5 Jun 2024 at 00:40, Peter Robinson <pbrobinson@gmail.com> wrote:
> > >
> > > Add missing MODULE_FIRMWARE for firmware in linux-firmware,
> > > this is needed for automatically adding firmware to things
> > > like initrds when the drivers are built as modules. This is
> > > useful for devices like the X13s and the RBx devices on
> > > general distros.
> > >
> > > Fixes: 5e7665b5e484b ("drm/msm/adreno: Add Adreno A690 support")
> > > Fixes: 18397519cb622 ("drm/msm/adreno: Add A702 support")
> > > Fixes: 3e7042ba87da ("drm/msm/adreno: Add ZAP firmware name to A635")
> > > Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
> > > ---
> > >  drivers/gpu/drm/msm/adreno/adreno_device.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
> > > index c3703a51287b4..fede5159e7f5b 100644
> > > --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> > > +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> > > @@ -609,8 +609,11 @@ 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/a660_zap.mbn");
> >
> > -ENOSUCHFILE. It should qcom/particular-SoC/a660_zap.mbn
>
> > > +MODULE_FIRMWARE("qcom/a702_sqe.fw");
> > >  MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
> > >  MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
> > > +MODULE_FIRMWARE("qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn");
> >
> > I'm a bit sceptical here. Each device has its own zap MBN file (this
> > one is also a fancy named a690_zap.mbn).  Do we want to list all such
> > files? Consider all the vendors, which are open-source / Linux
> > friendly, like FairPhone, OnePlus, etc.
>
> That's what's in linux-firmware, I would have thought they would be
> SoC specific as opposed to device specific, but that's not what we
> currently have, are we supposed to have devices that selectively work
> based on what firmware they have?

The firmware is signed with the manufacturer's key. End-user devices
verify the signature while loading the firmware and decline firmware
without vendor's signature.

>
> > >  MODULE_FIRMWARE("qcom/yamato_pfp.fw");
> > >  MODULE_FIRMWARE("qcom/yamato_pm4.fw");
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
index c3703a51287b4..fede5159e7f5b 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -609,8 +609,11 @@  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/a660_zap.mbn");
+MODULE_FIRMWARE("qcom/a702_sqe.fw");
 MODULE_FIRMWARE("qcom/leia_pfp_470.fw");
 MODULE_FIRMWARE("qcom/leia_pm4_470.fw");
+MODULE_FIRMWARE("qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn");
 MODULE_FIRMWARE("qcom/yamato_pfp.fw");
 MODULE_FIRMWARE("qcom/yamato_pm4.fw");