All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@gmail.com>
To: linux-kernel@vger.kernel.org, oshpigelman@habana.ai,
	ttayar@habana.ai, gregkh@linuxfoundation.org
Subject: [PATCH 02/11] habanalabs: set PM profile to auto only for goya
Date: Mon, 11 May 2020 14:32:23 +0300	[thread overview]
Message-ID: <20200511113232.5771-3-oded.gabbay@gmail.com> (raw)
In-Reply-To: <20200511113232.5771-1-oded.gabbay@gmail.com>

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 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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);
-- 
2.17.1


  parent reply	other threads:[~2020-05-11 11:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 11:32 [PATCH 00/11] Adding GAUDI ASIC support to habanalabs driver Oded Gabbay
2020-05-11 11:32 ` [PATCH 01/11] habanalabs: add dedicated define for hard reset Oded Gabbay
2020-05-11 11:32 ` Oded Gabbay [this message]
2020-05-11 11:32 ` [PATCH 03/11] habanalabs: support clock gating enable/disable Oded Gabbay
2020-05-11 11:32 ` [PATCH 04/11] habanalabs: get card type, location from F/W Oded Gabbay
2020-05-11 11:32 ` [PATCH 06/11] uapi: habanalabs: add gaudi defines Oded Gabbay
2020-05-11 11:32 ` [PATCH 07/11] habanalabs: add gaudi asic-dependent code Oded Gabbay
2020-05-11 11:32 ` [PATCH 08/11] habanalabs: add hwmgr module for gaudi Oded Gabbay
2020-05-11 11:32 ` [PATCH 09/11] habanalabs: add gaudi security module Oded Gabbay
2020-05-11 11:32 ` [PATCH 10/11] habanalabs: add gaudi profiler module Oded Gabbay
2020-05-11 11:32 ` [PATCH 11/11] habanalabs: enable gaudi code in driver 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=20200511113232.5771-3-oded.gabbay@gmail.com \
    --to=oded.gabbay@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oshpigelman@habana.ai \
    --cc=ttayar@habana.ai \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.