mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxim Mikityanskiy <maxtram95@gmail.com>
To: Alex Hung <alexhung@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Mark Gross <markgross@kernel.org>
Cc: platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Richard Hughes <hughsient@gmail.com>,
	Jorge Lopez <jorge.lopez2@hp.com>,
	Maxim Mikityanskiy <maxtram95@gmail.com>
Subject: [PATCH] platform/x86/intel/hid: Add HP Dragonfly G2 to DMI quirks
Date: Wed, 12 Jul 2023 20:50:23 +0300	[thread overview]
Message-ID: <20230712175023.31651-1-maxtram95@gmail.com> (raw)

SW_TABLET_MODE reports are broken on BIOS versions newer than 1.9.1 on
HP Elite Dragonfly G2. Analysis of SSDT9 shows that the BTNL method has
to be called to start getting 0xcc and 0xcd events. Apparently, the
button_array_present method used to return true on BIOS 1.9.1 and older,
but it returns false on newer BIOSes due to HEBC returning 0x000033f3
(bits 0x60000 and 0x20000 are not set).

Add this laptop to button_array_table to force the BTNL call, and also
add it to dmi_vgbs_allow_list to read the initial state and sync VBDS
with VBPS, because this laptop has a reliable VGBS method.

Tested with BIOS 1.13.1.

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
---
 drivers/platform/x86/intel/hid.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
index 5632bd3c534a..5c78b476ed1e 100644
--- a/drivers/platform/x86/intel/hid.c
+++ b/drivers/platform/x86/intel/hid.c
@@ -128,6 +128,13 @@ static const struct dmi_system_id button_array_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
 		},
 	},
+	{
+		.ident = "HP Elite Dragonfly G2",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP Elite Dragonfly G2 Notebook PC"),
+		},
+	},
 	{ }
 };
 
@@ -150,6 +157,12 @@ static const struct dmi_system_id dmi_vgbs_allow_list[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go"),
 		},
 	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP Elite Dragonfly G2 Notebook PC"),
+		},
+	},
 	{ }
 };
 
-- 
2.41.0


             reply	other threads:[~2023-07-12 17:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 17:50 Maxim Mikityanskiy [this message]
2023-07-14 17:00 ` Hans de Goede
2023-07-15 17:33   ` Maxim Mikityanskiy

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=20230712175023.31651-1-maxtram95@gmail.com \
    --to=maxtram95@gmail.com \
    --cc=alexhung@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=hughsient@gmail.com \
    --cc=jorge.lopez2@hp.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®