linux_dsm_epyc7002/drivers/platform/x86
Hans de Goede 2a2e911469 platform/x86: hp-wmi: Disable tablet-mode reporting by default
[ Upstream commit 67fbe02a5cebc3c653610f12e3c0424e58450153 ]

Recently userspace has started making more use of SW_TABLET_MODE
(when an input-dev reports this).

Specifically recent GNOME3 versions will:

1.  When SW_TABLET_MODE is reported and is reporting 0:
1.1 Disable accelerometer-based screen auto-rotation
1.2 Disable automatically showing the on-screen keyboard when a
    text-input field is focussed

2.  When SW_TABLET_MODE is reported and is reporting 1:
2.1 Ignore input-events from the builtin keyboard and touchpad
    (this is for 360° hinges style 2-in-1s where the keyboard and
     touchpads are accessible on the back of the tablet when folded
     into tablet-mode)

This means that claiming to support SW_TABLET_MODE when it does not
actually work / reports correct values has bad side-effects.

The check in the hp-wmi code which is used to decide if the input-dev
should claim SW_TABLET_MODE support, only checks if the
HPWMI_HARDWARE_QUERY is supported. It does *not* check if the hardware
actually is capable of reporting SW_TABLET_MODE.

This leads to the hp-wmi input-dev claiming SW_TABLET_MODE support,
while in reality it will always report 0 as SW_TABLET_MODE value.
This has been seen on a "HP ENVY x360 Convertible 15-cp0xxx" and
this likely is the case on a whole lot of other HP models.

This problem causes both auto-rotation and on-screen keyboard
support to not work on affected x360 models.

There is no easy fix for this, but since userspace expects
SW_TABLET_MODE reporting to be reliable when advertised it is
better to not claim/report SW_TABLET_MODE support at all, then
to claim to support it while it does not work.

To avoid the mentioned problems, add a new enable_tablet_mode_sw
module-parameter which defaults to false.

Note I've made this an int using the standard -1=auto, 0=off, 1=on
triplett, with the hope that in the future we can come up with a
better way to detect SW_TABLET_MODE support. ATM the default
auto option just does the same as off.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1918255
Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mark Gross <mgross@linux.intel.com>
Link: https://lore.kernel.org/r/20210120124941.73409-1-hdegoede@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-02-17 11:02:22 +01:00
..
intel_speed_select_if platform/x86: ISST: Add new PCI device ids 2020-07-15 12:46:59 +03:00
acer-wireless.c
acer-wmi.c platform/x86: acer-wmi: add automatic keyboard background light toggle key as KEY_LIGHTS_TOGGLE 2020-11-26 15:48:37 +01:00
acerhdf.c - Add support to enable/disable the thermal zones resulting on core code and 2020-08-06 18:10:55 -07:00
alienware-wmi.c
amilo-rfkill.c
apple-gmux.c platform/x86: apple-gmux: Replace HTTP links with HTTPS ones 2020-07-15 13:01:20 +03:00
asus-laptop.c
asus-nb-wmi.c platform/x86: asus-wmi: Fix SW_TABLET_MODE always reporting 1 on many different models 2020-10-06 09:48:05 +02:00
asus-wireless.c
asus-wmi.c platform/x86: asus-wmi: Fix SW_TABLET_MODE always reporting 1 on many different models 2020-10-06 09:48:05 +02:00
asus-wmi.h platform/x86: asus-wmi: Fix SW_TABLET_MODE always reporting 1 on many different models 2020-10-06 09:48:05 +02:00
classmate-laptop.c
compal-laptop.c
dcdbas.c platform/x86: dcdbas: Check SMBIOS for protected buffer address 2020-06-01 12:27:25 +03:00
dcdbas.h
dell_rbu.c
dell-laptop.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dell-rbtn.c
dell-rbtn.h
dell-smbios-base.c platform/x86: dell-smbios-base: Fix error return code in dell_smbios_init 2020-12-30 11:53:28 +01:00
dell-smbios-smm.c
dell-smbios-wmi.c
dell-smbios.h
dell-smo8800.c
dell-wmi-aio.c
dell-wmi-descriptor.c
dell-wmi-descriptor.h
dell-wmi-led.c
dell-wmi.c platform/x86: dell-wmi: add new dmi mapping for keycode 0xffff 2020-07-09 22:47:27 +03:00
eeepc-laptop.c
eeepc-wmi.c
fujitsu-laptop.c
fujitsu-tablet.c
gpd-pocket-fan.c
hdaps.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
hp_accel.c
hp-wireless.c
hp-wmi.c platform/x86: hp-wmi: Disable tablet-mode reporting by default 2021-02-17 11:02:22 +01:00
huawei-wmi.c
i2c-multi-instantiate.c platform/x86: i2c-multi-instantiate: Don't create platform device for INT3515 ACPI nodes 2021-01-27 11:54:51 +01:00
ibm_rtl.c
ideapad-laptop.c platform/x86: ideapad-laptop: Disable touchpad_switch for ELAN0634 2021-01-27 11:54:51 +01:00
intel_atomisp2_led.c platform/x86: Add new intel_atomisp2_led driver 2020-07-09 22:47:27 +03:00
intel_atomisp2_pm.c
intel_bxtwc_tmu.c
intel_cht_int33fe_common.c platform/x86: intel_cht_int33fe: Drop double check for ACPI companion device 2020-07-09 22:40:36 +03:00
intel_cht_int33fe_common.h
intel_cht_int33fe_microb.c
intel_cht_int33fe_typec.c
intel_chtdc_ti_pwrbtn.c
intel_int0002_vgpio.c
intel_ips.c
intel_ips.h
intel_menlow.c
intel_mid_powerbtn.c
intel_mid_thermal.c thermal: Explicitly enable non-changing thermal zone devices 2020-06-29 20:26:37 +02:00
intel_mrfld_pwrbtn.c
intel_oaktrail.c
intel_pmc_core_pltdrv.c platform/x86: intel_pmc_core: do not create a static struct device 2020-09-24 14:05:21 +03:00
intel_pmc_core.c platform/x86: intel_pmc_core: fix: Replace dev_dbg macro with dev_info() 2020-10-07 23:07:38 +02:00
intel_pmc_core.h platform/x86: intel_pmc_core: Fix the slp_s0 counter displayed value 2020-10-07 23:06:29 +02:00
intel_punit_ipc.c
intel_scu_ipc.c
intel_scu_ipcutil.c
intel_scu_pcidrv.c
intel_scu_pltdrv.c
intel_telemetry_core.c
intel_telemetry_debugfs.c
intel_telemetry_pltdrv.c
intel_turbo_max_3.c
intel-hid.c platform/x86: intel-hid: Fix return value check in check_acpi_dev() 2020-07-14 15:43:08 +03:00
intel-rst.c
intel-smartconnect.c
intel-uncore-frequency.c
intel-vbtn.c platform/x86: intel-vbtn: Support for tablet mode on Dell Inspiron 7352 2021-02-07 15:37:13 +01:00
intel-wmi-sbl-fw-update.c
intel-wmi-thunderbolt.c
Kconfig platform/x86: fix kconfig dependency warning for FUJITSU_LAPTOP 2020-09-24 14:04:52 +03:00
lg-laptop.c
Makefile platform/x86: Add new intel_atomisp2_led driver 2020-07-09 22:47:27 +03:00
mlx-platform.c platform/x86: mlx-platform: remove an unused variable 2020-12-30 11:54:19 +01:00
msi-laptop.c
msi-wmi.c
mxm-wmi.c
panasonic-laptop.c
pcengines-apuv2.c platform/x86: pcengines-apuv2: Fix typo on define of AMD_FCH_GPIO_REG_GPIO55_DEVSLP0 2020-09-24 14:04:53 +03:00
peaq-wmi.c
pmc_atom.c
samsung-laptop.c
samsung-q10.c
sony-laptop.c
surface3_button.c
surface3_power.c
surface3-wmi.c
surfacepro3_button.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
system76_acpi.c platform/x86: system76-acpi: Fix brightness_set schedule while atomic 2020-07-09 22:40:36 +03:00
tc1100-wmi.c
thinkpad_acpi.c platform/x86: thinkpad_acpi: Add P53/73 firmware to fan_quirk_table for dual fan control 2021-02-07 15:37:16 +01:00
topstar-laptop.c
toshiba_acpi.c platform/x86: toshiba_acpi: Fix the wrong variable assignment 2020-11-26 15:48:46 +01:00
toshiba_bluetooth.c
toshiba_haps.c
toshiba-wmi.c
touchscreen_dmi.c platform/x86: touchscreen_dmi: Add swap-x-y quirk for Goodix touchscreen on Estar Beauty HD tablet 2021-02-07 15:37:13 +01:00
wmi-bmof.c
wmi.c
xiaomi-wmi.c
xo1-rfkill.c
xo15-ebook.c