From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7519E3BE636 for ; Sat, 17 Oct 2026 16:41:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792255311; cv=none; b=jyBXqYeh6cEpTm/fAoLK3xlqTqC4U1w2phTJNrAgc0DKkbQrw15M/1i7vwqLsm1A1soQ9+jOU3uIsDWfxRSrYP1RGhN1a5Dk+Bd3UbaXoowtqUdaoxdNatxIMAUqi6J5ez0/t0W7/u3kbQs40B4+eC9qK4c6/mh+2PtBO1Ksj2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792255311; c=relaxed/simple; bh=f0oOwJ99ASBwohPnUw6E+rSWJn8E7P22P3UNI/krsOI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mGDWrgCS4786Am6fkc1vFw5W1ykBWj6h2MG0Kb/FAc7AVqSBQNVE+LmOfEQ8DkPV3QwazsZemxmua9KJJ5F2WrrVQ9g6w8ccybP8kelJOLTREbQlH4uyTAcV8WjubuYr9aCdNQkC/zY+2H4aMxK+9nSMoj9FQj4H62ILZCSPrRY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eaqPQQaB; arc=none smtp.client-ip=209.85.219.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eaqPQQaB" Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-91b55859245so14384966d6.0 for ; Sat, 17 Oct 2026 09:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792255308; x=1792860108; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=tJIcl5oLftMCiRZNmyVUnJAZje8wxQdTARXgo+oxa1E=; b=eaqPQQaBtGDG4Hzd2VZQKPEnLDGwTroNn+VSySiQssXijYvMQmXTzNeIgSkJxWK2d3 PbDSaNgAagAzegi2jRxPuIHJ4LPUwpA2EA+aMJgZHDQbzi2BpFjz9a9xVPWIR0sW+O3C A+brrb1J15bXvwwugKD+DouyK5VjA6664zHiwsXeeQDygIxntBTwU24M+owZHOe5aQwq nOun5yHsz0zeYJE3sxRQBrGIq5YPOW1vgqX58VKuRevXLH/8hv4b6bFCWHzo/cVR8XDw gXIpsqwoRG6WzSiFrEEhLtZzMFSmEVuN0pbRDM/ReQjKkRm96Sf0z9tPTdVGrV8IK63L nICQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792255308; x=1792860108; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=tJIcl5oLftMCiRZNmyVUnJAZje8wxQdTARXgo+oxa1E=; b=qbJZmS1efohtIFKVyzg/KIgvcgRQlTV1QsfvRIlk/xMD/IaF/Zn+mXR/3IpVtmiALG KYoGQfS1wNWr4Sy6PZHvdaUFCwjA6AV+Am+zhtc+0VQf24XQ9CPilY8LyD2Mb+StfO49 PoUrsZFgepIFEE/IaEVJUjnvi0Wmdkg9v3UVvVKDQsb5cq0PfQsQ9GKNkHeZLBK1N+tp y+P0BZSpkWAwkW+t56dx5Z2k1DPeDuIOc3/8x6tFRDr/aovglTA3tWVxJD6kEuEFCAnO WXLrJps03XGBIR+j5IpYhgFBYl4JNWO5fJi+jW/UheEPlEZ/b7T5zvSV8S4NSgG7YQhA P9LA== X-Forwarded-Encrypted: i=1; AKwUvBwPPIgYZGIppEFwZtpndk6pBaULEn4FBrSDsJpaJKA9Khnlwygd/DphJ1ze286dZt83loj2Xk9jkVZyHg==@vger.kernel.org X-Gm-Message-State: AFq9FYKzJwsqieJ8RjuotISdyg/EvWxve+zAw4mVXivU4Di4ZMr0poYH k3JT9vWPfQ4fJBWLorx5zRmVYUkg8zMAoApMsE8hAvSBM6J1GKCdt3/u X-Gm-Gg: AYBFou3yKSYpeD8wWlTXlUM5LZXyvW6m3JFgtOc9LhYVNHoJnaznPdO5XRfs0/S/2E9 K1Hc5cx15FQxOq9cg2Y18NF9aX8GGMZmAIL5afMKMZBpRGTEdYBS4608zGh0qcNQRRkDIqJTXx7 6z5ITGu4ZtSumwAcNwAHUQk994KW42Y/WOvdnWPt58IFzmQVGYhnib1Q4d781/twDpUlZDVz7n9 7ERnSp7XzYwxr8HijelGqs+Z24uu86u+fJi6Isi6mhHaCSTTaFFzY45VuX3Pw91RfrSfKaj+Toa jB++LRXZCWVmdTg9x83oRrb9BAVxdUrKk6l8PlIU+aBC2Z5o9hYXExyOBwJoGn4GAKSoxTPqDPu NCbhPTN15bBTQWv2RtpVh7ZOxmKMBQOHpWkSzju/0QORs+bXpIkyE4DqidYTDzLpkXRbP+wLO+r KdKkL/i7jgaIjjd1RHkpygxurI1xIxy+WgnXE13JqctgDAoZrav+Z88e89mtCHL9zY X-Received: by 2002:a05:6214:3b89:b0:90c:4422:84d1 with SMTP id 6a1803df08f44-91bdf17e317mr60816536d6.30.1792255308456; Sat, 17 Oct 2026 09:41:48 -0700 (PDT) Received: from beelink ([187.15.140.245]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-91bcb8c4adasm51061296d6.1.2026.10.17.09.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2026 09:41:48 -0700 (PDT) From: Aldo Ariel Panzardo To: jikos@kernel.org, bentiss@kernel.org Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Aldo Ariel Panzardo Subject: [PATCH v11 0/2] HID: multitouch: fix haptic lifetime on delayed input release Date: Sat, 17 Oct 2026 13:41:37 -0300 Message-ID: <20261017164139.1791033-1-qwe.aldo@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit v10 review found that the multitouch slot setup ran before validating the haptic class and selecting the input that owns FF. This could set INPUT_MT_TOTAL_FORCE on an input without haptics. If no multitouch touchpad input was found, haptic mode could remain enabled. Patch 2 now validates the class and attaches FF before setting up MT slots. It selects the input where multitouch touchpad pressure was mapped with gram or newton units, so an earlier multitouch report without haptic pressure cannot take the sole FF instance. Only that input gets pointer emulation, total force and haptic pressure accounting. Haptic mode is disabled if no input receives FF. Patch 1 is unchanged from v10. Tested on x86_64 with W=1. The HID multitouch module compiled, and QEMU/KVM with KASAN completed 10 virtual UHID haptic cycles and 10 multi-input cycles with a non-multitouch report before the multitouch report. The tests checked FF_HAPTIC, effect upload and playback, HID removal with an open evdev fd, and final release. Two negative fixtures had gram pressure but either no haptic reports or no touchpad report. With two contacts, v10 summed ABS_PRESSURE to 30 in both cases; v11 reported the oldest contact's pressure of 10. A split-report fixture placed a multitouch report without pressure before the pressure-bearing one; FF, INPUT_PROP_POINTER and ABS_PRESSURE were on the latter input. No KASAN report was emitted. Physical hardware was not tested. Base: 58161ead29e50d70a317ea26b472e0c7508e69da v9: https://lore.kernel.org/linux-input/20261017140332.1480375-1-qwe.aldo@gmail.com/ Aldo Ariel Panzardo (2): HID: haptic: make FF creation the last fallible init step HID: multitouch: give FF core ownership of haptic state drivers/hid/hid-haptic.c | 161 +++++++++++++++++------------------ drivers/hid/hid-haptic.h | 6 +- drivers/hid/hid-multitouch.c | 59 ++++++++++--- 3 files changed, 125 insertions(+), 101 deletions(-) -- 2.53.0