Blob Blame History Raw
From 631b54519e8e58758e4541756c1818dcebd2dcc9 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <mario.limonciello@amd.com>
Date: Wed, 21 Sep 2022 15:40:54 -0500
Subject: [PATCH] ACPI: x86: s2idle: Add a quirk for ASUSTeK COMPUTER INC. ROG Flow X13
Git-commit: 631b54519e8e58758e4541756c1818dcebd2dcc9
Patch-mainline: v6.1-rc1
References: bsc#1206224

ASUSTeK COMPUTER INC. ROG Flow X13 has a problem with fans upon wakeup from
s2idle. In examining the ASL, functions 3 and 4 are not called in the AMD
codepath but only in the Microsoft codepath.

Add the system to the quirk list to force Microsoft codepath.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2148
Tested-by: short-circuit <davidedp91@gmail.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/acpi/x86/s2idle.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index c811eeed42cd..eedd21d8a284 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -440,6 +440,17 @@ static const struct dmi_system_id s2idle_dmi_table[] __initconst = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "82"),
 		},
 	},
+	{
+		/*
+		 * ASUSTeK COMPUTER INC. ROG Flow X13 GV301RE_GV301RE
+		 * https://gitlab.freedesktop.org/drm/amd/-/issues/2148
+		 */
+		.callback = lps0_prefer_microsoft,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "ROG Flow X13 GV301"),
+		},
+	},
 	{}
 };
 
-- 
2.35.3