Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2061760rwe; Sun, 28 Aug 2022 03:00:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR4MGo92QOgp9Xhm56HwXxzejvIgeynTpi767Wuf3/6WNiolKG9wHdhIKDP4BEMsLSXvDk5s X-Received: by 2002:a05:6a00:1a0c:b0:528:6baa:a2e3 with SMTP id g12-20020a056a001a0c00b005286baaa2e3mr11856136pfv.27.1661680810344; Sun, 28 Aug 2022 03:00:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661680810; cv=none; d=google.com; s=arc-20160816; b=Q8Ko2L+5XXS40SYM/6qMYla9/THAEno8A4OQ18+Kzz3DG9BGjMLzdMly6lvF1jaQVJ MHea6DbYBecBwFNKchlrWlpHZhCWzzgvYAdtHigEBSKzSLTokhJTBHtkj8IkMfLkFKZr h3pOB3MDTOb6RybzbBxPfK0vIkMKrcXl3o1fjvixcy059TsOPMhbjQSstd+oI3dkRekn xn+s5hdCy76vTXdT3KFV+pxyk9fF4lt9m6ciwoOSR2P5QrYar7X+S9eQVJfV88tdwd9N PhUlxP4dtR5C8oWbrT2s9WfEzlbWOL+d2tpgbhpQtBssLyY9ekWMo6XajnMC+HUpYgqx XCkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uF1cBWnD9V/6QV2r1LkXOLqZB9ABkh9yZksOLuQoa44=; b=ORNASHDC/176yDGvWOZb/QFaa4AAQATce/9bxK8jvLSyVne0Wy26tF9L7MvcvzwcGF ob3sgcrNF5FKPFwS59Q5L6fWsDmmz33Nzsqfk/+l+J6npFrgBUeZjSVrnaDaeT5up1/t biNmrNG9sq0CAFHoUY3ipBGKfZOToa32utyZSL5f53EZLye85xZL0lEtzXWcLd6MGuSl 8bvb2+jzIdJcZoKf5f5bO63BNG06VJ0+pdJw4TElExfrxS1vhna01MgSSnqh7HA4EqDV o50t+3OT9z8/miR7PtgUiHcf9P3U7xWGdATZnf26jGlnat0QqnBmopaotRtD2ipN7COy aEBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nwu6Q0fs; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w19-20020a63f513000000b0042b40184510si6814058pgh.707.2022.08.28.02.59.59; Sun, 28 Aug 2022 03:00:10 -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=@gmail.com header.s=20210112 header.b=nwu6Q0fs; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229594AbiH1J6D (ORCPT + 99 others); Sun, 28 Aug 2022 05:58:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbiH1J43 (ORCPT ); Sun, 28 Aug 2022 05:56:29 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9804952FDD; Sun, 28 Aug 2022 02:56:28 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id i188-20020a1c3bc5000000b003a7b6ae4eb2so1690226wma.4; Sun, 28 Aug 2022 02:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=uF1cBWnD9V/6QV2r1LkXOLqZB9ABkh9yZksOLuQoa44=; b=nwu6Q0fs/GRqHRUdjnJP1FjlGAL69zA9WwsQmQwq/J9QwNzh8+Ij66BtBS5yLFSDaU O32mZYa4STFSz8AuMEVn6fZPoF5iM7+e28ooYlWc7sFkp64/e4Q73QJO8VH5uaz3kD0p /WRqkB8GQpjcRkKfQEJT9aRTnnL9BMGQgMNFVHANGJ5av4z45WQWI8j2XZtCWD05PUSp Cw8zYJVKVKydgyMejjvI77VwwR9qPl+42rh7ncFTVWWvq0P1NvQxnP7mDOw1dw2fNy79 ufkdElcBYv88+L1Tp39ZwoblwW+r8YquF6Y75tsEOmVWTlRccAkT99jNqri+09konGMQ MmYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=uF1cBWnD9V/6QV2r1LkXOLqZB9ABkh9yZksOLuQoa44=; b=zxc2YAa3/EZB75ppNxjTAecqHVTvNE+ljayXsrnSjm1sGwjDV+Xqo3LUI/dpU1e+i/ Fbzd5yGn6lwxJ1ch/FcimiW0ksFDMtx+DmFuKC49LmpVpvgl6XT5ZdSMK+/g3VV2fXSn n+cbU6AMqMuq9PLtr4V2R5ovKVrw8QHzZ4iaFyV/OnSI1N/Gchk6ZXBir+GNXwhlxeej VZNZRzrwoF1dMhhq2CocnGZ8YjHtdxOmifq073jCRGKuPZDf9qUA1XY0QYJW5fFKI2pV EF0LBOkQybq6CIaDh6W8Mg5s93uehIRJl3LtQ1B+DnmGM3/29lV4U5Uyc5gwlV1tKB6L a6kA== X-Gm-Message-State: ACgBeo3klJNwLONbIFGQzyoRtHhwdFnb6pMA8T8aOQ3cv7jszrFJoj26 j/kUvZldmzrT2ROMZ+w0sm0= X-Received: by 2002:a05:600c:1e88:b0:3a6:2ca2:e34f with SMTP id be8-20020a05600c1e8800b003a62ca2e34fmr4175835wmb.146.1661680587091; Sun, 28 Aug 2022 02:56:27 -0700 (PDT) Received: from elementary ([94.73.32.249]) by smtp.gmail.com with ESMTPSA id h15-20020a5d548f000000b0020e6ce4dabdsm4122020wrv.103.2022.08.28.02.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Aug 2022 02:56:26 -0700 (PDT) Date: Sun, 28 Aug 2022 11:56:24 +0200 From: =?iso-8859-1?Q?Jos=E9_Exp=F3sito?= To: Benjamin Tissoires Cc: Jiri Kosina , Stefan Hansson , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: input: fix uclogic tablets Message-ID: <20220828095624.GA4121@elementary> References: <20220822062247.1146141-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220822062247.1146141-1-benjamin.tissoires@redhat.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 Hi Benjamin, On Mon, Aug 22, 2022 at 08:22:47AM +0200, 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. Apologies for the delayed response, I was on holiday. Tested on the affected device (HUION H640P) and I can confirm that the issue is fixed. I also tested in other non-Wacom tablets and they keep working as expected. Best wishes, Jose > 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); > } > -- > 2.37.1 >