Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused
@ 2025-11-14 20:19 Jacopo Mondi
  2025-11-14 20:28 ` Dan Scally
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jacopo Mondi @ 2025-11-14 20:19 UTC (permalink / raw)
  To: hans, Sakari Ailus, Laurent Pinchart, Dan Scally
  Cc: Jacopo Mondi, linux-media

As the Mali-C55 driver is instrumented to work without depending on
CONFIG_PM, mark the two pm_runtime handlers as __maybe_unused to
suppress the compiler warning when compiling without CONFIG_PM.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
Late fix for Mali C55 PR

fixes:
https://gitlab.freedesktop.org/linux-media/media-committers/-/jobs/87903226

it's great to have CI, Thanks!

---
 drivers/media/platform/arm/mali-c55/mali-c55-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
index b23d543cf496..43b834459ccf 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
@@ -707,7 +707,7 @@ static void __mali_c55_power_off(struct mali_c55 *mali_c55)
 	clk_bulk_disable_unprepare(ARRAY_SIZE(mali_c55->clks), mali_c55->clks);
 }

-static int mali_c55_runtime_suspend(struct device *dev)
+static int __maybe_unused mali_c55_runtime_suspend(struct device *dev)
 {
 	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);

@@ -770,7 +770,7 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
 	return 0;
 }

-static int mali_c55_runtime_resume(struct device *dev)
+static int __maybe_unused mali_c55_runtime_resume(struct device *dev)
 {
 	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
 	int ret;
--
2.51.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused
  2025-11-14 20:19 [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused Jacopo Mondi
@ 2025-11-14 20:28 ` Dan Scally
  2025-11-14 20:45 ` Laurent Pinchart
  2025-11-15  9:54 ` Hans Verkuil
  2 siblings, 0 replies; 7+ messages in thread
From: Dan Scally @ 2025-11-14 20:28 UTC (permalink / raw)
  To: Jacopo Mondi, hans, Sakari Ailus, Laurent Pinchart; +Cc: linux-media

Hi Jacopo

On 14/11/2025 20:19, Jacopo Mondi wrote:
> As the Mali-C55 driver is instrumented to work without depending on
> CONFIG_PM, mark the two pm_runtime handlers as __maybe_unused to
> suppress the compiler warning when compiling without CONFIG_PM.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---

Thanks for handling it:

Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>

> Late fix for Mali C55 PR
> 
> fixes:
> https://gitlab.freedesktop.org/linux-media/media-committers/-/jobs/87903226
> 
> it's great to have CI, Thanks!
> 
> ---
>   drivers/media/platform/arm/mali-c55/mali-c55-core.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> index b23d543cf496..43b834459ccf 100644
> --- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> +++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> @@ -707,7 +707,7 @@ static void __mali_c55_power_off(struct mali_c55 *mali_c55)
>   	clk_bulk_disable_unprepare(ARRAY_SIZE(mali_c55->clks), mali_c55->clks);
>   }
> 
> -static int mali_c55_runtime_suspend(struct device *dev)
> +static int __maybe_unused mali_c55_runtime_suspend(struct device *dev)
>   {
>   	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
> 
> @@ -770,7 +770,7 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
>   	return 0;
>   }
> 
> -static int mali_c55_runtime_resume(struct device *dev)
> +static int __maybe_unused mali_c55_runtime_resume(struct device *dev)
>   {
>   	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
>   	int ret;
> --
> 2.51.1
> 
T



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused
  2025-11-14 20:19 [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused Jacopo Mondi
  2025-11-14 20:28 ` Dan Scally
@ 2025-11-14 20:45 ` Laurent Pinchart
  2025-11-15 18:07   ` Jacopo Mondi
  2025-11-15  9:54 ` Hans Verkuil
  2 siblings, 1 reply; 7+ messages in thread
From: Laurent Pinchart @ 2025-11-14 20:45 UTC (permalink / raw)
  To: Jacopo Mondi; +Cc: hans, Sakari Ailus, Dan Scally, linux-media

On Fri, Nov 14, 2025 at 09:19:20PM +0100, Jacopo Mondi wrote:
> As the Mali-C55 driver is instrumented to work without depending on
> CONFIG_PM, mark the two pm_runtime handlers as __maybe_unused to
> suppress the compiler warning when compiling without CONFIG_PM.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
> Late fix for Mali C55 PR
> 
> fixes:
> https://gitlab.freedesktop.org/linux-media/media-committers/-/jobs/87903226
> 
> it's great to have CI, Thanks!

The recommended way to handle this is to replace SET_RUNTIME_PM_OPS with
RUNTIME_PM_OPS and use pm_ptr(). See commit
b5ddb9ab3d83fe0d93d38de442c45610a5846d06 for instance. I think you can
actually use DEFINE_RUNTIME_DEV_PM_OPS() and drop the manual
SET_SYSTEM_SLEEP_PM_OPS().

This being said, it seems PM needs more love, I don't see where
streaming would get stopped and resumed with system PM. That's something
to be addressed on top of course.

> ---
>  drivers/media/platform/arm/mali-c55/mali-c55-core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> index b23d543cf496..43b834459ccf 100644
> --- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> +++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> @@ -707,7 +707,7 @@ static void __mali_c55_power_off(struct mali_c55 *mali_c55)
>  	clk_bulk_disable_unprepare(ARRAY_SIZE(mali_c55->clks), mali_c55->clks);
>  }
> 
> -static int mali_c55_runtime_suspend(struct device *dev)
> +static int __maybe_unused mali_c55_runtime_suspend(struct device *dev)
>  {
>  	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
> 
> @@ -770,7 +770,7 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
>  	return 0;
>  }
> 
> -static int mali_c55_runtime_resume(struct device *dev)
> +static int __maybe_unused mali_c55_runtime_resume(struct device *dev)
>  {
>  	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
>  	int ret;

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused
  2025-11-14 20:19 [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused Jacopo Mondi
  2025-11-14 20:28 ` Dan Scally
  2025-11-14 20:45 ` Laurent Pinchart
@ 2025-11-15  9:54 ` Hans Verkuil
  2025-11-15 18:05   ` Jacopo Mondi
  2 siblings, 1 reply; 7+ messages in thread
From: Hans Verkuil @ 2025-11-15  9:54 UTC (permalink / raw)
  To: Jacopo Mondi, Sakari Ailus, Laurent Pinchart, Dan Scally; +Cc: linux-media

On 14/11/2025 21:19, Jacopo Mondi wrote:
> As the Mali-C55 driver is instrumented to work without depending on
> CONFIG_PM, mark the two pm_runtime handlers as __maybe_unused to
> suppress the compiler warning when compiling without CONFIG_PM.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
> Late fix for Mali C55 PR
> 
> fixes:
> https://gitlab.freedesktop.org/linux-media/media-committers/-/jobs/87903226
> 
> it's great to have CI, Thanks!

I wondered why I didn't see this issue until CI started on the merge request.
It turned out that I used to have the FULL_CI variable set to 1 in gitlab, but
at some point it was removed. Either by me or perhaps by a gitlab update, possibly
when we moved to a different server. In any case, I now set it again and I now
see the same issue.

You can do the same: setting FULL_CI to 1 will enable additional tests, which
is useful when prepping a PR.

Regards,

	Hans

> 
> ---
>  drivers/media/platform/arm/mali-c55/mali-c55-core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> index b23d543cf496..43b834459ccf 100644
> --- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> +++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> @@ -707,7 +707,7 @@ static void __mali_c55_power_off(struct mali_c55 *mali_c55)
>  	clk_bulk_disable_unprepare(ARRAY_SIZE(mali_c55->clks), mali_c55->clks);
>  }
> 
> -static int mali_c55_runtime_suspend(struct device *dev)
> +static int __maybe_unused mali_c55_runtime_suspend(struct device *dev)
>  {
>  	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
> 
> @@ -770,7 +770,7 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
>  	return 0;
>  }
> 
> -static int mali_c55_runtime_resume(struct device *dev)
> +static int __maybe_unused mali_c55_runtime_resume(struct device *dev)
>  {
>  	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
>  	int ret;
> --
> 2.51.1
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused
  2025-11-15  9:54 ` Hans Verkuil
@ 2025-11-15 18:05   ` Jacopo Mondi
  0 siblings, 0 replies; 7+ messages in thread
From: Jacopo Mondi @ 2025-11-15 18:05 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Jacopo Mondi, Sakari Ailus, Laurent Pinchart, Dan Scally,
	linux-media

Hi Hans

On Sat, Nov 15, 2025 at 10:54:20AM +0100, Hans Verkuil wrote:
> On 14/11/2025 21:19, Jacopo Mondi wrote:
> > As the Mali-C55 driver is instrumented to work without depending on
> > CONFIG_PM, mark the two pm_runtime handlers as __maybe_unused to
> > suppress the compiler warning when compiling without CONFIG_PM.
> >
> > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> > ---
> > Late fix for Mali C55 PR
> >
> > fixes:
> > https://gitlab.freedesktop.org/linux-media/media-committers/-/jobs/87903226
> >
> > it's great to have CI, Thanks!
>
> I wondered why I didn't see this issue until CI started on the merge request.
> It turned out that I used to have the FULL_CI variable set to 1 in gitlab, but
> at some point it was removed. Either by me or perhaps by a gitlab update, possibly
> when we moved to a different server. In any case, I now set it again and I now
> see the same issue.
>
> You can do the same: setting FULL_CI to 1 will enable additional tests, which
> is useful when prepping a PR.

Uh nice, I didn't know that!

yes, I would like to repeat the config tests you have run, but I
thought they were not available to users to reduce the workload.

I'll remember to enable FULL_CI for pull requests next time

Anyway, I see you have collected this patch which is now in
media-committers/next, so I guess we can address Laurent's suggestion
on top of v6.19

Thanks
   j

>
> Regards,
>
> 	Hans
>
> >
> > ---
> >  drivers/media/platform/arm/mali-c55/mali-c55-core.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> > index b23d543cf496..43b834459ccf 100644
> > --- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> > +++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> > @@ -707,7 +707,7 @@ static void __mali_c55_power_off(struct mali_c55 *mali_c55)
> >  	clk_bulk_disable_unprepare(ARRAY_SIZE(mali_c55->clks), mali_c55->clks);
> >  }
> >
> > -static int mali_c55_runtime_suspend(struct device *dev)
> > +static int __maybe_unused mali_c55_runtime_suspend(struct device *dev)
> >  {
> >  	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
> >
> > @@ -770,7 +770,7 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
> >  	return 0;
> >  }
> >
> > -static int mali_c55_runtime_resume(struct device *dev)
> > +static int __maybe_unused mali_c55_runtime_resume(struct device *dev)
> >  {
> >  	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
> >  	int ret;
> > --
> > 2.51.1
> >
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused
  2025-11-14 20:45 ` Laurent Pinchart
@ 2025-11-15 18:07   ` Jacopo Mondi
  2025-11-15 20:59     ` Laurent Pinchart
  0 siblings, 1 reply; 7+ messages in thread
From: Jacopo Mondi @ 2025-11-15 18:07 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Jacopo Mondi, hans, Sakari Ailus, Dan Scally, linux-media

Hi Laurent

On Fri, Nov 14, 2025 at 10:45:01PM +0200, Laurent Pinchart wrote:
> On Fri, Nov 14, 2025 at 09:19:20PM +0100, Jacopo Mondi wrote:
> > As the Mali-C55 driver is instrumented to work without depending on
> > CONFIG_PM, mark the two pm_runtime handlers as __maybe_unused to
> > suppress the compiler warning when compiling without CONFIG_PM.
> >
> > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> > ---
> > Late fix for Mali C55 PR
> >
> > fixes:
> > https://gitlab.freedesktop.org/linux-media/media-committers/-/jobs/87903226
> >
> > it's great to have CI, Thanks!
>
> The recommended way to handle this is to replace SET_RUNTIME_PM_OPS with
> RUNTIME_PM_OPS and use pm_ptr(). See commit
> b5ddb9ab3d83fe0d93d38de442c45610a5846d06 for instance. I think you can
> actually use DEFINE_RUNTIME_DEV_PM_OPS() and drop the manual
> SET_SYSTEM_SLEEP_PM_OPS().

Thanks, Hans has collected this patch which at least suppress the
compiler warning for v6.19.

>
> This being said, it seems PM needs more love, I don't see where
> streaming would get stopped and resumed with system PM. That's something
> to be addressed on top of course.

We can address both the above suggestions on v6.19!

>
> > ---
> >  drivers/media/platform/arm/mali-c55/mali-c55-core.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> > index b23d543cf496..43b834459ccf 100644
> > --- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> > +++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> > @@ -707,7 +707,7 @@ static void __mali_c55_power_off(struct mali_c55 *mali_c55)
> >  	clk_bulk_disable_unprepare(ARRAY_SIZE(mali_c55->clks), mali_c55->clks);
> >  }
> >
> > -static int mali_c55_runtime_suspend(struct device *dev)
> > +static int __maybe_unused mali_c55_runtime_suspend(struct device *dev)
> >  {
> >  	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
> >
> > @@ -770,7 +770,7 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
> >  	return 0;
> >  }
> >
> > -static int mali_c55_runtime_resume(struct device *dev)
> > +static int __maybe_unused mali_c55_runtime_resume(struct device *dev)
> >  {
> >  	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
> >  	int ret;
>
> --
> Regards,
>
> Laurent Pinchart

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused
  2025-11-15 18:07   ` Jacopo Mondi
@ 2025-11-15 20:59     ` Laurent Pinchart
  0 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2025-11-15 20:59 UTC (permalink / raw)
  To: Jacopo Mondi; +Cc: hans, Sakari Ailus, Dan Scally, linux-media

On Sat, Nov 15, 2025 at 07:07:06PM +0100, Jacopo Mondi wrote:
> On Fri, Nov 14, 2025 at 10:45:01PM +0200, Laurent Pinchart wrote:
> > On Fri, Nov 14, 2025 at 09:19:20PM +0100, Jacopo Mondi wrote:
> > > As the Mali-C55 driver is instrumented to work without depending on
> > > CONFIG_PM, mark the two pm_runtime handlers as __maybe_unused to
> > > suppress the compiler warning when compiling without CONFIG_PM.
> > >
> > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> > > ---
> > > Late fix for Mali C55 PR
> > >
> > > fixes:
> > > https://gitlab.freedesktop.org/linux-media/media-committers/-/jobs/87903226
> > >
> > > it's great to have CI, Thanks!
> >
> > The recommended way to handle this is to replace SET_RUNTIME_PM_OPS with
> > RUNTIME_PM_OPS and use pm_ptr(). See commit
> > b5ddb9ab3d83fe0d93d38de442c45610a5846d06 for instance. I think you can
> > actually use DEFINE_RUNTIME_DEV_PM_OPS() and drop the manual
> > SET_SYSTEM_SLEEP_PM_OPS().
> 
> Thanks, Hans has collected this patch which at least suppress the
> compiler warning for v6.19.
> 
> > This being said, it seems PM needs more love, I don't see where
> > streaming would get stopped and resumed with system PM. That's something
> > to be addressed on top of course.
> 
> We can address both the above suggestions on v6.19!

Fine with me.

> > > ---
> > >  drivers/media/platform/arm/mali-c55/mali-c55-core.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> > > index b23d543cf496..43b834459ccf 100644
> > > --- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> > > +++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> > > @@ -707,7 +707,7 @@ static void __mali_c55_power_off(struct mali_c55 *mali_c55)
> > >  	clk_bulk_disable_unprepare(ARRAY_SIZE(mali_c55->clks), mali_c55->clks);
> > >  }
> > >
> > > -static int mali_c55_runtime_suspend(struct device *dev)
> > > +static int __maybe_unused mali_c55_runtime_suspend(struct device *dev)
> > >  {
> > >  	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
> > >
> > > @@ -770,7 +770,7 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
> > >  	return 0;
> > >  }
> > >
> > > -static int mali_c55_runtime_resume(struct device *dev)
> > > +static int __maybe_unused mali_c55_runtime_resume(struct device *dev)
> > >  {
> > >  	struct mali_c55 *mali_c55 = dev_get_drvdata(dev);
> > >  	int ret;

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-11-15 20:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14 20:19 [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused Jacopo Mondi
2025-11-14 20:28 ` Dan Scally
2025-11-14 20:45 ` Laurent Pinchart
2025-11-15 18:07   ` Jacopo Mondi
2025-11-15 20:59     ` Laurent Pinchart
2025-11-15  9:54 ` Hans Verkuil
2025-11-15 18:05   ` Jacopo Mondi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox