* [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1
@ 2023-12-12 4:50 Mario Limonciello
2023-12-12 4:50 ` [PATCH 1/4] platform/x86/amd/pmc: Move platform defines to header Mario Limonciello
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Mario Limonciello @ 2023-12-12 4:50 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen
Cc: open list:X86 PLATFORM DRIVERS, Shyam Sundar S K, Goswami Sanket,
Mario Limonciello
The 13" Framework laptop EC emits a spurious keyboard interrupt on every
resume from hardware sleep. When a user closes the lid on an already
suspended system this causes the system to wake up.
This series adjusts the previous Cezanne quirk (which has a much different
root cause) to be able to apply to other systems too. The Framework 13"
system is added to the list it will apply to.
Mario Limonciello (4):
platform/x86/amd/pmc: Move platform defines to header
platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne
platform/x86/amd/pmc: Move keyboard wakeup disablement detection to
pmc-quirks
platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13
drivers/platform/x86/amd/pmc/pmc-quirks.c | 20 ++++++++++++++
drivers/platform/x86/amd/pmc/pmc.c | 33 +++++++++--------------
drivers/platform/x86/amd/pmc/pmc.h | 12 +++++++++
3 files changed, 45 insertions(+), 20 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/4] platform/x86/amd/pmc: Move platform defines to header
2023-12-12 4:50 [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Mario Limonciello
@ 2023-12-12 4:50 ` Mario Limonciello
2023-12-12 4:50 ` [PATCH 2/4] platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne Mario Limonciello
` (4 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Mario Limonciello @ 2023-12-12 4:50 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen
Cc: open list:X86 PLATFORM DRIVERS, Shyam Sundar S K, Goswami Sanket,
Mario Limonciello
The platform defines will be used by the quirks in the future,
so move them to the common header to allow use by both source
files.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/platform/x86/amd/pmc/pmc.c | 10 ----------
drivers/platform/x86/amd/pmc/pmc.h | 11 +++++++++++
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index c3104714b480..666cc6e98267 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -91,16 +91,6 @@
#define SMU_MSG_LOG_RESET 0x07
#define SMU_MSG_LOG_DUMP_DATA 0x08
#define SMU_MSG_GET_SUP_CONSTRAINTS 0x09
-/* List of supported CPU ids */
-#define AMD_CPU_ID_RV 0x15D0
-#define AMD_CPU_ID_RN 0x1630
-#define AMD_CPU_ID_PCO AMD_CPU_ID_RV
-#define AMD_CPU_ID_CZN AMD_CPU_ID_RN
-#define AMD_CPU_ID_YC 0x14B5
-#define AMD_CPU_ID_CB 0x14D8
-#define AMD_CPU_ID_PS 0x14E8
-#define AMD_CPU_ID_SP 0x14A4
-#define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507
#define PMC_MSG_DELAY_MIN_US 50
#define RESPONSE_REGISTER_LOOP_MAX 20000
diff --git a/drivers/platform/x86/amd/pmc/pmc.h b/drivers/platform/x86/amd/pmc/pmc.h
index c27bd6a5642f..a85c235247d3 100644
--- a/drivers/platform/x86/amd/pmc/pmc.h
+++ b/drivers/platform/x86/amd/pmc/pmc.h
@@ -41,4 +41,15 @@ struct amd_pmc_dev {
void amd_pmc_process_restore_quirks(struct amd_pmc_dev *dev);
void amd_pmc_quirks_init(struct amd_pmc_dev *dev);
+/* List of supported CPU ids */
+#define AMD_CPU_ID_RV 0x15D0
+#define AMD_CPU_ID_RN 0x1630
+#define AMD_CPU_ID_PCO AMD_CPU_ID_RV
+#define AMD_CPU_ID_CZN AMD_CPU_ID_RN
+#define AMD_CPU_ID_YC 0x14B5
+#define AMD_CPU_ID_CB 0x14D8
+#define AMD_CPU_ID_PS 0x14E8
+#define AMD_CPU_ID_SP 0x14A4
+#define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507
+
#endif /* PMC_H */
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/4] platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne
2023-12-12 4:50 [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Mario Limonciello
2023-12-12 4:50 ` [PATCH 1/4] platform/x86/amd/pmc: Move platform defines to header Mario Limonciello
@ 2023-12-12 4:50 ` Mario Limonciello
2023-12-18 12:59 ` Ilpo Järvinen
2023-12-12 4:50 ` [PATCH 3/4] platform/x86/amd/pmc: Move keyboard wakeup disablement detection to pmc-quirks Mario Limonciello
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Mario Limonciello @ 2023-12-12 4:50 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen
Cc: open list:X86 PLATFORM DRIVERS, Shyam Sundar S K, Goswami Sanket,
Mario Limonciello
amd_pmc_wa_czn_irq1() only runs on Cezanne platforms currently but
may be extended to other platforms in the future. Rename the function
and only check platform firmware version when it's called for a Cezanne
based platform.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/platform/x86/amd/pmc/pmc.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index 666cc6e98267..824673a8673e 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -756,19 +756,22 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
return -EINVAL;
}
-static int amd_pmc_czn_wa_irq1(struct amd_pmc_dev *pdev)
+static int amd_pmc_wa_irq1(struct amd_pmc_dev *pdev)
{
struct device *d;
int rc;
- if (!pdev->major) {
- rc = amd_pmc_get_smu_version(pdev);
- if (rc)
- return rc;
- }
+ /* cezanne platform firmware has a fix in 64.66.0 */
+ if (pdev->cpu_id == AMD_CPU_ID_CZN) {
+ if (!pdev->major) {
+ rc = amd_pmc_get_smu_version(pdev);
+ if (rc)
+ return rc;
+ }
- if (pdev->major > 64 || (pdev->major == 64 && pdev->minor > 65))
- return 0;
+ if (pdev->major > 64 || (pdev->major == 64 && pdev->minor > 65))
+ return 0;
+ }
d = bus_find_device_by_name(&serio_bus, NULL, "serio0");
if (!d)
@@ -928,7 +931,7 @@ static int amd_pmc_suspend_handler(struct device *dev)
struct amd_pmc_dev *pdev = dev_get_drvdata(dev);
if (pdev->cpu_id == AMD_CPU_ID_CZN && !disable_workarounds) {
- int rc = amd_pmc_czn_wa_irq1(pdev);
+ int rc = amd_pmc_wa_irq1(pdev);
if (rc) {
dev_err(pdev->dev, "failed to adjust keyboard wakeup: %d\n", rc);
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/4] platform/x86/amd/pmc: Move keyboard wakeup disablement detection to pmc-quirks
2023-12-12 4:50 [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Mario Limonciello
2023-12-12 4:50 ` [PATCH 1/4] platform/x86/amd/pmc: Move platform defines to header Mario Limonciello
2023-12-12 4:50 ` [PATCH 2/4] platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne Mario Limonciello
@ 2023-12-12 4:50 ` Mario Limonciello
2023-12-12 4:50 ` [PATCH 4/4] platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13 Mario Limonciello
` (2 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Mario Limonciello @ 2023-12-12 4:50 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen
Cc: open list:X86 PLATFORM DRIVERS, Shyam Sundar S K, Goswami Sanket,
Mario Limonciello
Other platforms may need to disable keyboard wakeup besides Cezanne,
so move the detection into amd_pmc_quirks_init() where it may be applied
to multiple platforms.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/platform/x86/amd/pmc/pmc-quirks.c | 3 +++
drivers/platform/x86/amd/pmc/pmc.c | 2 +-
drivers/platform/x86/amd/pmc/pmc.h | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c
index 6bbffb081053..c32046dfa960 100644
--- a/drivers/platform/x86/amd/pmc/pmc-quirks.c
+++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c
@@ -235,6 +235,9 @@ void amd_pmc_quirks_init(struct amd_pmc_dev *dev)
{
const struct dmi_system_id *dmi_id;
+ if (dev->cpu_id == AMD_CPU_ID_CZN)
+ dev->disable_8042_wakeup = true;
+
dmi_id = dmi_first_match(fwbug_list);
if (!dmi_id)
return;
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index 824673a8673e..864c8cc2f8a3 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -930,7 +930,7 @@ static int amd_pmc_suspend_handler(struct device *dev)
{
struct amd_pmc_dev *pdev = dev_get_drvdata(dev);
- if (pdev->cpu_id == AMD_CPU_ID_CZN && !disable_workarounds) {
+ if (pdev->disable_8042_wakeup && !disable_workarounds) {
int rc = amd_pmc_wa_irq1(pdev);
if (rc) {
diff --git a/drivers/platform/x86/amd/pmc/pmc.h b/drivers/platform/x86/amd/pmc/pmc.h
index a85c235247d3..b4794f118739 100644
--- a/drivers/platform/x86/amd/pmc/pmc.h
+++ b/drivers/platform/x86/amd/pmc/pmc.h
@@ -36,6 +36,7 @@ struct amd_pmc_dev {
struct mutex lock; /* generic mutex lock */
struct dentry *dbgfs_dir;
struct quirk_entry *quirks;
+ bool disable_8042_wakeup;
};
void amd_pmc_process_restore_quirks(struct amd_pmc_dev *dev);
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/4] platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13
2023-12-12 4:50 [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Mario Limonciello
` (2 preceding siblings ...)
2023-12-12 4:50 ` [PATCH 3/4] platform/x86/amd/pmc: Move keyboard wakeup disablement detection to pmc-quirks Mario Limonciello
@ 2023-12-12 4:50 ` Mario Limonciello
2023-12-12 20:19 ` [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Thomas Weißschuh
2023-12-18 13:10 ` Ilpo Järvinen
5 siblings, 0 replies; 12+ messages in thread
From: Mario Limonciello @ 2023-12-12 4:50 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen
Cc: open list:X86 PLATFORM DRIVERS, Shyam Sundar S K, Goswami Sanket,
Mario Limonciello, Kieran Levin
The Laptop 13 (AMD Ryzen 7040Series) BIOS 03.03 has a workaround
included in the EC firmware that will cause the EC to emit a "spurious"
keypress during the resume from s0i3 [1].
This series of keypress events can be observed in the kernel log on
resume.
```
atkbd serio0: Unknown key pressed (translated set 2, code 0x6b on isa0060/serio0).
atkbd serio0: Use 'setkeycodes 6b <keycode>' to make it known.
atkbd serio0: Unknown key released (translated set 2, code 0x6b on isa0060/serio0).
atkbd serio0: Use 'setkeycodes 6b <keycode>' to make it known.
```
In some user flows this is harmless, but if a user has specifically
suspended the laptop and then closed the lid it will cause the laptop
to wakeup. The laptop wakes up because the ACPI SCI triggers when
the lid is closed and when the kernel sees that IRQ1 is "also" active.
The kernel can't distinguish from a real keyboard keypress and wakes the
system.
Add the model into the list of quirks to disable keyboard wakeup source.
This is intentionally only matching the production BIOS version in hopes
that a newer EC firmware included in a newer BIOS can avoid this behavior.
Cc: Kieran Levin <ktl@framework.net>
Link: https://github.com/FrameworkComputer/EmbeddedController/blob/lotus-zephyr/zephyr/program/lotus/azalea/src/power_sequence.c#L313 [1]
Link: https://community.frame.work/t/amd-wont-sleep-properly/41755
Link: https://community.frame.work/t/tracking-framework-amd-ryzen-7040-series-lid-wakeup-behavior-feedback/39128
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/platform/x86/amd/pmc/pmc-quirks.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c
index c32046dfa960..b456370166b6 100644
--- a/drivers/platform/x86/amd/pmc/pmc-quirks.c
+++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c
@@ -16,12 +16,17 @@
struct quirk_entry {
u32 s2idle_bug_mmio;
+ bool spurious_8042;
};
static struct quirk_entry quirk_s2idle_bug = {
.s2idle_bug_mmio = 0xfed80380,
};
+static struct quirk_entry quirk_spurious_8042 = {
+ .spurious_8042 = true,
+};
+
static const struct dmi_system_id fwbug_list[] = {
{
.ident = "L14 Gen2 AMD",
@@ -193,6 +198,16 @@ static const struct dmi_system_id fwbug_list[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "HP Laptop 15s-eq2xxx"),
}
},
+ /* https://community.frame.work/t/tracking-framework-amd-ryzen-7040-series-lid-wakeup-behavior-feedback/39128 */
+ {
+ .ident = "Framework Laptop 13 (Phoenix)",
+ .driver_data = &quirk_spurious_8042,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Framework"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Laptop 13 (AMD Ryzen 7040Series)"),
+ DMI_MATCH(DMI_BIOS_VERSION, "03.03"),
+ }
+ },
{}
};
@@ -245,4 +260,6 @@ void amd_pmc_quirks_init(struct amd_pmc_dev *dev)
if (dev->quirks->s2idle_bug_mmio)
pr_info("Using s2idle quirk to avoid %s platform firmware bug\n",
dmi_id->ident);
+ if (dev->quirks->spurious_8042)
+ dev->disable_8042_wakeup = true;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1
2023-12-12 4:50 [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Mario Limonciello
` (3 preceding siblings ...)
2023-12-12 4:50 ` [PATCH 4/4] platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13 Mario Limonciello
@ 2023-12-12 20:19 ` Thomas Weißschuh
2023-12-18 12:11 ` Hans de Goede
2023-12-18 13:10 ` Ilpo Järvinen
5 siblings, 1 reply; 12+ messages in thread
From: Thomas Weißschuh @ 2023-12-12 20:19 UTC (permalink / raw)
To: Mario Limonciello
Cc: Hans de Goede, Ilpo Järvinen,
open list:X86 PLATFORM DRIVERS, Shyam Sundar S K, Goswami Sanket
On 2023-12-11 22:50:02-0600, Mario Limonciello wrote:
> The 13" Framework laptop EC emits a spurious keyboard interrupt on every
> resume from hardware sleep. When a user closes the lid on an already
> suspended system this causes the system to wake up.
>
> This series adjusts the previous Cezanne quirk (which has a much different
> root cause) to be able to apply to other systems too. The Framework 13"
> system is added to the list it will apply to.
>
> Mario Limonciello (4):
> platform/x86/amd/pmc: Move platform defines to header
> platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne
> platform/x86/amd/pmc: Move keyboard wakeup disablement detection to
> pmc-quirks
> platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13
>
> drivers/platform/x86/amd/pmc/pmc-quirks.c | 20 ++++++++++++++
> drivers/platform/x86/amd/pmc/pmc.c | 33 +++++++++--------------
> drivers/platform/x86/amd/pmc/pmc.h | 12 +++++++++
> 3 files changed, 45 insertions(+), 20 deletions(-)
For the full series:
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Thomas Weißschuh <linux@weissschuh.net> # on AMD Framework 13
The device now only wakes up when opening the lid.
Thanks,
Thomas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1
2023-12-12 20:19 ` [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Thomas Weißschuh
@ 2023-12-18 12:11 ` Hans de Goede
2023-12-18 12:42 ` Ilpo Järvinen
0 siblings, 1 reply; 12+ messages in thread
From: Hans de Goede @ 2023-12-18 12:11 UTC (permalink / raw)
To: Thomas Weißschuh, Mario Limonciello, Ilpo Järvinen
Cc: open list:X86 PLATFORM DRIVERS, Shyam Sundar S K, Goswami Sanket
Hi All,
On 12/12/23 21:19, Thomas Weißschuh wrote:
> On 2023-12-11 22:50:02-0600, Mario Limonciello wrote:
>> The 13" Framework laptop EC emits a spurious keyboard interrupt on every
>> resume from hardware sleep. When a user closes the lid on an already
>> suspended system this causes the system to wake up.
>>
>> This series adjusts the previous Cezanne quirk (which has a much different
>> root cause) to be able to apply to other systems too. The Framework 13"
>> system is added to the list it will apply to.
>>
>> Mario Limonciello (4):
>> platform/x86/amd/pmc: Move platform defines to header
>> platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne
>> platform/x86/amd/pmc: Move keyboard wakeup disablement detection to
>> pmc-quirks
>> platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13
>>
>> drivers/platform/x86/amd/pmc/pmc-quirks.c | 20 ++++++++++++++
>> drivers/platform/x86/amd/pmc/pmc.c | 33 +++++++++--------------
>> drivers/platform/x86/amd/pmc/pmc.h | 12 +++++++++
>> 3 files changed, 45 insertions(+), 20 deletions(-)
>
> For the full series:
>
> Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
> Tested-by: Thomas Weißschuh <linux@weissschuh.net> # on AMD Framework 13
>
> The device now only wakes up when opening the lid.
Thomas, thank you for the review and testing.
The series looks good to me too:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Ilpo, do you plan on sending out one more fixes pull-req for 6.7
and if yes, can you add this series to that; or shall I merge
this into for-next so that it gets included in 6.8-rc1 ?
Regards,
Hans
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1
2023-12-18 12:11 ` Hans de Goede
@ 2023-12-18 12:42 ` Ilpo Järvinen
2023-12-18 13:25 ` Hans de Goede
0 siblings, 1 reply; 12+ messages in thread
From: Ilpo Järvinen @ 2023-12-18 12:42 UTC (permalink / raw)
To: Hans de Goede
Cc: Thomas Weißschuh, Mario Limonciello,
open list:X86 PLATFORM DRIVERS, Shyam Sundar S K, Goswami Sanket
[-- Attachment #1: Type: text/plain, Size: 2125 bytes --]
On Mon, 18 Dec 2023, Hans de Goede wrote:
> On 12/12/23 21:19, Thomas Weißschuh wrote:
> > On 2023-12-11 22:50:02-0600, Mario Limonciello wrote:
> >> The 13" Framework laptop EC emits a spurious keyboard interrupt on every
> >> resume from hardware sleep. When a user closes the lid on an already
> >> suspended system this causes the system to wake up.
> >>
> >> This series adjusts the previous Cezanne quirk (which has a much different
> >> root cause) to be able to apply to other systems too. The Framework 13"
> >> system is added to the list it will apply to.
> >>
> >> Mario Limonciello (4):
> >> platform/x86/amd/pmc: Move platform defines to header
> >> platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne
> >> platform/x86/amd/pmc: Move keyboard wakeup disablement detection to
> >> pmc-quirks
> >> platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13
> >>
> >> drivers/platform/x86/amd/pmc/pmc-quirks.c | 20 ++++++++++++++
> >> drivers/platform/x86/amd/pmc/pmc.c | 33 +++++++++--------------
> >> drivers/platform/x86/amd/pmc/pmc.h | 12 +++++++++
> >> 3 files changed, 45 insertions(+), 20 deletions(-)
> >
> > For the full series:
> >
> > Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
> > Tested-by: Thomas Weißschuh <linux@weissschuh.net> # on AMD Framework 13
> >
> > The device now only wakes up when opening the lid.
>
> Thomas, thank you for the review and testing.
>
> The series looks good to me too:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>
> Ilpo, do you plan on sending out one more fixes pull-req for 6.7
> and if yes, can you add this series to that; or shall I merge
> this into for-next so that it gets included in 6.8-rc1 ?
I was thinking not to but that was because I for some reason had missed
this series in the pending queue over the entire last week.
So I'll make make more pr taking this series, the thinkpad fan thing and
1/2 intel pmc fix, 2/2 intel pmc is for material that is in next only.
Hopefully LKP cooperates slightly better this week than it has been over
the last month :-).
--
i.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne
2023-12-12 4:50 ` [PATCH 2/4] platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne Mario Limonciello
@ 2023-12-18 12:59 ` Ilpo Järvinen
2023-12-18 13:01 ` Ilpo Järvinen
0 siblings, 1 reply; 12+ messages in thread
From: Ilpo Järvinen @ 2023-12-18 12:59 UTC (permalink / raw)
To: Mario Limonciello
Cc: Hans de Goede, open list:X86 PLATFORM DRIVERS, Shyam Sundar S K,
Goswami Sanket
On Mon, 11 Dec 2023, Mario Limonciello wrote:
> amd_pmc_wa_czn_irq1() only runs on Cezanne platforms currently but
> may be extended to other platforms in the future. Rename the function
> and only check platform firmware version when it's called for a Cezanne
> based platform.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> drivers/platform/x86/amd/pmc/pmc.c | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
> index 666cc6e98267..824673a8673e 100644
> --- a/drivers/platform/x86/amd/pmc/pmc.c
> +++ b/drivers/platform/x86/amd/pmc/pmc.c
> @@ -756,19 +756,22 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
> return -EINVAL;
> }
>
> -static int amd_pmc_czn_wa_irq1(struct amd_pmc_dev *pdev)
> +static int amd_pmc_wa_irq1(struct amd_pmc_dev *pdev)
> {
> struct device *d;
> int rc;
>
> - if (!pdev->major) {
> - rc = amd_pmc_get_smu_version(pdev);
> - if (rc)
> - return rc;
> - }
> + /* cezanne platform firmware has a fix in 64.66.0 */
> + if (pdev->cpu_id == AMD_CPU_ID_CZN) {
> + if (!pdev->major) {
> + rc = amd_pmc_get_smu_version(pdev);
> + if (rc)
> + return rc;
> + }
>
> - if (pdev->major > 64 || (pdev->major == 64 && pdev->minor > 65))
> - return 0;
> + if (pdev->major > 64 || (pdev->major == 64 && pdev->minor > 65))
> + return 0;
> + }
>
> d = bus_find_device_by_name(&serio_bus, NULL, "serio0");
> if (!d)
> @@ -928,7 +931,7 @@ static int amd_pmc_suspend_handler(struct device *dev)
> struct amd_pmc_dev *pdev = dev_get_drvdata(dev);
>
> if (pdev->cpu_id == AMD_CPU_ID_CZN && !disable_workarounds) {
> - int rc = amd_pmc_czn_wa_irq1(pdev);
> + int rc = amd_pmc_wa_irq1(pdev);
>
> if (rc) {
> dev_err(pdev->dev, "failed to adjust keyboard wakeup: %d\n", rc);
>
Hi Mario,
This doesn't look necessary for the fix in this series, right?
I'd prefer to leave it to next and only take 1,3-4 to fixes.
--
i.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne
2023-12-18 12:59 ` Ilpo Järvinen
@ 2023-12-18 13:01 ` Ilpo Järvinen
0 siblings, 0 replies; 12+ messages in thread
From: Ilpo Järvinen @ 2023-12-18 13:01 UTC (permalink / raw)
To: Mario Limonciello
Cc: Hans de Goede, open list:X86 PLATFORM DRIVERS, Shyam Sundar S K,
Goswami Sanket
[-- Attachment #1: Type: text/plain, Size: 2240 bytes --]
On Mon, 18 Dec 2023, Ilpo Järvinen wrote:
> On Mon, 11 Dec 2023, Mario Limonciello wrote:
>
> > amd_pmc_wa_czn_irq1() only runs on Cezanne platforms currently but
> > may be extended to other platforms in the future. Rename the function
> > and only check platform firmware version when it's called for a Cezanne
> > based platform.
> >
> > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> > ---
> > drivers/platform/x86/amd/pmc/pmc.c | 21 ++++++++++++---------
> > 1 file changed, 12 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
> > index 666cc6e98267..824673a8673e 100644
> > --- a/drivers/platform/x86/amd/pmc/pmc.c
> > +++ b/drivers/platform/x86/amd/pmc/pmc.c
> > @@ -756,19 +756,22 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
> > return -EINVAL;
> > }
> >
> > -static int amd_pmc_czn_wa_irq1(struct amd_pmc_dev *pdev)
> > +static int amd_pmc_wa_irq1(struct amd_pmc_dev *pdev)
> > {
> > struct device *d;
> > int rc;
> >
> > - if (!pdev->major) {
> > - rc = amd_pmc_get_smu_version(pdev);
> > - if (rc)
> > - return rc;
> > - }
> > + /* cezanne platform firmware has a fix in 64.66.0 */
> > + if (pdev->cpu_id == AMD_CPU_ID_CZN) {
> > + if (!pdev->major) {
> > + rc = amd_pmc_get_smu_version(pdev);
> > + if (rc)
> > + return rc;
> > + }
> >
> > - if (pdev->major > 64 || (pdev->major == 64 && pdev->minor > 65))
> > - return 0;
> > + if (pdev->major > 64 || (pdev->major == 64 && pdev->minor > 65))
> > + return 0;
> > + }
> >
> > d = bus_find_device_by_name(&serio_bus, NULL, "serio0");
> > if (!d)
> > @@ -928,7 +931,7 @@ static int amd_pmc_suspend_handler(struct device *dev)
> > struct amd_pmc_dev *pdev = dev_get_drvdata(dev);
> >
> > if (pdev->cpu_id == AMD_CPU_ID_CZN && !disable_workarounds) {
> > - int rc = amd_pmc_czn_wa_irq1(pdev);
> > + int rc = amd_pmc_wa_irq1(pdev);
> >
> > if (rc) {
> > dev_err(pdev->dev, "failed to adjust keyboard wakeup: %d\n", rc);
> >
>
> Hi Mario,
>
> This doesn't look necessary for the fix in this series, right?
>
> I'd prefer to leave it to next and only take 1,3-4 to fixes.
Nevermind, I was just blind. :-/
--
i.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1
2023-12-12 4:50 [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Mario Limonciello
` (4 preceding siblings ...)
2023-12-12 20:19 ` [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Thomas Weißschuh
@ 2023-12-18 13:10 ` Ilpo Järvinen
5 siblings, 0 replies; 12+ messages in thread
From: Ilpo Järvinen @ 2023-12-18 13:10 UTC (permalink / raw)
To: Hans de Goede, Mario Limonciello
Cc: open list:X86 PLATFORM DRIVERS, Shyam Sundar S K, Goswami Sanket
On Mon, 11 Dec 2023 22:50:02 -0600, Mario Limonciello wrote:
> The 13" Framework laptop EC emits a spurious keyboard interrupt on every
> resume from hardware sleep. When a user closes the lid on an already
> suspended system this causes the system to wake up.
>
> This series adjusts the previous Cezanne quirk (which has a much different
> root cause) to be able to apply to other systems too. The Framework 13"
> system is added to the list it will apply to.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo branch. Note it will show up in the public
platform-drivers-x86/review-ilpo branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/4] platform/x86/amd/pmc: Move platform defines to header
commit: 85980669a863514dd47761efd6c1bc4677a2ae08
[2/4] platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne
commit: 2d53c0ab61e62302d7b62d660fe76de2bff6bf45
[3/4] platform/x86/amd/pmc: Move keyboard wakeup disablement detection to pmc-quirks
commit: b614a4bd73efeddc2b20d9e6deb6c2710373802b
[4/4] platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13
commit: a55bdad5dfd1efd4ed9ffe518897a21ca8e4e193
--
i.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1
2023-12-18 12:42 ` Ilpo Järvinen
@ 2023-12-18 13:25 ` Hans de Goede
0 siblings, 0 replies; 12+ messages in thread
From: Hans de Goede @ 2023-12-18 13:25 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Thomas Weißschuh, Mario Limonciello,
open list:X86 PLATFORM DRIVERS, Shyam Sundar S K, Goswami Sanket
Hi,
On 12/18/23 13:42, Ilpo Järvinen wrote:
> On Mon, 18 Dec 2023, Hans de Goede wrote:
>> On 12/12/23 21:19, Thomas Weißschuh wrote:
>>> On 2023-12-11 22:50:02-0600, Mario Limonciello wrote:
>>>> The 13" Framework laptop EC emits a spurious keyboard interrupt on every
>>>> resume from hardware sleep. When a user closes the lid on an already
>>>> suspended system this causes the system to wake up.
>>>>
>>>> This series adjusts the previous Cezanne quirk (which has a much different
>>>> root cause) to be able to apply to other systems too. The Framework 13"
>>>> system is added to the list it will apply to.
>>>>
>>>> Mario Limonciello (4):
>>>> platform/x86/amd/pmc: Move platform defines to header
>>>> platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne
>>>> platform/x86/amd/pmc: Move keyboard wakeup disablement detection to
>>>> pmc-quirks
>>>> platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13
>>>>
>>>> drivers/platform/x86/amd/pmc/pmc-quirks.c | 20 ++++++++++++++
>>>> drivers/platform/x86/amd/pmc/pmc.c | 33 +++++++++--------------
>>>> drivers/platform/x86/amd/pmc/pmc.h | 12 +++++++++
>>>> 3 files changed, 45 insertions(+), 20 deletions(-)
>>>
>>> For the full series:
>>>
>>> Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
>>> Tested-by: Thomas Weißschuh <linux@weissschuh.net> # on AMD Framework 13
>>>
>>> The device now only wakes up when opening the lid.
>>
>> Thomas, thank you for the review and testing.
>>
>> The series looks good to me too:
>>
>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>>
>> Ilpo, do you plan on sending out one more fixes pull-req for 6.7
>> and if yes, can you add this series to that; or shall I merge
>> this into for-next so that it gets included in 6.8-rc1 ?
>
> I was thinking not to but that was because I for some reason had missed
> this series in the pending queue over the entire last week.
>
> So I'll make make more pr taking this series, the thinkpad fan thing and
> 1/2 intel pmc fix, 2/2 intel pmc is for material that is in next only.
Great, thank you. I'll pick up the 2/2 pmc fix.
Regards,
Hans
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-12-18 13:25 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-12 4:50 [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Mario Limonciello
2023-12-12 4:50 ` [PATCH 1/4] platform/x86/amd/pmc: Move platform defines to header Mario Limonciello
2023-12-12 4:50 ` [PATCH 2/4] platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne Mario Limonciello
2023-12-18 12:59 ` Ilpo Järvinen
2023-12-18 13:01 ` Ilpo Järvinen
2023-12-12 4:50 ` [PATCH 3/4] platform/x86/amd/pmc: Move keyboard wakeup disablement detection to pmc-quirks Mario Limonciello
2023-12-12 4:50 ` [PATCH 4/4] platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13 Mario Limonciello
2023-12-12 20:19 ` [PATCH 0/4] Add a workaround for Framework 13 spurious IRQ1 Thomas Weißschuh
2023-12-18 12:11 ` Hans de Goede
2023-12-18 12:42 ` Ilpo Järvinen
2023-12-18 13:25 ` Hans de Goede
2023-12-18 13:10 ` Ilpo Järvinen
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).