From patchwork Fri Feb 1 08:28:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kurtz X-Patchwork-Id: 2077801 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E1156DFE75 for ; Fri, 1 Feb 2013 08:29:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755681Ab3BAI2v (ORCPT ); Fri, 1 Feb 2013 03:28:51 -0500 Received: from mail-da0-f43.google.com ([209.85.210.43]:60976 "EHLO mail-da0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753853Ab3BAI2v (ORCPT ); Fri, 1 Feb 2013 03:28:51 -0500 Received: by mail-da0-f43.google.com with SMTP id u36so1662694dak.30 for ; Fri, 01 Feb 2013 00:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=qoNv0oFiksETWq1As9zgxPXqx07E+LhCxVw/sp86HVs=; b=V+vBNZMZvoXxnX3MYiZPhrcaIBNZwmjGsVJGKhsjkNMjbOzo1XsEfk9+5mRogI8v3E iVWW1UmHDRmzGMC059/gWHbkyKLmNoW4woLyRdNkrZngPQl/YPD9CJNJSXpssaRJpl6+ PhaSyUgt7hNb87RTVe62z2sAd1DerFLV/Hf3A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=qoNv0oFiksETWq1As9zgxPXqx07E+LhCxVw/sp86HVs=; b=TFVE1I6NufMQDA6eiuw7q/OMxA7JvJ1SMsRxqk2domSfk0jlbDgUMj/MOLfgzbsVNN r1RAk5N7ZvE0UlaAL27yCEB5o63Phd7BgSNTQ5n7CICanzX33ttc5umX+ZmvqcQl0SfE 5J6ooz+Pmk+9y+M6LRnQk/WlnCMZsUDFt7XPacWMXKZoT81sao/9ReUbOXvCUpP18cq2 zZMRDz/jv+K9cU9uBN4KT1opDhAJBjrK0MeZgS5xFoGTFCw0gTAZOKVKRjrww4K0xH6r h2ptWHrEdbvbkmNckegaOPFJlZZ9mmEmI82/Z4S/8jBjcun5p2Al9ctTyEJr+GpjIDiB 0DXw== X-Received: by 10.68.130.226 with SMTP id oh2mr29710817pbb.157.1359707330729; Fri, 01 Feb 2013 00:28:50 -0800 (PST) Received: from djkurtz-z620.tpe.corp.google.com (djkurtz-z620.tpe.corp.google.com [172.30.210.61]) by mx.google.com with ESMTPS id kl3sm7772992pbc.15.2013.02.01.00.28.47 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Feb 2013 00:28:49 -0800 (PST) From: Daniel Kurtz To: Dmitry Torokhov , Henrik Rydberg , Seth Forshee , Benjamin Herrenschmidt Cc: Chung-Yih Wang , Chase Douglas , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Kurtz Subject: [PATCH] Input: synaptics - disable fuzz when using mt slots Date: Fri, 1 Feb 2013 16:28:32 +0800 Message-Id: <1359707312-12986-1-git-send-email-djkurtz@chromium.org> X-Mailer: git-send-email 1.8.1 X-Gm-Message-State: ALoCoQkP0PxxVSFHkBmqBhNmYU0kmNv4NG6mQlm7WwUyNTpbMYt27vgSsJse2AP8LmciwpyWS9Mk Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The input fuzz algorithm does a pretty good job filtering out small jitter on input samples. However, there is a subtle problem when fuzz is used with mt drivers that also use input_mt_report_pointer_emulation() to report legacy single touch coordinates. The reported single touch coordinates are taken from the active MT slot with smallest tracking id. However, since the MT data is sent first, it has already had FUZZ applied. Thus, the ST coordinates actually get FUZZ applied a second time, with the just-fuzzed MT value as the 'old value'. It appears that it is non-trivial to fix this in the mt layer/input core, so, for now, just disable fuzz for the synaptics IMAGE_SENSOR path that uses input_mt_report_pointer_emulation(). Signed-off-by: Daniel Kurtz --- drivers/input/mouse/synaptics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 12d12ca..b6c6838 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -1211,7 +1211,8 @@ static void set_abs_position_params(struct input_dev *dev, int x_max = priv->x_max ?: XMAX_NOMINAL; int y_min = priv->y_min ?: YMIN_NOMINAL; int y_max = priv->y_max ?: YMAX_NOMINAL; - int fuzz = SYN_CAP_REDUCED_FILTERING(priv->ext_cap_0c) ? + int fuzz = (SYN_CAP_REDUCED_FILTERING(priv->ext_cap_0c) && + !SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c)) ? SYN_REDUCED_FILTER_FUZZ : 0; input_set_abs_params(dev, x_code, x_min, x_max, fuzz, 0);