• Hans de Goede's avatar
    platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on some HP x360 models · a4327979
    Hans de Goede authored
    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 d8233468 ("platform/x86: intel-vbtn: Fix SW_TABLET_MODE always
    reporting 1 on the HP Pavilion 11 x360").
    After commit 8169bd3e ("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: 21d64817 ("platform/x86: intel-vbtn: Revert "Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360"")
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    a4327979
intel-vbtn.c 10.3 KB