touchpad: add a quirk for the HP Pavilion dm4
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 1 Nov 2016 23:40:42 +0000 (09:40 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 6 Dec 2016 07:39:04 +0000 (17:39 +1000)
This touchpad has cursor jumps for 2-finger scrolling that also affects the
single-finger emulation. So disable any multitouch bits on this device and
disallow the 2-finger scroll method. This still allows for 2-finger
tapping/clicking.

https://bugs.freedesktop.org/show_bug.cgi?id=91135

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
(cherry picked from commit 996b845d68cfa23b7f8a8f9da1bbc40527da562b)

src/evdev-mt-touchpad.c
src/evdev.c
src/evdev.h
udev/90-libinput-model-quirks.hwdb

index 7b8514cb693bd63299ae30ff9f45c2c2f0653f99..af2a2cd13f5f65be96c8ede174a3649b4788e24b 100644 (file)
@@ -1795,8 +1795,12 @@ tp_init_slots(struct tp_dispatch *tp,
         * If three fingers are set down in the same frame, one slot has the
         * coordinates 0/0 and may not get updated for several frames.
         * See https://bugzilla.redhat.com/show_bug.cgi?id=1295073
+        *
+        * The HP Pavilion DM4 touchpad has random jumps in slots, including
+        * for single-finger movement. See fdo bug 91135
         */
-       if (tp->semi_mt) {
+       if (tp->semi_mt ||
+           device->model_flags & EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD) {
                tp->num_slots = 1;
                tp->slot = 0;
                tp->has_mt = false;
@@ -1899,6 +1903,12 @@ tp_scroll_get_methods(struct tp_dispatch *tp)
 {
        uint32_t methods = LIBINPUT_CONFIG_SCROLL_EDGE;
 
+       /* Any movement with more than one finger has random cursor
+        * jumps. Don't allow for 2fg scrolling on this device, see
+        * fdo bug 91135 */
+       if (tp->device->model_flags & EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD)
+               return LIBINPUT_CONFIG_SCROLL_EDGE;
+
        if (tp->ntouches >= 2)
                methods |= LIBINPUT_CONFIG_SCROLL_2FG;
 
index 1e3cc905bc987f124faabc7c3d679610ce2a508e..b29c3287247958901518817e129dc676112bb9f5 100644 (file)
@@ -2180,6 +2180,7 @@ evdev_read_model_flags(struct evdev_device *device)
                MODEL(HP8510_TOUCHPAD),
                MODEL(HP6910_TOUCHPAD),
                MODEL(HP_ZBOOK_STUDIO_G3),
+               MODEL(HP_PAVILION_DM4_TOUCHPAD),
 #undef MODEL
                { "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL },
                { NULL, EVDEV_MODEL_DEFAULT },
index 3ad385e81adbc3caab1067064a76d537956eb15f..73b4774e58f2384fd13f842fa3cc44b5f91b7a22 100644 (file)
@@ -122,6 +122,7 @@ enum evdev_device_model {
        EVDEV_MODEL_HP8510_TOUCHPAD = (1 << 21),
        EVDEV_MODEL_HP6910_TOUCHPAD = (1 << 22),
        EVDEV_MODEL_HP_ZBOOK_STUDIO_G3 = (1 << 23),
+       EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD = (1 << 24),
 };
 
 struct mt_slot {
index 347a229bef75ab3261c3a0d818d2b8ba63f7a412..eb74f610ee7d14710817888c2b11764973d59987 100644 (file)
@@ -99,6 +99,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq6910
 libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq8510w*
  LIBINPUT_MODEL_HP8510_TOUCHPAD=1
 
+# HP Pavillion dm4
+libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPPaviliondm4NotebookPC*
+ LIBINPUT_MODEL_HP_PAVILION_DM4_TOUCHPAD=1
+
 # HP Stream 11
 libinput:name:SYN1EDE:00 06CB:7442:dmi:*svnHewlett-Packard:pnHPStreamNotebookPC11*
  LIBINPUT_MODEL_HP_STREAM11_TOUCHPAD=1