1. 19 Jun, 2019 5 commits
    • Jason Gerecke's avatar
      HID: wacom: Don't report anything prior to the tool entering range · 3e9c0eb1
      Jason Gerecke authored
      commit e92a7be7 upstream.
      
      If the tool spends some time in prox before entering range, a series of
      events (e.g. ABS_DISTANCE, MSC_SERIAL) can be sent before we or userspace
      have any clue about the pen whose data is being reported. We need to hold
      off on reporting anything until the pen has entered range. Since we still
      want to report events that occur "in prox" after the pen has *left* range
      we use 'wacom-tool[0]' as the indicator that the pen did at one point
      enter range and provide us/userspace with tool type and serial number
      information.
      
      Fixes: a48324de ("HID: wacom: Bluetooth IRQ for Intuos Pro should handle prox/range")
      Cc: <stable@vger.kernel.org> # 4.11+
      Signed-off-by: default avatarJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: default avatarAaron Armstrong Skomra <aaron.skomra@wacom.com>
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3e9c0eb1
    • Jason Gerecke's avatar
      HID: wacom: Don't set tool type until we're in range · 52a7d604
      Jason Gerecke authored
      commit 2cc08800 upstream.
      
      The serial number and tool type information that is reported by the tablet
      while a pen is merely "in prox" instead of fully "in range" can be stale
      and cause us to report incorrect tool information. Serial number, tool
      type, and other information is only valid once the pen comes fully in range
      so we should be careful to not use this information until that point.
      
      In particular, this issue may cause the driver to incorectly report
      BTN_TOOL_RUBBER after switching from the eraser tool back to the pen.
      
      Fixes: a48324de ("HID: wacom: Bluetooth IRQ for Intuos Pro should handle prox/range")
      Cc: <stable@vger.kernel.org> # 4.11+
      Signed-off-by: default avatarJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: default avatarAaron Armstrong Skomra <aaron.skomra@wacom.com>
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      52a7d604
    • Benjamin Tissoires's avatar
      HID: multitouch: handle faulty Elo touch device · fa212dd5
      Benjamin Tissoires authored
      commit 81bcbad5 upstream.
      
      Since kernel v5.0, one single win8 touchscreen device failed.
      And it turns out this is because it reports 2 InRange usage per touch.
      
      It's a first, and I *really* wonder how this was allowed by Microsoft in
      the first place. But IIRC, Breno told me this happened *after* a firmware
      upgrade...
      
      Anyway, better be safe for those crappy devices, and make sure we have
      a full slot before jumping to the next.
      This won't prevent all crappy devices to fail here, but at least we will
      have a safeguard as long as the contact ID and the X and Y coordinates
      are placed in the report after the grabage.
      
      Fixes: 01eaac7e ("HID: multitouch: remove one copy of values")
      CC: stable@vger.kernel.org # v5.0+
      Reported-and-tested-by: default avatarBreno Leitao <leitao@debian.org>
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fa212dd5
    • Thomas Backlund's avatar
      nouveau: Fix build with CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT disabled · 9ae306d8
      Thomas Backlund authored
      Not-entirely-upstream-sha1-but-equivalent: bed2dd84
      ("drm/ttm: Quick-test mmap offset in ttm_bo_mmap()")
      
      Setting CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n (added by commit: b30a43ac)
      causes the build to fail with:
      
      ERROR: "drm_legacy_mmap" [drivers/gpu/drm/nouveau/nouveau.ko] undefined!
      
      This does not happend upstream as the offending code got removed in:
      bed2dd84 ("drm/ttm: Quick-test mmap offset in ttm_bo_mmap()")
      
      Fix that by adding check for CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT around
      the drm_legacy_mmap() call.
      
      Also, as Sven Joachim pointed out, we need to make the check in
      CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n case return -EINVAL as its done
      for basically all other gpu drivers, especially in upstream kernels
      drivers/gpu/drm/ttm/ttm_bo_vm.c as of the upstream commit bed2dd84.
      
      NOTE. This is a minimal stable-only fix for trees where b30a43ac is
      backported as the build error affects nouveau only.
      
      Fixes: b30a43ac ("drm/nouveau: add kconfig option to turn off nouveau
             legacy contexts. (v3)")
      Signed-off-by: default avatarThomas Backlund <tmb@mageia.org>
      Cc: stable@vger.kernel.org
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sven Joachim <svenjoac@gmx.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9ae306d8
    • Dave Airlie's avatar
      drm/nouveau: add kconfig option to turn off nouveau legacy contexts. (v3) · d54e1b84
      Dave Airlie authored
      commit b30a43ac upstream.
      
      There was a nouveau DDX that relied on legacy context ioctls to work,
      but we fixed it years ago, give distros that have a modern DDX the
      option to break the uAPI and close the mess of holes that legacy
      context support is.
      
      Full context of the story:
      
      commit 0e975980
      Author: Peter Antoine <peter.antoine@intel.com>
      Date:   Tue Jun 23 08:18:49 2015 +0100
      
          drm: Turn off Legacy Context Functions
      
          The context functions are not used by the i915 driver and should not
          be used by modeset drivers. These driver functions contain several bugs
          and security holes. This change makes these functions optional can be
          turned on by a setting, they are turned off by default for modeset
          driver with the exception of the nouvea driver that may require them with
          an old version of libdrm.
      
          The previous attempt was
      
          commit 7c510133
          Author: Daniel Vetter <daniel.vetter@ffwll.ch>
          Date:   Thu Aug 8 15:41:21 2013 +0200
      
              drm: mark context support as a legacy subsystem
      
          but this had to be reverted
      
          commit c21eb21c
          Author: Dave Airlie <airlied@redhat.com>
          Date:   Fri Sep 20 08:32:59 2013 +1000
      
              Revert "drm: mark context support as a legacy subsystem"
      
          v2: remove returns from void function, and formatting (Daniel Vetter)
      
          v3:
          - s/Nova/nouveau/ in the commit message, and add references to the
            previous attempts
          - drop the part touching the drm hw lock, that should be a separate
            patch.
      
          Signed-off-by: Peter Antoine <peter.antoine@intel.com> (v2)
          Cc: Peter Antoine <peter.antoine@intel.com> (v2)
      Reviewed-by: default avatarPeter Antoine <peter.antoine@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      
      v2: move DRM_VM dependency into legacy config.
      v3: fix missing dep (kbuild robot)
      
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d54e1b84
  2. 17 Jun, 2019 5 commits
  3. 15 Jun, 2019 30 commits