Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3920506imm; Mon, 4 Jun 2018 11:28:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK48msSieoA6Op5xBibB5ucYeUTCKu8O8SsuXAU8NFTH3zS6rEZLDuUHPgl6MroB8TEym+z X-Received: by 2002:a17:902:650c:: with SMTP id b12-v6mr5302494plk.31.1528136924487; Mon, 04 Jun 2018 11:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528136924; cv=none; d=google.com; s=arc-20160816; b=IOPC8BeVPb9n15PpxZ7lq6Z0v3NOQdrFhcHEh1qqDSEsmhwuot2vwkN/tGMaLdrli5 WfFQwnJBkK64cdD34+0dDDk/lJzbQtd1pKvqUlx6y2c9xiQOs+aSJlZG7Ub7xYxV77aX DWp5SNUHzdRF5eRbqC/sLGooqObrCgziC7gYT1Ro3/GNAde9EoHwVGB5Rx43BgpvD3ld qt0x9ddNDMuu3e/QlJrC41qPV+T/mSk7v9bMzHScwYN7NqzswAfjihwRR3yedxa71O9z 55LryQpehZ1hqJrptHnjyvYikxl/ji9ash7FwU6adDRCGTowglHyZwFJbcih+1LSsnkJ Mg9g== 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=URfR3VGUnbXJcYVN5tCaqUt/JwpUnEKbOkR/eIXha8U=; b=VuYtv+t9L3MluN1d6LrziuymqWh1S5ptyCy+hkTr63XpJfeUjdE33TT1XZ+gCpuEmR SIqSdvFmURovynIpWANYjFUgtJvSS5a6mJMV+tCaCXgbc62yzUT2O1yw+F8/l6CUl/Gi ZviRsoMEp34RMhV2LG2yxnAnGYHAs81fpGWHdEhYdasMT1gZGT1vrVP/EYbmh+KFmfhm 4FFTiGSSJ/vZYiaDNSobEqbUeaJCJMzQIMLaFweAu3oZdFkxM2+OSSe62cTFHwd8c9K/ Q8hNzdwRNUJwkyQTg14bxGYpKGlBok6Qp04xrPQ6m/A/ocucjXua90vIY970OELprsOd 26SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GmfosQ16; 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 j16-v6si8354208pfj.55.2018.06.04.11.28.30; Mon, 04 Jun 2018 11:28:44 -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=GmfosQ16; 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 S1751424AbeFDS1D (ORCPT + 99 others); Mon, 4 Jun 2018 14:27:03 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:42400 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750815AbeFDS1C (ORCPT ); Mon, 4 Jun 2018 14:27:02 -0400 Received: by mail-pg0-f68.google.com with SMTP id p9-v6so14798258pgc.9; Mon, 04 Jun 2018 11:27:02 -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=URfR3VGUnbXJcYVN5tCaqUt/JwpUnEKbOkR/eIXha8U=; b=GmfosQ16s6BUQ85NS90t4mCJ6DHd0AvUpf66bck1uZX7wAnnPoDoq8Qtbp9kJTlII+ AjRGFhwOwLmHiJ6m1XBnZIbvbnZrS7LK3zbm06/7TQCwAHIzrqLJ7myvchQf5U0LOMDn 32Xt47pe/5Bp9FhxgPUkR65JRBavqHQNEalCl17UNBmebeMfpHD1jkl81YDTADYeoC3G +4xcxjyc08Tv2xAaAJnN5yeCJDZIOOEq8IPMlZBFy5AA6Buipxs7e1xc9yCn93N++sp5 ZI0Oxp0jyUpufeKarQ2bNfrrjGkZuuyh2u16e18BmLFVHqHIoHxxquZk8qJHjIpVfC0t /7EA== 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=URfR3VGUnbXJcYVN5tCaqUt/JwpUnEKbOkR/eIXha8U=; b=Xa9PBZMaHFGWBEAWRlJORtWrZudp0gGWsUExCw61garmaALI2Fyu+FxEw+rnA1uIJT 2pNmsuVQFTYkZq69gh3LO74TRZ+JrLdXc4j9ym5Dkd0SgMVFcLLKSl5XN0Td4kU4poUY 6wB4E545Zi13QV1AtmmVkLzhzgqux9zIdnH3klWbOmb1IyloHRmmn2E7f2KC1xoxdd6k x3VtJCdIFgpjVZb569JR5keXo+gJtfm8lrZmqgMkcZMCVFYxP/FGZMDUs2g1jnzpyHS/ MnimGQ3+mS8J002QPeHGLTNQVmv+tQrqRkjlQg0485/5rP9pW4W3CfWj/cfRTaqIM/8n xwsw== X-Gm-Message-State: ALKqPwd6GP6Jl+qiehtLFlzkZ221rCPuYT7fwWXCmVPLZo9cpY+jSQ7o a/BI+JG3kHUrQN7l+c8WlJQ= X-Received: by 2002:a63:a902:: with SMTP id u2-v6mr17963860pge.169.1528136821352; Mon, 04 Jun 2018 11:27:01 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id u8-v6sm75594028pgq.7.2018.06.04.11.26.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Jun 2018 11:27:00 -0700 (PDT) Date: Mon, 4 Jun 2018 11:26:58 -0700 From: Dmitry Torokhov To: Henrik Rydberg Cc: Benjamin Tissoires , 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: <20180604182658.GC164893@dtor-ws> References: <20170811004500.13740-1-dmitry.torokhov@gmail.com> <20180601184330.GD222005@dtor-ws> <72b7120a-d304-0b2f-d04a-473631623f72@bitmath.org> <20180604172759.GA164893@dtor-ws> <994e5698-fbdf-05c8-b0b6-3df6af1b3dbc@bitmath.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <994e5698-fbdf-05c8-b0b6-3df6af1b3dbc@bitmath.org> 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 07:55:57PM +0200, Henrik Rydberg wrote: > Hi Dmitry, > > > > > 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 agree that the contact should stay the same, but the fear, and I think > somewhere along the blurry history of this thread, the problem was that > userspace interpreted the property change as a new contact (lift up/double > click/etc). Finger/thumb/palm is one set of hand properties, but what about > Pen? It would be hard for an application to consider a switch from finger to > pen as the same contact, which is where the natural implementation starts to > diverge from the intention. I think the userspace has to trust our tracking ID to decide whether it is a same contact or not. The current issue is that kernel is forcing tracking ID change on tool type change, and one of the 2 patches that I posted fixed that, allowing us to keep the tracking ID for finger->palm transitions. I think it is kernel task to not signal transitions that do not make sense, such as finger->pen or palm->pen etc. > > > 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. > Indeed, the Wacom firmware seems to need some special handling, which should > be fine by everyone. I do think it would make sense to add > ABS_MT_TOOL_TOO_BIG, or something, and use it if it exists. This would apply > also to a pen lying down on a touchpad, for instance. OK, I can see that for Pens, if we have firmware that would recognize such condition, it would be weird to report PALM. We could indeed have ABS_MT_TOOL_TOO_BIG, but on the other hand it is still a pen (as long as the hardware can recognize it as such). Maybe we'd be better off just having userspace going by contact size for pens. Peter, any suggestions here? Thanks. -- Dmitry