From: Rain Yang <[email protected]> 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 <[email protected]> Signed-off-by: Prabhu Sundararaj <[email protected]> Signed-off-by: Rain Yang <[email protected]> --- drivers/gpu/drm/panthor/panthor_device.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c index f0b2da5b2b96..fbbc84e9efbe 100644 --- a/drivers/gpu/drm/panthor/panthor_device.c +++ b/drivers/gpu/drm/panthor/panthor_device.c @@ -167,6 +167,7 @@ static void panthor_device_free_page(struct drm_device *ddev, void *data) int panthor_device_init(struct panthor_device *ptdev) { u32 *dummy_page_virt; + struct dev_pm_domain_list *pd_list = NULL; struct resource *res; struct page *p; int ret; @@ -218,6 +219,12 @@ int panthor_device_init(struct panthor_device *ptdev) if (ret) return ret; + ret = devm_pm_domain_attach_list(ptdev->base.dev, NULL, &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; -- 2.39.5
