Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752612AbdHKG2p (ORCPT ); Fri, 11 Aug 2017 02:28:45 -0400 Received: from mailrelay1-2.pub.mailoutpod1-cph3.one.com ([46.30.212.0]:45855 "EHLO mailrelay1-2.pub.mailoutpod1-cph3.one.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751618AbdHKG2n (ORCPT ); Fri, 11 Aug 2017 02:28:43 -0400 X-Greylist: delayed 963 seconds by postgrey-1.27 at vger.kernel.org; Fri, 11 Aug 2017 02:28:43 EDT X-HalOne-Cookie: de779de425e82869a8cd34758a1046c2e39f9418 X-HalOne-ID: 1337bb52-7e5c-11e7-a520-b8ca3afa9d73 Subject: Re: [PATCH 1/2] HID: multitouch: report MT_TOOL_PALM for non-confident touches To: Dmitry Torokhov , Jiri Kosina Cc: Benjamin Tissoires , Jason Gerecke , Dennis Kempin , Andrew de los Reyes , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170811004500.13740-1-dmitry.torokhov@gmail.com> From: Henrik Rydberg Message-ID: <5528ad84-9b42-8826-abb1-1aef06876284@bitmath.org> Date: Fri, 11 Aug 2017 08:14:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170811004500.13740-1-dmitry.torokhov@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1755 Lines: 33 Hi Dmitry, On 08/11/2017 02: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). Changing the tool identity to signal the tool property of low confidence does not seem quite right to me. Using MT_TOOL_PALM forces a semantic distinction between tool identity and touch state, which userland seems unprepared for. The additional kernel state needed to make it work raises the question if more considerations will turn up over with time. Why not add a property event, like BTN_TOOL_PALM, instead? In other words, modifying the definition of "active" as you propose, but then use a BTN_TOOL_PALM property to signal "s->confidence_state"? It perhaps creates a different oddity for applications unaware of palm, but AFAICT, it would not complicate the notion of touch state. Or? Henrik