Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp911737imm; Fri, 1 Jun 2018 11:44:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLkQBIDsond8h8S9A2rU9uDT1AA8FL9kmYJczvLv/RXw7rEp5A3vqbl4YpJ8SOlWMC0LRJe X-Received: by 2002:a63:24c4:: with SMTP id k187-v6mr7071328pgk.434.1527878658888; Fri, 01 Jun 2018 11:44:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527878658; cv=none; d=google.com; s=arc-20160816; b=P5PCrf+rVK0qY0c8q9sbesgUOxUrfKD2PYpJU1osgavuRuyS4aFttu9JTxgTOR4rbk zZdOgdY1thr/N1EXW3tnEniBZN3EK4kaE7UAVfqaqBcQl/pWUdTCFZ9EhzcqhM3I10tu oAH2/LjTFTKI1Y2ZcXInPYfQUnEGyDMEUzEY6mNYb8p2x1ph/FRSI0E5U6wKujMUReSp nbUmmoCbgWda/jOgAH2UdhTC2q6ksWIPQAeVpkfAhi2THUOJBuQ+Z4pzc87RNic4u8dK P2pAW1J7D6pabStLYRrmIv9joNLwf80qVu6Zh3J3qKIFvM8X0pHxp4ZFGpoYcyj5LV4S 6DlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=52nvjjDaTWwT/pQlhWk83Lw6OhRVDrWhIlU9IB6dEgQ=; b=n5EpHRwt6uBfyFFb2X4fYDAo0dNMduT7iYkrs1nG81uu7+hxB4K2+qlnnMXaXs9c/z jWhpg1deftFM2J3boaSTC0MMfpL/z+kXuJcIN7mBVCwC3aV8Ra3F2Kyklno2IhZdcBys wijvqWgsK1Qyt113XIl+nCkAxEVy5UBKRrPn450whfFcBr/OyT+tJn5FkVnEqudiY1cp 6VhU80C0gP7VBE8Bhp9I9orhgS+Osq45yJO2yFmPJM6UO7b2/DJRvFkO9wpQPxnKkPm2 ntT/XVj/Otpji+kjKbv9tdmSEYgjNgMpCZrMrxWU1ww9A/8Y6LraeGzpavfBJKVqqPij uMHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rCpDkQFM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si2923252pgr.76.2018.06.01.11.44.02; Fri, 01 Jun 2018 11:44:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rCpDkQFM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752857AbeFASng (ORCPT + 99 others); Fri, 1 Jun 2018 14:43:36 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:44322 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751584AbeFASne (ORCPT ); Fri, 1 Jun 2018 14:43:34 -0400 Received: by mail-pf0-f195.google.com with SMTP id h12-v6so2969503pfk.11; Fri, 01 Jun 2018 11:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=52nvjjDaTWwT/pQlhWk83Lw6OhRVDrWhIlU9IB6dEgQ=; b=rCpDkQFMqSBS2olWS83RBefxx9jCoZSFF+EwBQBVRQ05nLQkCBY0DrbtwG13DISGfA /VgW9/ZSEZn+U/gNXCMiuqUz/Up0yJp1SVmLY9a6JgmNNA9VzydFDgNn/W59vd4xmrQt SlJrlbG6lC6vkyw06QUwvV5kOEDxnlGM92db2y7qjQLp5E2NTF4h45rVfle4g2bcD0Ar cIU8DB65SS85EysbxgoM/QFrP8lZnTafvil+7WGda4XJNuHoQJhxaW0QjOwiYW7zKJOB dyi8qENvqpL7IAR4Z746fewB377YgcID5Bc6SyqpHK8SrC+5eMTDlMtBJEA9MbOwCUxz BzJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=52nvjjDaTWwT/pQlhWk83Lw6OhRVDrWhIlU9IB6dEgQ=; b=IcDM9f9RozrNKJrjcMIobDofy3s7WhOmA+Ll8JZ+pXZC8DoWGUhKvTJF1k0SsWV+Ix jPP4qP4GxPtfSJ+5pgqnEsdockj0jTPAGzd7kCc07KUJi7gxjwc8x6stWRxf0yCLI0RD m/c+HuDdoH8/7RSVqns437xg/xpeeZMVtQP/zkIvk16A5GShomrmLVC6kBjEnTRnEeZi Q9k65bhV8b9yUiUNMKQYK1Nu6DfVgcASQZc+7PvSHZKeQ3GwQgdiMs6uMRzQ8r/uA5MW HfA6LXcc6rzY37+TECDTPqJfKewCZAuh9bBvVsXer1Frga/Xy7/La4/6D7bHB1Pa2/rl 0hig== X-Gm-Message-State: ALKqPwcXJZ9SmmJr/L0RyYY0UFJJu/psxdsZEi7TfEI6Elhp5tfKkhSB RovsJW3jiotKGfK/ajtWfU8= X-Received: by 2002:a62:9d82:: with SMTP id a2-v6mr12005561pfk.223.1527878614233; Fri, 01 Jun 2018 11:43:34 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id h84-v6sm34008859pfd.69.2018.06.01.11.43.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jun 2018 11:43:33 -0700 (PDT) Date: Fri, 1 Jun 2018 11:43:30 -0700 From: Dmitry Torokhov To: Benjamin Tissoires Cc: Jiri Kosina , Henrik Rydberg , Jason Gerecke , Dennis Kempin , Andrew de los Reyes , "open list:HID CORE LAYER" , lkml Subject: Re: [PATCH 1/2] HID: multitouch: report MT_TOOL_PALM for non-confident touches Message-ID: <20180601184330.GD222005@dtor-ws> References: <20170811004500.13740-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 01, 2018 at 04:16:09PM +0200, Benjamin Tissoires wrote: > On Fri, Aug 11, 2017 at 2:44 AM, Dmitry Torokhov > wrote: > > According to Microsoft specification [1] for Precision Touchpads (and > > Touchscreens) the devices use "confidence" reports to signal accidental > > touches, or contacts that are "too large to be a finger". Instead of > > simply marking contact inactive in this case (which causes issues if > > contact was originally proper and we lost confidence in it later, as > > this results in accidental clicks, drags, etc), let's report such > > contacts as MT_TOOL_PALM and let userspace decide what to do. > > Additionally, let's report contact size for such touches as maximum > > allowed for major/minor, which should help userspace that is not yet > > aware of MT_TOOL_PALM to still perform palm rejection. > > > > An additional complication, is that some firmwares do not report > > non-confident touches as active. To cope with this we delay release of > > such contact (i.e. if contact was active we first report it as still > > active MT+TOOL_PALM and then synthesize the release event in a separate > > frame). > > I am not sure I agree with this part. The spec says that "Once a > device has determined that a contact is unintentional, it should clear > the confidence bit for that contact report and all subsequent > reports." > So in theory the spec says that if a touch has been detected as a > palm, the flow of events should not stop (tested on the PTP of the > Dell XPS 9360). > > However, I interpret a firmware that send (confidence 1, tip switch 1) > and then (confidence 0, tip switch 0) a simple release, and the > confidence bit should not be relayed. This unfortunately leads to false clicks: you start with finger, so confidence is 1, then you transition the same touch to palm (use your thumb and "roll" your hand until heel of it comes into contact with the screen). The firmware reports "no-confidence" and "release" in the same report and userspace seeing release does not pay attention to confidence (i.e. it does exactly "simple release" logic) and this results in UI interpreting this as a click. With splitting no-confidence (MT_TOOL_PALM) and release event into separate frames we help userspace to recognize that the contact should be discarded. > > Do you have any precise example of reports where you need that feature? It was observed on Pixelbooks which use Wacom digitizers IIRC. Thanks. -- Dmitry