From: "Clément Péron" <peron.clem@gmail.com>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Steven Price <steven.price@arm.com>,
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Bjorn Andersson <andersson@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Arnd Bergmann <arnd@arndb.de>,
Marcel Ziswiler <marcel.ziswiler@toradex.com>,
Vinod Koul <vkoul@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Biju Das <biju.das.jz@bp.renesas.com>,
Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
"Clément Péron" <peron.clem@gmail.com>,
"Viresh Kumar" <viresh.kumar@linaro.org>
Subject: [PATCH v3 4/5] drm/panfrost: devfreq: set opp to the recommended one to configure and enable regulator
Date: Mon, 5 Sep 2022 19:16:00 +0200 [thread overview]
Message-ID: <20220905171601.79284-5-peron.clem@gmail.com> (raw)
In-Reply-To: <20220905171601.79284-1-peron.clem@gmail.com>
devm_pm_opp_set_regulators() doesn't enable regulator, which make
regulator framework switching it off during regulator_late_cleanup().
Call dev_pm_opp_set_opp() with the recommend OPP in
panfrost_devfreq_init() to enable the regulator and avoid any switch off
by regulator_late_cleanup().
Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 5110cd9b2425..67b242407156 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -131,6 +131,14 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
return PTR_ERR(opp);
panfrost_devfreq_profile.initial_freq = cur_freq;
+
+ /* Setup and enable regulator */
+ ret = dev_pm_opp_set_opp(dev, opp);
+ if (ret) {
+ DRM_DEV_ERROR(dev, "Couldn't set recommended OPP\n");
+ return ret;
+ }
+
dev_pm_opp_put(opp);
/*
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-09-05 18:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 17:15 [PATCH v3 0/5] Allwinner H6 GPU devfreq Clément Péron
2022-09-05 17:15 ` [PATCH v3 1/5] arm64: defconfig: Enable devfreq cooling device Clément Péron
2022-09-05 17:15 ` [PATCH v3 2/5] arm64: dts: allwinner: h6: Add cooling map for GPU Clément Péron
2022-09-05 17:23 ` Jernej Škrabec
2022-09-05 17:15 ` [PATCH v3 3/5] arm64: dts: allwinner: h6: Add GPU OPP table Clément Péron
2022-09-05 17:16 ` Clément Péron [this message]
2022-09-05 18:17 ` [PATCH v3 4/5] drm/panfrost: devfreq: set opp to the recommended one to configure and enable regulator Biju Das
2022-09-05 19:39 ` Clément Péron
2022-09-06 6:42 ` Biju Das
2022-09-06 7:58 ` Clément Péron
2022-09-06 8:06 ` Biju Das
2022-09-06 8:08 ` Clément Péron
2022-09-06 5:17 ` Viresh Kumar
2022-09-05 17:16 ` [PATCH v3 5/5] arm64: dts: allwinner: beelink-gs1: Enable GPU OPP Clément Péron
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=20220905171601.79284-5-peron.clem@gmail.com \
--to=peron.clem@gmail.com \
--cc=airlied@linux.ie \
--cc=alyssa.rosenzweig@collabora.com \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=biju.das.jz@bp.renesas.com \
--cc=catalin.marinas@arm.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert+renesas@glider.be \
--cc=jernej.skrabec@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=marcel.ziswiler@toradex.com \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=samuel@sholland.org \
--cc=shawnguo@kernel.org \
--cc=steven.price@arm.com \
--cc=tomeu.vizoso@collabora.com \
--cc=viresh.kumar@linaro.org \
--cc=vkoul@kernel.org \
--cc=wens@csie.org \
--cc=will@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).