Use different sysfs for soc_pstate and xmgi_plpd

The sysfs is changed to use the pm_policy folder with multiple
dpm_policy files.

Change-Id: I40fac8de2d0cb127950d238b8196f6d2416778d0
This commit is contained in:
Maisam Arif
2024-05-23 10:31:37 -05:00
کامیت شده توسط Maisam Arif
والد 80eeff3dd4
کامیت e5d1ba4621
16فایلهای تغییر یافته به همراه219 افزوده شده و 157 حذف شده
+6 -6
مشاهده پرونده
@@ -2747,7 +2747,7 @@ except AmdSmiException as e:
print(e)
```
### amdsmi_get_dpm_policy
### amdsmi_get_soc_pstate
Description: Get dpm policy information.
@@ -2764,7 +2764,7 @@ Field | Description
`current_id` | current policy id
`policies` | list of dictionaries containing possible policies
Exceptions that can be thrown by `amdsmi_get_dpm_policy` function:
Exceptions that can be thrown by `amdsmi_get_soc_pstate` function:
* `AmdSmiLibraryException`
* `AmdSmiRetryException`
@@ -2779,13 +2779,13 @@ try:
print("No GPUs on machine")
else:
for device in devices:
dpm_policies = amdsmi_get_dpm_policy(device)
dpm_policies = amdsmi_get_soc_pstate(device)
print(dpm_policies)
except AmdSmiException as e:
print(e)
```
### amdsmi_set_dpm_policy
### amdsmi_set_soc_pstate
Description: Set the dpm policy to corresponding policy_id. Typically following: 0(default),1,2,3
@@ -2796,7 +2796,7 @@ Input parameters:
Output: None
Exceptions that can be thrown by `amdsmi_set_dpm_policy` function:
Exceptions that can be thrown by `amdsmi_set_soc_pstate` function:
* `AmdSmiLibraryException`
* `AmdSmiRetryException`
@@ -2811,7 +2811,7 @@ try:
print("No GPUs on machine")
else:
for device in devices:
amdsmi_set_dpm_policy(device, 0)
amdsmi_set_soc_pstate(device, 0)
except AmdSmiException as e:
print(e)
```