]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on some HP x360 models
authorHans de Goede <hdegoede@redhat.com>
Sat, 12 Sep 2020 09:35:32 +0000 (11:35 +0200)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 4 Jan 2021 15:37:21 +0000 (16:37 +0100)
commit3fe564dae426d38a6383116417b7fc716aed3035
treeffa6d8b4f6498fd5978c175dbf46da11a033cbf7
parentbeca2c2b6a123426488aa0ae1fcf3d2ee159c110
platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on some HP x360 models

BugLink: https://bugs.launchpad.net/bugs/1910111
[ Upstream commit a4327979a19e8734ddefbd8bcbb73bd9905b69cd ]

Some HP x360 models have an ACPI VGBS method which sets bit 4 instead of
bit 6 when NOT in tablet mode at boot. Inspecting all the DSDTs in my DSDT
collection shows only one other model, the Medion E1239T ever setting bit 4
and it always sets this together with bit 6.

So lets treat bit 4 as a second bit which when set indicates the device not
being in tablet-mode, as we already do for bit 6.

While at it also prefix all VGBS constant defines with "VGBS_".

Note this wrokaround was first added to the kernel as
commit d823346876a9 ("platform/x86: intel-vbtn: Fix SW_TABLET_MODE always
reporting 1 on the HP Pavilion 11 x360").
After commit 8169bd3e6e19 ("platform/x86: intel-vbtn: Switch to an
allow-list for SW_TABLET_MODE reporting") got added to the kernel this
was reverted, because with the new allow-list approach the workaround
was no longer necessary for the model on which the issue was first
reported.

But it turns out that the workaround is still necessary because some
affected models report a chassis-type of 31 which is on the allow-list.

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1894017
Fixes: 21d64817c724 ("platform/x86: intel-vbtn: Revert "Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360"")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/platform/x86/intel-vbtn.c