summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/goya/goya_hwmgr.c
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2020-03-22 16:30:00 +0200
committerOded Gabbay <oded.gabbay@gmail.com>2020-03-24 10:54:17 +0200
commit1184550155013f2672198c4c68f3a6961fccab09 (patch)
treebfebc9c7dd827d10e681650ca8e1d8ca5eb28c5e /drivers/misc/habanalabs/goya/goya_hwmgr.c
parent6966d9e1f2a4fc5cf090061220a77b4815525d50 (diff)
habanalabs: fix pm manual->auto in GOYA
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. Reviewed-by: Omer Shpigelman <oshpigelman@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs/goya/goya_hwmgr.c')
-rw-r--r--drivers/misc/habanalabs/goya/goya_hwmgr.c2
1 files changed, 1 insertions, 1 deletions
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) {