[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200221194731.13814-5-lukasz.luba@arm.com>
Date: Fri, 21 Feb 2020 19:47:31 +0000
From: Lukasz Luba <lukasz.luba@....com>
To: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
dri-devel@...ts.freedesktop.org, linux-omap@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
linux-imx@....com
Cc: Morten.Rasmussen@....com, Dietmar.Eggemann@....com,
javi.merino@....com, cw00.choi@...sung.com,
b.zolnierkie@...sung.com, rjw@...ysocki.net, sudeep.holla@....com,
viresh.kumar@...aro.org, nm@...com, sboyd@...nel.org,
rui.zhang@...el.com, amit.kucheria@...durent.com,
daniel.lezcano@...aro.org, mingo@...hat.com, peterz@...radead.org,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
rostedt@...dmis.org, qperret@...gle.com, bsegall@...gle.com,
mgorman@...e.de, shawnguo@...nel.org, s.hauer@...gutronix.de,
festevam@...il.com, kernel@...gutronix.de, khilman@...nel.org,
agross@...nel.org, bjorn.andersson@...aro.org, robh@...nel.org,
matthias.bgg@...il.com, steven.price@....com,
tomeu.vizoso@...labora.com, alyssa.rosenzweig@...labora.com,
airlied@...ux.ie, daniel@...ll.ch, liviu.dudau@....com,
lorenzo.pieralisi@....com, lukasz.luba@....com,
patrick.bellasi@...bug.net, orjan.eide@....com
Subject: [PATCH v3 4/4] drm/panfrost: Register to the Energy Model with devfreq device
Add device to the Energy Model framework. It will create a dedicated
and unified data structures used i.e. in the thermal framework.
The power model used in dev_pm_opp subsystem is simplified and created
based on DT 'dynamic-power-coefficient', volatage and frequency. It is
similar to the CPU model used in Energy Aware Scheduler.
Signed-off-by: Lukasz Luba <lukasz.luba@....com>
---
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 413987038fbf..d527a5113950 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -105,6 +105,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
}
pfdev->devfreq.devfreq = devfreq;
+ dev_pm_opp_of_register_em(dev, NULL);
+
cooling = of_devfreq_cooling_register(dev->of_node, devfreq);
if (IS_ERR(cooling))
DRM_DEV_INFO(dev, "Failed to register cooling device\n");
@@ -118,6 +120,7 @@ void panfrost_devfreq_fini(struct panfrost_device *pfdev)
{
if (pfdev->devfreq.cooling)
devfreq_cooling_unregister(pfdev->devfreq.cooling);
+ dev_pm_opp_of_unregister_em(&pfdev->pdev->dev);
dev_pm_opp_of_remove_table(&pfdev->pdev->dev);
}
--
2.17.1
Powered by blists - more mailing lists