Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4168470imm; Tue, 29 May 2018 23:55:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIFLLndnTEjU0a4fxJA/aEooOgCP1I4X3vWR26W8Z6jnms5MPsoTnSqkABgwp/wJPSZ2H7R X-Received: by 2002:a17:902:e85:: with SMTP id 5-v6mr1672706plx.318.1527663353534; Tue, 29 May 2018 23:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527663353; cv=none; d=google.com; s=arc-20160816; b=zbC3VtQoqILnTzH31Qc/p6yzx0C83CM2QMPRWHnrg2ZxGX9k21qWQuX7lAD+yMEC/1 KCJQximeLZ70UFUIgEo/kOCAGNqPGz+onwkq8JCfuPGonWw2QgMUKSASQzU3wl/G3BVa FQUutrOaiV5hXVy5LgP8MPFps7W9Kfc1W+jEG25pDU1PKFD8qvc9Ii5Vp9UtYGvjZg13 QE9EnBqUgnikYYSvIQKrOCbETRMl5krWeMk4nvfvblgL8QS+PeymV3O/BnqIgocARmRP MPObVtXS78MPCxyKhUm69b3RhHjXj457ficG1feIzGnEMNHM3CSqM32y/haZQrdu4NJT NLeg== 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 :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=OXU2aH6XwlB9AsCAs0YzIyiTLNWmXhItDuGgQ/VgRzo=; b=UEMDtVXU8KmQ8uBLRYijpOgOs4hEJaePu03zjKLn+FHYCm3Mhtev//zKjvjZR3rKv9 9+RTnAltoLCu6ZAqRdiAJT3InRf1IDwxHmnclAg9JwdHjvQXN5q+sq6N/HcXcKQebD5F TiVdl5j3ML3y0WVk8c73hewbJCGboiBo3FAObf/wwU1Ij5PMEOWXcQpxT27K/xnvT8F7 1iYAwlX+JT97d31EpvsmtQh8wRwfBv2DoqVdAvSCbS4BPlMlmooBoDQBhJBkZtj9l5qA TBJLNTSHlzcfAdjV7LeDATsEseOVKPLqbYkWX4wyq145tg+LfC2igiviuWWK00rhfM0Z ggQQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3-v6si32757300plp.241.2018.05.29.23.55.39; Tue, 29 May 2018 23:55:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937152AbeE3GyL (ORCPT + 99 others); Wed, 30 May 2018 02:54:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:55218 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935905AbeE3GyK (ORCPT ); Wed, 30 May 2018 02:54:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 62599AC65; Wed, 30 May 2018 06:54:08 +0000 (UTC) Date: Wed, 30 May 2018 08:54:07 +0200 (CEST) From: Jiri Kosina To: Ben Chan cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires , dtor@chromium.org, drinkcat@chromium.org Subject: Re: [PATCH] HID: multitouch: fix calculation of last slot field in multi-touch reports In-Reply-To: <20180529225655.214380-1-benchan@chromium.org> Message-ID: References: <20180529225655.214380-1-benchan@chromium.org> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 May 2018, Ben Chan wrote: > According to [1] and also seemingly agreed by [2], the Scan Time usage > (0x0D 0x56) is a report level usage, not a contact level usage. > > However, the hid-multitouch driver currently includes HID_DG_SCANTIME > when calculating `td->last_slot_field', which may lead to > mt_complete_slot() being prematurely called in certain cases (e.g. when > each touch input report includes more than one contact and the Scan Time > usage appears before any contact logical collection). > > This patch fixes the issue by skipping mt_store_field() on > HID_DG_SCANTIME, similar to how HID_DG_CONTACTCOUNT and > HID_DG_CONTACTMAX are handled. > > [1] https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-precision-touchpad-required-hid-top-level-collections#windows-precision-touchpad-input-reports > [2] https://patchwork.kernel.org/patch/1742181/ > > Fixes: 29cc309d8bf19 ("HID: hid-multitouch: forward MSC_TIMESTAMP") > Signed-off-by: Ben Chan Applied, thanks Ben. -- Jiri Kosina SUSE Labs