summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2020-05-09 12:18:26 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2020-05-19 14:48:41 +0300
commit803917f960c2a34d16fb0aa6debb80fed59a58b7 (patch)
tree882413ca5eeb3560a7db7fe02cd25b24e5133dd0 /drivers/misc/habanalabs
parente09498b078f85bbad8eccb665786bea847af93d4 (diff)
downloadlinux-803917f960c2a34d16fb0aa6debb80fed59a58b7.tar.xz
habanalabs: set PM profile to auto only for goya
For Gaudi, the driver doesn't change the PM profile automatically due to device-controlled PM capabilities. Therefore, set the PM profile to auto only for Goya so the driver's code to automatically change the profile won't run on Gaudi. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs')
-rw-r--r--drivers/misc/habanalabs/sysfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/sysfs.c b/drivers/misc/habanalabs/sysfs.c
index e478a191e5f5..36f4f68c8cef 100644
--- a/drivers/misc/habanalabs/sysfs.c
+++ b/drivers/misc/habanalabs/sysfs.c
@@ -410,7 +410,10 @@ int hl_sysfs_init(struct hl_device *hdev)
{
int rc;
- hdev->pm_mng_profile = PM_AUTO;
+ if (hdev->asic_type == ASIC_GOYA)
+ hdev->pm_mng_profile = PM_AUTO;
+ else
+ hdev->pm_mng_profile = PM_MANUAL;
hdev->max_power = hdev->asic_prop.max_power_default;
hdev->asic_funcs->add_device_attr(hdev, &hl_dev_clks_attr_group);