Re: [PATCH 2/2] drm/panfrost: add devfreq regulator support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-04-13 3:18 pm, Clément Péron wrote:
Hi Steven,

On Mon, 13 Apr 2020 at 15:18, Steven Price <steven.price@xxxxxxx> wrote:

On 11/04/2020 21:06, Clément Péron wrote:
OPP table can defined both frequency and voltage.

Register the mali regulator if it exist.

Signed-off-by: Clément Péron <peron.clem@xxxxxxxxx>
---
   drivers/gpu/drm/panfrost/panfrost_devfreq.c | 34 ++++++++++++++++++---
   drivers/gpu/drm/panfrost/panfrost_device.h  |  1 +
   2 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 62541f4edd81..2dc8e2355358 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -78,12 +78,26 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
       struct device *dev = &pfdev->pdev->dev;
       struct devfreq *devfreq;
       struct thermal_cooling_device *cooling;
+     const char *mali = "mali";
+     struct opp_table *opp_table = NULL;
+
+     /* Regulator is optional */
+     opp_table = dev_pm_opp_set_regulators(dev, &mali, 1);

This looks like it applies before 3e1399bccf51 ("drm/panfrost: Add
support for multiple regulators") which is currently in drm-misc-next
(and linux-next). You want something more like:

Thanks for you review, indeed I didn't see that multiple regulators
support has been added.
Will update in v2.

Although note that we probably also want a version that can be backported to stable without that dependency, since this behaviour is arguably a regression since 221bc77914cb ("drm/panfrost: Use generic code for devfreq"), and does appear to have been causing subtle problems for users.

Robin.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux