[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aQOEIdRM2yk0JhLt@e110455-lin.cambridge.arm.com>
Date: Thu, 30 Oct 2025 15:28:33 +0000
From: Liviu Dudau <liviu.dudau@....com>
To: Rain Yang <jiyu.yang@....nxp.com>
Cc: imx@...ts.linux.dev, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, boris.brezillon@...labora.com,
steven.price@....com, maarten.lankhorst@...ux.intel.com,
mripard@...nel.org, tzimmermann@...e.de, airlied@...il.com,
simona@...ll.ch, xianzhong.li@....com,
Rain Yang <jiyu.yang@....com>,
Prabhu Sundararaj <prabhu.sundararaj@....com>
Subject: Re: [PATCH v3] drm/panthor: attach the driver's multiple power
domains
On Wed, Oct 22, 2025 at 05:26:04PM +0800, Rain Yang wrote:
> From: Rain Yang <jiyu.yang@....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().
>
> Suggested-by: Boris Brezillon <boris.brezillon@...labora.com>
> Suggested-by: Steven Price <steven.price@....com>
> Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@....com>
> Signed-off-by: Rain Yang <jiyu.yang@....com>
Reviewed-by: Liviu Dudau <liviu.dudau@....com>
Best regards,
Liviu
> ---
> drivers/gpu/drm/panthor/panthor_device.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> index f0b2da5b2b96..c39b9812eaa7 100644
> --- a/drivers/gpu/drm/panthor/panthor_device.c
> +++ b/drivers/gpu/drm/panthor/panthor_device.c
> @@ -64,6 +64,16 @@ static int panthor_clk_init(struct panthor_device *ptdev)
> return 0;
> }
>
> +static int panthor_init_power(struct device *dev)
> +{
> + struct dev_pm_domain_list *pd_list = NULL;
> +
> + if (dev->pm_domain)
> + return 0;
> +
> + return devm_pm_domain_attach_list(dev, NULL, &pd_list);
> +}
> +
> void panthor_device_unplug(struct panthor_device *ptdev)
> {
> /* This function can be called from two different path: the reset work
> @@ -218,6 +228,12 @@ int panthor_device_init(struct panthor_device *ptdev)
> if (ret)
> return ret;
>
> + ret = panthor_init_power(ptdev->base.dev);
> + if (ret < 0) {
> + drm_err(&ptdev->base, "init power domains failed, ret=%d", ret);
> + return ret;
> + }
> +
> ret = panthor_devfreq_init(ptdev);
> if (ret)
> return ret;
> --
> 2.39.5
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
Powered by blists - more mailing lists