linux-stable/drivers
Hans de Goede a9313a5cac platform/x86: hp-wmi: Disable tablet-mode reporting by default
[ Upstream commit 67fbe02a5c ]

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-23 14:00:31 +01:00
..
accessibility
acpi ACPI: thermal: Do not call acpi_thermal_check() directly 2021-02-07 14:47:40 +01:00
amba
android binder: fix UAF when releasing todo list 2020-10-29 09:06:59 +01:00
ata ata: sata_rcar: Fix DMA boundary mask 2020-11-05 11:06:52 +01:00
atm atm: idt77252: call pci_disable_device() on error path 2021-01-12 20:09:06 +01:00
auxdisplay
base driver core: Extend device_is_dependent() 2021-02-07 14:47:40 +01:00
bcma
block xen-blkfront: allow discard-* nodes to be optional 2021-02-03 23:22:22 +01:00
bluetooth Bluetooth: hci_uart: Cancel init work before unregistering 2020-10-29 09:07:03 +01:00
bus mips: cdmm: fix use-after-free in mips_cdmm_bus_discover 2020-12-29 13:46:56 +01:00
cdrom
char random32: make prandom_u32() output unpredictable 2020-11-18 18:28:00 +01:00
clk clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9 2020-12-29 13:47:10 +01:00
clocksource clocksource/drivers/arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI 2020-12-29 13:46:59 +01:00
connector
cpufreq cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get() 2021-01-17 13:58:59 +01:00
cpuidle cpuidle: Fixup IRQ state 2020-09-09 19:03:06 +02:00
crypto crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe 2020-12-29 13:46:54 +01:00
dax
dca
devfreq PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out 2020-10-01 13:12:28 +02:00
dio
dma dmaengine: xilinx_dma: fix mixed_enum_type coverity warning 2021-01-17 13:59:00 +01:00
dma-buf
edac EDAC/amd64: Fix PCI component registration 2020-12-29 13:47:06 +01:00
eisa
extcon extcon: max77693: Fix modalias string 2020-12-29 13:47:01 +01:00
firewire
firmware
fmc
fpga
fsi
gpio gpio: mvebu: fix pwm .get_state period calculation 2021-01-30 13:31:15 +01:00
gpu drm/nouveau/i2c/gm200: increase width of aux semaphore owner fields 2021-01-30 13:31:13 +01:00
hid HID: i2c-hid: add Vero K147 to descriptor override 2020-12-29 13:46:49 +01:00
hsi HSI: omap_ssi: Don't jump to free ID in ssi_add_controller() 2020-12-29 13:46:56 +01:00
hv hv_balloon: disable warning when floor reached 2020-11-18 18:27:53 +01:00
hwmon hwmon: (applesmc) check status earlier. 2020-09-09 19:03:06 +02:00
hwspinlock
hwtracing stm class: Fix module init return on allocation failure 2021-01-30 13:31:14 +01:00
i2c i2c: octeon: check correct size of maximum RECV_LEN packet 2021-01-30 13:31:13 +01:00
ide scsi: ide: Do not set the RQF_PREEMPT flag for sense requests 2021-01-12 20:09:05 +01:00
idle
iio iio: ad5504: Fix setting power-down state 2021-01-30 13:31:13 +01:00
infiniband RDMA/cxgb4: Fix the reported max_recv_sge value 2021-02-03 23:22:22 +01:00
input Input: xpad - sync supported devices with fork on GitHub 2021-02-10 09:12:10 +01:00
iommu iommu/vt-d: Do not use flush-queue when caching-mode is on 2021-02-10 09:12:10 +01:00
ipack
irqchip irqchip/mips-cpu: Set IPI domain parent chip 2021-01-30 13:31:13 +01:00
isdn misdn: dsp: select CONFIG_BITREVERSE 2021-01-23 15:48:42 +01:00
leds leds: trigger: fix potential deadlock with libata 2021-02-03 23:22:21 +01:00
lightnvm
macintosh
mailbox mailbox: avoid timer start from callback 2020-10-29 09:07:11 +01:00
mcb
md dm: avoid filesystem lookup in dm_get_dev_t() 2021-01-30 13:31:12 +01:00
media media: gp8psk: initialize stats at power control logic 2021-01-09 13:37:38 +01:00
memory memory: emif: Remove bogus debugfs error handling 2020-11-05 11:06:57 +01:00
memstick memstick: r592: Fix error return in r592_probe() 2020-12-29 13:46:58 +01:00
message scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove() 2020-11-05 11:06:59 +01:00
mfd misc: rtsx: Fix memory leak in rtsx_pci_probe 2020-10-29 09:07:17 +01:00
misc misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells() 2021-01-09 13:37:38 +01:00
mmc mmc: core: Limit retries when analyse of SDIO tuples fails 2021-02-10 09:12:09 +01:00
mtd mtd: parser: cmdline: Fix parsing of part-names with colons 2020-12-29 13:47:10 +01:00
mux
net iwlwifi: mvm: guard against device removal in reprobe 2021-02-23 14:00:30 +01:00
nfc nfc: s3fwrn5: Release the nfc firmware 2020-12-29 13:47:02 +01:00
ntb NTB: hw: amd: fix an issue about leak system resources 2020-10-29 09:07:14 +01:00
nubus
nvdimm libnvdimm/namespace: Fix reaping of invalidated block-window-namespace labels 2020-12-29 13:47:11 +01:00
nvme nvme-pci: avoid the deepest sleep state on Kingston A2000 SSDs 2021-02-10 09:12:09 +01:00
nvmem
of of/address: Fix of_node memory leak in of_dma_is_coherent 2020-11-18 18:27:57 +01:00
oprofile
parisc parisc: mask out enable and reserved bits from sba imask 2020-08-21 09:48:16 +02:00
parport
pci PCI: Fix pci_slot_release() NULL pointer dereference 2020-12-29 13:47:11 +01:00
pcmcia
perf drivers/perf: xgene_pmu: Fix uninitialized resource struct 2020-10-29 09:07:00 +01:00
phy phy: cpcap-usb: Fix warning for missing regulator_disable 2021-02-07 14:47:40 +01:00
pinctrl pinctrl: falcon: add missing put_device() call in pinctrl_falcon_probe() 2020-12-29 13:46:58 +01:00
platform platform/x86: hp-wmi: Disable tablet-mode reporting by default 2021-02-23 14:00:31 +01:00
pnp
power power: supply: bq24190_charger: fix reference leak 2020-12-29 13:46:56 +01:00
powercap powercap: restrict energy meter to root access 2020-11-10 21:10:28 +01:00
pps
ps3 powerpc/ps3: use dma_mapping_error() 2020-12-29 13:47:02 +01:00
ptp
pwm pwm: lp3943: Dynamically allocate PWM chip base 2020-12-29 13:47:03 +01:00
rapidio rapidio: fix the missed put_device() for rio_mport_add_riodev 2020-10-29 09:07:11 +01:00
ras
regulator regulator: workaround self-referent regulators 2020-11-24 13:05:55 +01:00
remoteproc remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load 2021-02-23 14:00:29 +01:00
reset
rpmsg
rtc rtc: sun6i: Fix memleak in sun6i_rtc_clk_init 2021-01-09 13:37:38 +01:00
s390 s390/dasd: fix hanging device offline processing 2021-01-09 13:37:37 +01:00
sbus
scsi scsi: ibmvfc: Set default timeout to avoid crash during migration 2021-02-07 14:47:41 +01:00
sfi
sh
sn
soc drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[] 2021-02-03 23:22:21 +01:00
spi spi: cadence: cache reference clock rate during probe 2021-01-23 15:48:48 +01:00
spmi
ssb
staging staging: comedi: mf6x4: Fix AI end-of-conversion detection 2020-12-29 13:47:06 +01:00
target scsi: target: Fix XCOPY NAA identifier lookup 2021-01-12 20:09:14 +01:00
tc
tee
thermal thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430 2020-09-09 19:03:10 +02:00
thunderbolt thunderbolt: Add the missed ida_simple_remove() in ring_request_msix() 2020-11-18 18:27:58 +01:00
tty serial_core: Check for port state when tty is in error state 2020-12-29 13:46:49 +01:00
uio uio: Fix use-after-free in uio_unregister_device() 2020-11-18 18:27:58 +01:00
usb xhci: fix bounce buffer usage for non-sg list case 2021-02-10 09:12:09 +01:00
uwb
vfio vfio/pci: Move dummy_resources_list init in vfio_pci_probe() 2021-01-09 13:37:37 +01:00
vhost vhost_net: fix ubuf refcount incorrectly when sendmsg fails 2021-01-12 20:09:08 +01:00
video video: hyperv_fb: Fix the mmap() regression for v5.4.y and older 2021-01-12 20:09:09 +01:00
virt drivers/virt/fsl_hypervisor: Fix error handling path 2020-10-29 09:07:05 +01:00
virtio virtio_ring: Avoid loop when vq is broken in virtqueue_poll 2020-08-26 10:29:57 +02:00
vlynq
vme
w1 w1: mxc_w1: Fix timeout resolution problem leading to bus error 2020-11-05 11:06:59 +01:00
watchdog watchdog: coh901327: add COMMON_CLK dependency 2020-12-29 13:47:02 +01:00
xen arm/xen: Don't probe xenbus as part of an early initcall 2021-02-23 14:00:31 +01:00
zorro
Kconfig
Makefile