Linux Media Controller development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Cc: hans@jjverkuil.nl, Sakari Ailus <sakari.ailus@linux.intel.com>,
	Dan Scally <dan.scally@ideasonboard.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] media: mali-c55: Mark pm handlers as __maybe_unused
Date: Sat, 15 Nov 2025 22:59:06 +0200	[thread overview]
Message-ID: <20251115205906.GC31986@pendragon.ideasonboard.com> (raw)
In-Reply-To: <f6o5naywg4gc67ww2yi22ybc5pctd3upeyo74vhlvau3sld5rg@2v7baqvvykxn>

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

  reply	other threads:[~2025-11-15 20:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-11-15  9:54 ` Hans Verkuil
2025-11-15 18:05   ` Jacopo Mondi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251115205906.GC31986@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=hans@jjverkuil.nl \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox