linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oded Gabbay <ogabbay@kernel.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 14/16] habanalabs/gaudi: define DC POWER for secured PMC
Date: Wed, 18 Aug 2021 16:39:20 +0300	[thread overview]
Message-ID: <20210818133922.63637-14-ogabbay@kernel.org> (raw)
In-Reply-To: <20210818133922.63637-1-ogabbay@kernel.org>

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 <ogabbay@kernel.org>
---
 drivers/misc/habanalabs/gaudi/gaudi.c  | 6 +++++-
 drivers/misc/habanalabs/gaudi/gaudiP.h | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c
index c8bd76e30679..ba1fcdc16f50 100644
--- a/drivers/misc/habanalabs/gaudi/gaudi.c
+++ b/drivers/misc/habanalabs/gaudi/gaudi.c
@@ -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;
diff --git a/drivers/misc/habanalabs/gaudi/gaudiP.h b/drivers/misc/habanalabs/gaudi/gaudiP.h
index 2f0928c0fa8f..7addb31e3eee 100644
--- a/drivers/misc/habanalabs/gaudi/gaudiP.h
+++ b/drivers/misc/habanalabs/gaudi/gaudiP.h
@@ -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
-- 
2.17.1


  parent reply	other threads:[~2021-08-18 13:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 13:39 [PATCH 01/16] habanalabs/gaudi: scrub HBM to a specific value Oded Gabbay
2021-08-18 13:39 ` [PATCH 02/16] habanalabs/gaudi: move scrubbing to late init Oded Gabbay
2021-08-18 13:39 ` [PATCH 03/16] habanalabs: save pid per userptr Oded Gabbay
2021-08-18 13:39 ` [PATCH 04/16] habanalabs: fix mmu node address resolution in debugfs Oded Gabbay
2021-08-18 13:39 ` [PATCH 05/16] habanalabs/gaudi: minimize number of register reads Oded Gabbay
2021-08-18 13:39 ` [PATCH 06/16] habanalabs: update to latest firmware headers Oded Gabbay
2021-08-18 13:39 ` [PATCH 07/16] habanalabs/gaudi: increase boot fit timeout Oded Gabbay
2021-08-18 13:39 ` [PATCH 08/16] habanalabs/gaudi: restore user registers when context opens Oded Gabbay
2021-08-18 13:39 ` [PATCH 09/16] habanalabs/gaudi: add monitored SOBs to state dump Oded Gabbay
2021-08-18 13:39 ` [PATCH 10/16] habanalabs: modify multi-CS to wait on stream masters Oded Gabbay
2021-08-18 13:39 ` [PATCH 11/16] habanalabs/gaudi: fetch TPC/MME ECC errors from F/W Oded Gabbay
2021-08-18 13:39 ` [PATCH 12/16] habanalabs: add userptr_lookup node in debugfs Oded Gabbay
2021-08-18 13:39 ` [PATCH 13/16] habanalabs/gaudi: unmask out of bounds SLM access interrupt Oded Gabbay
2021-08-18 13:39 ` Oded Gabbay [this message]
2021-08-18 13:39 ` [PATCH 15/16] habanalabs/gaudi: size should be printed in decimal Oded Gabbay
2021-08-18 13:39 ` [PATCH 16/16] habanalabs/gaudi: invalidate PMMU mem cache on init Oded Gabbay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210818133922.63637-14-ogabbay@kernel.org \
    --to=ogabbay@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).