Received: by 10.192.165.148 with SMTP id m20csp565327imm; Wed, 25 Apr 2018 04:21:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx48CWVYRQET73tXLXWFT/VS3mBNPca/B8zlT4zx6foAldz5+cdJX/V1VCJrz+Yy2FI89X+q+ X-Received: by 2002:a17:902:591e:: with SMTP id o30-v6mr28418459pli.309.1524655312288; Wed, 25 Apr 2018 04:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524655312; cv=none; d=google.com; s=arc-20160816; b=wl5Eho9WcdK+w2/v03+9PhCMZNuv3UzbxWBR2MaWVoM+5z5MNbbLYo3bIeh1FQIuQH lAMvBmJe1oXfA1vujSggArHcLEjCi6Tr3aq3Cn2dF2qeGcdOWuzUtfnr9rUNnuR8fndi ogk/uJv0gx8fZYwF8YXtUrQ8w5QFj1xDfsMFjKKZTtbCrhkcNTPhlO7clmULHt0pW1vs P+xJ8U8BzzEbFzWwyJ8w6KMM4jnzHJqPp0Ba4DUWESxOevm/2HswvZAoHuO64b4B1Zgk E1wr4T8Oggk84RIrlAgEA4S5KhbPM+qcE0+7S7LNkVVDo5ZTIp3+4/hnIyY648nJ3epE xi5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=HLFKMPyE3sU7W5inqK4f6TuvV38gA2wImnOzZ4tbgjc=; b=G9uZPo3buobh1z0xx09RrWJec1JapvaL4tb2zvh9nglosV48/RscK6/+odL7E5nzUu LgRNGjIPDy1oUm5xonEOg8e9RNjRmR0BbE5bwKZQXFXS94Y7TdKgy1aGHXiwf7Z5T7D1 L34vjhnhy9oVWL79F5wCAfY5HmTuhMQ40IqPvVHVBp24i2/nnv8LQgSigdmqCqiB1hEI vaq7Q0YpTY8K2ly6o0QZEQPy27na4dXA0CBid2jn3jxzwN5H8xxig161btfjEj4++FJV VLis3XH+35UIC1OSDnFsj+GruLsNnC8sAcIa0YQM/mtXlzmDaW6w70GzmkK0UTBdfBHd cB/w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u65si3869478pgc.137.2018.04.25.04.21.37; Wed, 25 Apr 2018 04:21:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753767AbeDYLUi (ORCPT + 99 others); Wed, 25 Apr 2018 07:20:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51968 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752906AbeDYKjx (ORCPT ); Wed, 25 Apr 2018 06:39:53 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D7127266; Wed, 25 Apr 2018 10:39:52 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Hutterer , Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.14 034/183] Input: synaptics - reset the ABS_X/Y fuzz after initializing MT axes Date: Wed, 25 Apr 2018 12:34:14 +0200 Message-Id: <20180425103243.953529860@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Hutterer [ Upstream commit 19eb4ed1141bd1096b9bc84ba9c4d03d5830c143 ] input_mt_init_slots() resets the ABS_X/Y fuzz to 0 and expects the driver to call input_mt_report_pointer_emulation(). That is based on the MT position bits which are already defuzzed - hence a fuzz of 0. In the case of synaptics semi-mt devices, we report the ABS_X/Y axes manually. This results in the MT position being defuzzed but the single-touch emulation missing that defuzzing. Work around this by re-initializing the ABS_X/Y axes after the MT axis to get the same fuzz value back. https://bugs.freedesktop.org/show_bug.cgi?id=104533 Signed-off-by: Peter Hutterer Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/synaptics.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -1280,6 +1280,16 @@ static void set_input_params(struct psmo INPUT_MT_POINTER | (cr48_profile_sensor ? INPUT_MT_TRACK : INPUT_MT_SEMI_MT)); + + /* + * For semi-mt devices we send ABS_X/Y ourselves instead of + * input_mt_report_pointer_emulation. But + * input_mt_init_slots() resets the fuzz to 0, leading to a + * filtered ABS_MT_POSITION_X but an unfiltered ABS_X + * position. Let's re-initialize ABS_X/Y here. + */ + if (!cr48_profile_sensor) + set_abs_position_params(dev, &priv->info, ABS_X, ABS_Y); } if (SYN_CAP_PALMDETECT(info->capabilities))