Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3865931imm; Mon, 4 Jun 2018 10:30:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJCuz3s8m8X0b0X1FByN1sgmBiO4euKq7nV4qgTBfFu2EqbNezaCPNEnv1LNEyujB9itAiD X-Received: by 2002:a65:61d1:: with SMTP id j17-v6mr15035663pgv.447.1528133451038; Mon, 04 Jun 2018 10:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528133451; cv=none; d=google.com; s=arc-20160816; b=W18NUdO24ODv1t5Y1X5UwfDFX1Tg+mU6ukGjATeRSG206zi+zEW7MaSeMnGOAphGDI zPtAlG41ebQcqUnQW21dg2pbwuUx6Q78J78ibx7LaKi7m2daMLZvKSnOdZdt5ylw2VXS 1+hDzMkCaRdhLlUDRECG0C2i0Ei56CnX+jBGU95QwPz96MLLRHB7RxTA//5kNcOYVf2a 0mlUNzW9aC7gUVCAE2ZHMAQVpsEMgqDoHod0k2UAv6VGy8rs0JR6cyrfhd3gP/mYizPF TA2b/zBr5gXhfPi/QkWFFuLdepr80ZMnr5mMLL09zFQ94LHNza8wUBDqP3nsb6SSwUJn C5Gw== 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=BV9xGo9F9wSzZccLXWGxz2Lus01GSbeiDw/GTP5lxXw=; b=dEKtUVMYDRHUg7MRlSpTZNbU6LYXF1l+sKO90TfuiwlTfLMkfeQgT3kzGz6+jNWa0i hMTZhIoZkMsQ6G9XUTcf9Eh5EZI9glv1zhTX2g8GrSzxCu66d6wuMvEObxbSdaPnW6R1 gyBnTWbF0Tjalzx+N9ZBrUm6NREW1JB6xVXnHPLI9yWYnxwL5a6gTNtXAog5Cp246zFi unMfCeExlSihm0NoTxbBsaqs2donIIZku6aDQF/TFFwEX4zYuKjmtsldCHFdMCI+gqiw Fgou9LFjXLrFgn7Ic5D/p5CoS483n8QLaEWKE3T0OVsO+a9OQL/JYjMisfN7doK2ygja 3T6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iWTQ7ngf; 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 e2-v6si6156176pgq.382.2018.06.04.10.30.35; Mon, 04 Jun 2018 10:30:51 -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=iWTQ7ngf; 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 S1751270AbeFDR2F (ORCPT + 99 others); Mon, 4 Jun 2018 13:28:05 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36609 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbeFDR2D (ORCPT ); Mon, 4 Jun 2018 13:28:03 -0400 Received: by mail-pg0-f67.google.com with SMTP id m5-v6so10368213pgd.3; Mon, 04 Jun 2018 10:28:03 -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=BV9xGo9F9wSzZccLXWGxz2Lus01GSbeiDw/GTP5lxXw=; b=iWTQ7ngf6pXp8G1l7tzk0zocYlUq826Z14qY/zVPmqBGn89ieUgG0wiNX9POEcbpxf Ol9hOGPuPqkg6Waz89Pn8EdPs+xDnZWpEDdeY1p9pSNC3pNOUJwWDZN1bS481A/VduTj uDkFDX0fmPQKB/eA8vHqX9TItyPuPC0mOlNyvGrvqeC3Nqj9/DmC2C7hdYN6r1e/518L g60+veQRIDhcgVsfAJLyMX/eKfJkTigXUDFSB1jHtKloi0T7mpkengnO8WcpqSjOODWQ DR8tvPfuEn25D7c+LSiO1PARvNIff8s6hnQhRXd7zXyHe368hu5wkF/7V//TCXAI7mfX WMAg== 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=BV9xGo9F9wSzZccLXWGxz2Lus01GSbeiDw/GTP5lxXw=; b=V0KMnD/9peiopbdf0B+Qm0qxfkRsCAuZuANwOivYOHSMODDS6mUaOrPo4Or6bTyju7 9bKmIpAFr3Odo/2otNnCuI1lmUyYeBYXUiD0e7zzBFEUirVdi0cSe6p/4LcbBOK3UlQX 1e0aQtDKlgrwQ/Wcjlc8uNk7NHrW7Ryjld9MlxhaSEjjbn4CamneO9POB5/ybPWD21hx gDXtNvTk2QVt92Mksuub21ehNkNnqPnEj6BTgJtYYf93Untoax3sacIFWsViKERTGSiR ppPLVWOUKKOsiOhKeM5AzggKpZ8Q72FdWjuB16TU5qIjvljwcmav1ikSntTzka8M/OSa t4OQ== X-Gm-Message-State: ALKqPweu8LK0Q0QwCkQCApU0IGJvxuvPhMoifu4Gc16wjHoRTtqoliSr 5XpSW47qNTNInkfuRVc6KWBM/8oY X-Received: by 2002:a63:8c10:: with SMTP id m16-v6mr18354875pgd.120.1528133282408; Mon, 04 Jun 2018 10:28:02 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id v5-v6sm11514280pfd.1.2018.06.04.10.28.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Jun 2018 10:28:01 -0700 (PDT) Date: Mon, 4 Jun 2018 10:27:59 -0700 From: Dmitry Torokhov To: Benjamin Tissoires Cc: Henrik Rydberg , Jiri Kosina , 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: <20180604172759.GA164893@dtor-ws> References: <20170811004500.13740-1-dmitry.torokhov@gmail.com> <20180601184330.GD222005@dtor-ws> <72b7120a-d304-0b2f-d04a-473631623f72@bitmath.org> 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 Mon, Jun 04, 2018 at 02:57:54PM +0200, Benjamin Tissoires wrote: > On Fri, Jun 1, 2018 at 9:03 PM, Henrik Rydberg wrote: > > > >>> 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. > > > > This is in part why I objected to this patch on August 11th, 2017. > > Logically, the confidence state is a property of a contact, not a new type > > of contact. Trying to use it in any other way is bound to lead to confusion. > > Problem is that MT_TOOL_PALM has been introduced in the kernel since > v4.0 (late 2015 by a736775db683 "Input: add MT_TOOL_PALM"). > It's been used in the Synaptics RMI4 driver since and by hid-asus in late 2016. > I can't find any other users in the current upstream tree, but those > two are already making a precedent and changing the semantic is a > little bit late :/ I am sorry I did not respond and lost track of this issue back then, but I disagree with Henrik here. While confidence is a property of contact, so is the type of contact and it can and will change throughout life of a contact, especially if we will continue adding new types, such as, for example, thumb. In this case the firmware can transition through finger->thumb or finger->thumb->palm or finger->palm as the nature of contact becomes better understood. Still it is the same contact and we should not attempt to signal userspace differently. We could introduce the ABS_MT_CONFIDENCE (0/1 or even 0..n range), to complement ABS_MT_TOOL, but that would not really solve the issue with Wacom firmware (declaring contact non-confident and releasing it right away) and given MS explanation of the confidence as "contact is too big" MT_TOOL_PALM fits it perfectly. Thanks. -- Dmitry