Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp422148rwe; Thu, 25 Aug 2022 02:56:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR5DI2trfduH/9XB4Ge2DNQF676WxTx/SuJwKQ7+r2on+Jm6aEK/MHNEbJDmTABTOiGXUSqz X-Received: by 2002:a05:6a00:4acc:b0:536:46c4:d084 with SMTP id ds12-20020a056a004acc00b0053646c4d084mr3152424pfb.71.1661421404229; Thu, 25 Aug 2022 02:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661421404; cv=none; d=google.com; s=arc-20160816; b=dFS3ioy1etRSr55EPgwPqkk2AoT4e2Zhnzuq47saKCbt1Hasvq3BZV9ZTW6v15cx4B mrxI36VS4/Jt6HsMc8HZOSJDEif5gNUG+jiakmOax20+uG1bzCaGxw0MGFQrQ7Bb8srd 0/WmKAn64Aw35e0Bi9vgmFftzLCKPeutI9jNi8UzzcBa+g4eUVhKYVUoyNPnXyHrFQ6K JXG+UEpMd305FQ8jjnzzeUaXAsOUMmtXAkM93hfPBQmZNbaDYRxZm0j7qQF4XjGztBfe HElD9L2AmfOESLKSRu5POV+wVxmd6ikdkPGnRw0/rX38b7XvgcjCUfZV7aRagc87zmti gQbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=h68t7Z9LcpVJ7QsOJ80GGU9u2HXZCgI2R6iU12RLtak=; b=SkdiJoAyVwIyFQKOFdsMXB2DCGz3/QFM/fIZqanPPJ5OZQCZs1bfxL//02PlvVrDqZ tooPDc7VGJyuXQ5cg9rZM4LdAkqiQV8jn3icDgyrh0pDIMY3ikzW/y54F9kQI3POSuNz 576d1NVXjBHhFBGFIF3d/yBv0qi08K7S12224yO7gzXF7gWOuyD+KJseVoss6HUxsu/A boADGMZJ8mJzzXUZCgp2F5/qeN3t97mCOh8j0IJthiZv2Q6hgt5qDvaVB8+qnUkJRN8Z cpi3Vasnwxvht08WoyDO7m5TsnS2RRO7eQNKf5a9UAkvGCCxQZKS7jUZwzmHTFQSmP4+ 5yFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JnYcNWP2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cq13-20020a056a00330d00b005379af8496fsi689798pfb.22.2022.08.25.02.56.31; Thu, 25 Aug 2022 02:56:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JnYcNWP2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240685AbiHYJrM (ORCPT + 99 others); Thu, 25 Aug 2022 05:47:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233215AbiHYJrK (ORCPT ); Thu, 25 Aug 2022 05:47:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 661AAAB417; Thu, 25 Aug 2022 02:47:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E12AA61C21; Thu, 25 Aug 2022 09:47:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 179C7C433C1; Thu, 25 Aug 2022 09:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661420828; bh=DwxCA3CR5K7a5JzZ8eAf21/k+uiLRdWoQ4yt0z0nFpc=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=JnYcNWP2FZZlj3MXdirxSFt2g5hGq6hXHAauSxw3SV7os46ogZMXg3fmCTy6SxmaP uNuPUxpxqUDyJAB+hRAru4H9g4OMK/N4e8W4OqCpxKv84IhJH1zwrY+fRPvpUsNNQN AFO7/43Nz7zIZRQy/yoIwKgUO+1xEJI28bSIZIbtZ0GVuxsUw8fFbIhaGdoiu+4CIm sP+0wt/1NN+dHQC86G8vQCdqiWmkuyiXhExUqKglh2bwobFxxaAEG8Ot1pEos6CFNz z2r7wgRl7s8ZCIHRSNoDrR/havAM/TUpxKLrDGoAqZlXb/WnhVhTtHTcKjcy4VyOCT NEFcphLIHNhgw== Date: Thu, 25 Aug 2022 11:47:04 +0200 (CEST) From: Jiri Kosina To: Benjamin Tissoires cc: Stefan Hansson , =?ISO-8859-15?Q?Jos=E9_Exp=F3sito?= , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: input: fix uclogic tablets In-Reply-To: <20220822062247.1146141-1-benjamin.tissoires@redhat.com> Message-ID: References: <20220822062247.1146141-1-benjamin.tissoires@redhat.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Aug 2022, Benjamin Tissoires wrote: > commit 87562fcd1342 ("HID: input: remove the need for HID_QUIRK_INVERT") > made the assumption that it was the only one handling tablets and thus > kept an internal state regarding the tool. > > Turns out that the uclogic driver has a timer to release the in range > bit, effectively making hid-input ignoring all in range information > after the very first one. > > Fix that by having a more rationale approach which consists in forwarding > every event and let the input stack filter out the duplicates. > > Reported-by: Stefan Hansson > Fixes: 87562fcd1342 ("HID: input: remove the need for HID_QUIRK_INVERT") > Signed-off-by: Benjamin Tissoires > --- > drivers/hid/hid-input.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c > index 48c1c02c69f4..871a185a0f1f 100644 > --- a/drivers/hid/hid-input.c > +++ b/drivers/hid/hid-input.c > @@ -1532,7 +1532,10 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct > * assume ours > */ > if (!report->tool) > - hid_report_set_tool(report, input, usage->code); > + report->tool = usage->code; > + > + /* drivers may have changed the value behind our back, resend it */ > + hid_report_set_tool(report, input, report->tool); > } else { > hid_report_release_tool(report, input, usage->code); Queued in for-6.0/upstream-fixes. Thanks, -- Jiri Kosina SUSE Labs