Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2813508rdb; Wed, 4 Oct 2023 12:11:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEFK4kukx0fZXW30nWGwfIVvMtusEjGWEeiQvnrE4EEhIT5+WUBGiGTQsmOW5mQ/YuetQ0H X-Received: by 2002:a05:6e02:13eb:b0:351:4f0c:b959 with SMTP id w11-20020a056e0213eb00b003514f0cb959mr2563064ilj.21.1696446689498; Wed, 04 Oct 2023 12:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696446689; cv=none; d=google.com; s=arc-20160816; b=0s/xg19ldodrz1iiKTCIsTWf9hZAfb2dIiBIenBnG9wgNNnJjroCJPIS2FsB9XwoYS VW0UhFHv1rQQhIjlxiDszPWzaPQe0k6Wac+6NiJ0r6sFWa6zfx5TygMQW/ltFL1mLu2I I21ZxtOq6U0I6ixkn4h+NYJkKrFKpss3kxY3cGwJwjoRd1eX+s3Y53q9mgFAdaHZqcmL jHpz9xx4IrFd3V3G3YwFWyTdG1USs+eAOS0Wrl8aOzT8qE8kegtAMMdjvJh9g2DmLb2M Kt/yRPgitdcg3W/78onEqkc1KSO4HFR6k9UCD85jwAkuNMM7KyTdyZ2BfBbJQ8AuDQ8N fpAg== 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=aykmxcWf5jj2fTT2GfYEZw2bLxAykbXHX4bdk8YKgG4=; fh=vtTqdknwEi0evZv3Mz/UnJhADt8YBnT0Eo2uJF5BzJw=; b=SLDWyKEMR73h3eld35hTM6u3ajsE3/QaqMyQ3fjIivVbpXCvvgccEKCM77//oB8/LQ zkBG1XI1qq8O3gQLIconyrERnI0mgW6pNvet5pjdh5JTX9dI8/7dBTUp6UUwzdZnFeR4 p2wzhaaWfBHsbXN3J/hficryj4aQTxcOyaOnr/hIa6FPk02FWWXcindbUMy5Mf5Z5stj eBHIYy5H4n8VN5iJdNvjpKcb5FFUKmN48CBSJIa3gzCfsZo8L60dpXm/ZmFki0vrk2YE L1M7dd1GXcEnwcBWRoss32stUA5n9idqCH+W3rqlitezkLNd6e0YowUUiM4vSn18peiG TEHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RoO0msv7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z1-20020a63c041000000b005859aa3da1esi4314218pgi.492.2023.10.04.12.11.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 12:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RoO0msv7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A656C81F332D; Wed, 4 Oct 2023 12:10:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245009AbjJDTHc (ORCPT + 99 others); Wed, 4 Oct 2023 15:07:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343799AbjJDTHS (ORCPT ); Wed, 4 Oct 2023 15:07:18 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E698B1B2; Wed, 4 Oct 2023 12:02:37 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DB17C433C7; Wed, 4 Oct 2023 19:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696446157; bh=SGlKk9UgYFkMAL2XGFGQZBKyDXatYdRojMg8660XkVw=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=RoO0msv7Cl4OooIbjOp9gY6UHJ6fLJFofFzue0hzOk5mjKoA5/URCl8q81n0H9yLl KNhNkCc5judi7ra62zD/aYZQxprHx7Nu9IZ34Z7yNQLUjYUW2A9Hwu86Kbv8vlreQf Ii2kJve2qk6a2YmP5Qraoj2mzdQQwEyzs/jzN8si/OqqOKZ7Mbi0N2tVIfYYRMy2lf UNhVCDvAyeSy1jcRuDNTscFgCLueRO8khJC1plKWIpS+pab9vFT4Iziij7PoK5De6m 7JMElqGYAoTmAuWdpUfA3ucmgxiLA2V3RGltsg1GIfu+EZ6IOVG9A/SrtfDXcaYH0P kb/DOQ96kwSgQ== Date: Wed, 4 Oct 2023 21:02:34 +0200 (CEST) From: Jiri Kosina To: Mikhail Khvainitski cc: Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround In-Reply-To: <20230923231522.94060-2-me@khvoinitsky.org> Message-ID: References: <20230918145042.37368-1-me@khvoinitsky.org> <20230923231522.94060-1-me@khvoinitsky.org> <20230923231522.94060-2-me@khvoinitsky.org> 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=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 04 Oct 2023 12:11:00 -0700 (PDT) X-Spam-Level: ** On Sun, 24 Sep 2023, Mikhail Khvainitski wrote: > Built-in firmware of cptkbd handles scrolling by itself (when middle > button is pressed) but with issues: it does not support horizontal and > hi-res scrolling and upon middle button release it sends middle button > click even if there was a scrolling event. Commit 3cb5ff0220e3 ("HID: > lenovo: Hide middle-button press until release") workarounds last > issue but it's impossible to workaround scrolling-related issues > without firmware modification. > > Likely, Dennis Schneider has reverse engineered the firmware and > provided an instruction on how to patch it [1]. However, > aforementioned workaround prevents userspace (libinput) from knowing > exact moment when middle button has been pressed down and performing > "On-Button scrolling". This commit detects correctly-behaving patched > firmware if cursor movement events has been received during middle > button being pressed and stops applying workaround for this device. > > Link: https://hohlerde.org/rauch/en/elektronik/projekte/tpkbd-fix/ [1] > > Signed-off-by: Mikhail Khvainitski Applied to for-6.7/lenovo, thanks. -- Jiri Kosina SUSE Labs