linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Limonciello, Mario" <mario.limonciello@amd.com>
To: Chuanhong Guo <gch981213@gmail.com>, linux-acpi@vger.kernel.org
Cc: stable@vger.kernel.org,
	Tighe Donnelly <tighe.donnelly@protonmail.com>,
	Kent Hou Man <knthmn0@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5] ACPI: skip IRQ1 override on 3 Ryzen 6000 laptops
Date: Thu, 30 Jun 2022 15:12:07 -0500	[thread overview]
Message-ID: <b84edc24-0a3a-a4d2-6481-fb3d4cee6dda@amd.com> (raw)
In-Reply-To: <20220630022317.15734-1-gch981213@gmail.com>

On 6/29/2022 21:23, Chuanhong Guo wrote:
> The IRQ1 of these laptops with Ryzen 6000 and Insyde UEFI are active
> low and defined in legacy format in ACPI DSDT. The kernel override
> makes the keyboard interrupt polarity inverted, resulting in
> non-functional keyboard.
> 
> Skip legacy IRQ override for:
> Lenovo ThinkBook 14G4+ ARA
> Redmi Book Pro 15 2022 Ryzen
> Asus Zenbook S 13 OLED UM5302

It's really unfortunate that these laptops have the bug.  This was found 
and fixed in the reference BIOS for Ryzen 6000 too (via an MADT override 
service) very early in development.  It seems these manufacturers didn't 
pick up (or ignored) the solution.

However I do want to point out that Windows doesn't care about legacy 
format or not.  This bug where keyboard doesn't work only popped up on 
Linux.

Given the number of systems with the bug is appearing to grow I wonder 
if the right answer is actually a new heuristic that doesn't apply the 
kernel override for polarity inversion anymore.  Maybe if the system is 
2022 or newer?  Or on the ACPI version?

> 
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Tighe Donnelly <tighe.donnelly@protonmail.com>
> Signed-off-by: Kent Hou Man <knthmn0@gmail.com>
> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
> ---
> Changes since v1:
>   Match DMI_PRODUCT_NAME for ThinkBook because the board name
>   is used for other completely different Lenovo laptops.
>   Add a patch for RedmiBook
> 
> Changes since v2:
>   Fix alphabetical order in skip_override_table
>   Add a patch for Asus Zenbook
> 
> Changes since v3:
>   Merge patches as requested
>   Fix another alphabetical ordering between two structs
> 
> Changes since v4:
>   rename the ident in RedmiBook entry.
>    There's also an Intel version of this series, so
>    rename it to make it specific.
>   reword commit title
> 
>   drivers/acpi/resource.c | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+) >
> diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
> index c2d494784425..0491da180fc5 100644
> --- a/drivers/acpi/resource.c
> +++ b/drivers/acpi/resource.c
> @@ -381,6 +381,31 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
>   }
>   EXPORT_SYMBOL_GPL(acpi_dev_get_irq_type);
>   
> +static const struct dmi_system_id irq1_edge_low_shared[] = {
> +	{
> +		.ident = "Asus Zenbook S 13 OLED UM5302",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> +			DMI_MATCH(DMI_BOARD_NAME, "UM5302TA"),
> +		},
> +	},
> +	{
> +		.ident = "Lenovo ThinkBook 14 G4+ ARA",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "21D0"),
> +		},
> +	},
> +	{
> +		.ident = "Redmi Book Pro 15 2022 Ryzen",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "TIMI"),
> +			DMI_MATCH(DMI_BOARD_NAME, "TM2113"),
> +		},
> +	},
> +	{ }
> +};
> +
>   static const struct dmi_system_id medion_laptop[] = {
>   	{
>   		.ident = "MEDION P15651",
> @@ -408,6 +433,7 @@ struct irq_override_cmp {
>   };
>   
>   static const struct irq_override_cmp skip_override_table[] = {
> +	{ irq1_edge_low_shared, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1 },
>   	{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
>   };
>   


  reply	other threads:[~2022-06-30 20:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30  2:23 [PATCH v5] ACPI: skip IRQ1 override on 3 Ryzen 6000 laptops Chuanhong Guo
2022-06-30 20:12 ` Limonciello, Mario [this message]
2022-07-01 12:44   ` Chuanhong Guo
2022-07-05 18:24     ` Rafael J. Wysocki
2022-07-05 18:27       ` Limonciello, Mario
2022-07-05 18:31         ` Rafael J. Wysocki

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=b84edc24-0a3a-a4d2-6481-fb3d4cee6dda@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=gch981213@gmail.com \
    --cc=knthmn0@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tighe.donnelly@protonmail.com \
    /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).