]> git.baikalelectronics.ru Git - kernel.git/commitdiff
habanalabs: set PM profile to auto only for goya
authorOded Gabbay <oded.gabbay@gmail.com>
Sat, 9 May 2020 09:18:26 +0000 (12:18 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 19 May 2020 11:48:41 +0000 (14:48 +0300)
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>
drivers/misc/habanalabs/sysfs.c

index e478a191e5f5c19e42bda97e7acc8fab87cc89ab..36f4f68c8cefa645db2abce4d4281dbd5d7b7aaf 100644 (file)
@@ -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);