linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] habanalabs: fix pm manual->auto in GOYA
@ 2020-03-22 14:39 Oded Gabbay
  2020-03-22 19:05 ` Omer Shpigelman
  0 siblings, 1 reply; 2+ messages in thread
From: Oded Gabbay @ 2020-03-22 14:39 UTC (permalink / raw)
  To: linux-kernel, oshpigelman, ttayar; +Cc: gregkh

When moving from manual to automatic power management mode in GOYA, the
driver didn't correctly place the device in LOW power mode. As a result, if
an application was run immediately after the move, it would have run with
low frequencies.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
 drivers/misc/habanalabs/goya/goya_hwmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/habanalabs/goya/goya_hwmgr.c b/drivers/misc/habanalabs/goya/goya_hwmgr.c
index b2ebc01e27f4..cdd4903e48fa 100644
--- a/drivers/misc/habanalabs/goya/goya_hwmgr.c
+++ b/drivers/misc/habanalabs/goya/goya_hwmgr.c
@@ -298,8 +298,8 @@ static ssize_t pm_mng_profile_store(struct device *dev,
 		/* Make sure we are in LOW PLL when changing modes */
 		if (hdev->pm_mng_profile == PM_MANUAL) {
 			hdev->curr_pll_profile = PLL_HIGH;
-			hl_device_set_frequency(hdev, PLL_LOW);
 			hdev->pm_mng_profile = PM_AUTO;
+			hl_device_set_frequency(hdev, PLL_LOW);
 		}
 	} else if (strncmp("manual", buf, strlen("manual")) == 0) {
 		if (hdev->pm_mng_profile == PM_AUTO) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] habanalabs: fix pm manual->auto in GOYA
  2020-03-22 14:39 [PATCH] habanalabs: fix pm manual->auto in GOYA Oded Gabbay
@ 2020-03-22 19:05 ` Omer Shpigelman
  0 siblings, 0 replies; 2+ messages in thread
From: Omer Shpigelman @ 2020-03-22 19:05 UTC (permalink / raw)
  To: Oded Gabbay, linux-kernel, Tomer Tayar; +Cc: gregkh

On Sun, Mar 22, 2020 at 4:39 PM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> When moving from manual to automatic power management mode
> in GOYA, the driver didn't correctly place the device in LOW power
> mode. As a result, if an application was run immediately after the
> move, it would have run with low frequencies.
>
> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>

Reviewed-by: Omer Shpigelman <oshpigelman@habana.ai>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-22 19:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-22 14:39 [PATCH] habanalabs: fix pm manual->auto in GOYA Oded Gabbay
2020-03-22 19:05 ` Omer Shpigelman

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).