Skip to content

Commit

Permalink
habanalabs/gaudi: define DC POWER for secured PMC
Browse files Browse the repository at this point in the history
In secured mode, the CGM is disabled. Therefore, the DC power is
higher. Without taking it into consideration, the utilization is
12-15% at idle.

Signed-off-by: Oded Gabbay <[email protected]>
  • Loading branch information
ogabbay committed Sep 1, 2021
1 parent 83d93e2 commit da105e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/misc/habanalabs/gaudi/gaudi.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,11 @@ static inline void set_default_power_values(struct hl_device *hdev)

if (hdev->card_type == cpucp_card_type_pmc) {
prop->max_power_default = MAX_POWER_DEFAULT_PMC;
prop->dc_power_default = DC_POWER_DEFAULT_PMC;

if (prop->fw_security_enabled)
prop->dc_power_default = DC_POWER_DEFAULT_PMC_SEC;
else
prop->dc_power_default = DC_POWER_DEFAULT_PMC;
} else {
prop->max_power_default = MAX_POWER_DEFAULT_PCI;
prop->dc_power_default = DC_POWER_DEFAULT_PCI;
Expand Down
2 changes: 2 additions & 0 deletions drivers/misc/habanalabs/gaudi/gaudiP.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
#define DC_POWER_DEFAULT_PCI 60000 /* 60W */
#define DC_POWER_DEFAULT_PMC 60000 /* 60W */

#define DC_POWER_DEFAULT_PMC_SEC 97000 /* 97W */

#define GAUDI_CPU_TIMEOUT_USEC 30000000 /* 30s */

#define TPC_ENABLED_MASK 0xFF
Expand Down

0 comments on commit da105e6

Please sign in to comment.