All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Rain Yang <jiyu.yang@oss.nxp.com>
Cc: imx@lists.linux.dev, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, steven.price@arm.com,
	liviu.dudau@arm.com, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
	simona@ffwll.ch, Rain Yang <jiyu.yang@nxp.com>,
	Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Subject: Re: [PATCH] drm/panthor: attach the driver's multiple power domains
Date: Thu, 9 Oct 2025 16:09:29 +0200	[thread overview]
Message-ID: <20251009160929.1b36b9ea@fedora> (raw)
In-Reply-To: <20251009160820.74f04ead@fedora>

On Thu, 9 Oct 2025 16:08:20 +0200
Boris Brezillon <boris.brezillon@collabora.com> wrote:

> On Thu,  9 Oct 2025 22:00:39 +0800
> Rain Yang <jiyu.yang@oss.nxp.com> wrote:
> 
> > From: Rain Yang <jiyu.yang@nxp.com>
> > 
> > Some platforms, such as i.MX95, utilize multiple power domains that need
> > to be attached explicitly. This patch ensures that the driver properly
> > attaches all available power domains using devm_pm_domain_attach_list().
> > 
> > Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
> > Signed-off-by: Rain Yang <jiyu.yang@nxp.com>
> > ---
> >  drivers/gpu/drm/panthor/panthor_device.c | 6 ++++++
> >  drivers/gpu/drm/panthor/panthor_device.h | 2 ++
> >  2 files changed, 8 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> > index f0b2da5b2b96..6f40d053b16c 100644
> > --- a/drivers/gpu/drm/panthor/panthor_device.c
> > +++ b/drivers/gpu/drm/panthor/panthor_device.c
> > @@ -218,6 +218,12 @@ int panthor_device_init(struct panthor_device *ptdev)
> >  	if (ret)
> >  		return ret;
> >  
> > +	ret = devm_pm_domain_attach_list(ptdev->base.dev, NULL, &ptdev->pd_list);
> > +	if (ret < 0) {
> > +		drm_err(&ptdev->base, "attach power domains failed, ret=%d", ret);
> > +		return ret;
> > +	}
> > +
> >  	ret = panthor_devfreq_init(ptdev);
> >  	if (ret)
> >  		return ret;
> > diff --git a/drivers/gpu/drm/panthor/panthor_device.h b/drivers/gpu/drm/panthor/panthor_device.h
> > index 4fc7cf2aeed5..5ecb541ec67b 100644
> > --- a/drivers/gpu/drm/panthor/panthor_device.h
> > +++ b/drivers/gpu/drm/panthor/panthor_device.h
> > @@ -196,6 +196,8 @@ struct panthor_device {
> >  		/** @recovery_needed: True when a resume attempt failed. */
> >  		atomic_t recovery_needed;
> >  	} pm;  
> 
> Add a blank line here.
> 
> > +	/** @pm: Power management related data. */

Also, the comment is wrong, and it would probably make sense to move
that to the pm sub-struct since this is PM related.

> > +	struct dev_pm_domain_list  *pd_list;
> >    
> 
> Do we even need to keep the pd_list in panthor_device if we don't do
> anything with it?
> 
> >  	/** @profile_mask: User-set profiling flags for job accounting. */
> >  	u32 profile_mask;  
> 


  reply	other threads:[~2025-10-09 14:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09 14:00 [PATCH] drm/panthor: attach the driver's multiple power domains Rain Yang
2025-10-09 14:08 ` Boris Brezillon
2025-10-09 14:09   ` Boris Brezillon [this message]
2025-10-09 15:06     ` Rain Yang
2025-10-09 15:23       ` Boris Brezillon
2025-10-10  9:14         ` Rain Yang
2025-10-10  9:31           ` Boris Brezillon

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=20251009160929.1b36b9ea@fedora \
    --to=boris.brezillon@collabora.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imx@lists.linux.dev \
    --cc=jiyu.yang@nxp.com \
    --cc=jiyu.yang@oss.nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=prabhu.sundararaj@nxp.com \
    --cc=simona@ffwll.ch \
    --cc=steven.price@arm.com \
    --cc=tzimmermann@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.