mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Mark Gross <markgross@kernel.org>,
	<platform-driver-x86@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] platform/x86/amd: pmc: Add a check for PMFW version on PS platform
Date: Wed, 1 Mar 2023 09:08:20 -0600	[thread overview]
Message-ID: <20230301150821.9791-2-mario.limonciello@amd.com> (raw)
In-Reply-To: <20230301150821.9791-1-mario.limonciello@amd.com>

When running s2idle on PS if using PMFW older than 76.49.0 we will
trip up some bugs that will lead to freezes outside of the control
of Linux.  Set a guard that we only can enter HW sleep on 76.49.0
or newer for PS.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/platform/x86/amd/pmc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
index c42fa47381c3..e7c6c06b2ccd 100644
--- a/drivers/platform/x86/amd/pmc.c
+++ b/drivers/platform/x86/amd/pmc.c
@@ -778,6 +778,14 @@ static void amd_pmc_s2idle_prepare(void)
 			return;
 		}
 		break;
+	case AMD_CPU_ID_PS:
+		if (!amd_pmc_verify_min_version(pdev, 76, 49)) {
+			dev_warn(pdev->dev,
+				 "hardware sleep unsupported with firmware %u.%u.%u\n",
+				 pdev->major, pdev->minor, pdev->rev);
+			return;
+		}
+		break;
 	}
 
 	msg = amd_pmc_get_os_hint(pdev);
-- 
2.34.1


  reply	other threads:[~2023-03-01 15:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 15:08 [PATCH 1/2] platform/x86/amd: pmc: Add a helper for checking minimum SMU version Mario Limonciello
2023-03-01 15:08 ` Mario Limonciello [this message]
2023-03-01 15:28 ` Hans de Goede
2023-03-01 15:31   ` Limonciello, Mario
2023-03-01 15:49     ` Hans de Goede
2023-03-02  2:39     ` Shyam Sundar S K
2023-03-02  2:42       ` Mario Limonciello
2023-03-02  2:50         ` Shyam Sundar S K
2023-03-02  2:54           ` Mario Limonciello

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=20230301150821.9791-2-mario.limonciello@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@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

all inboxes | Powered by JetHome®