mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <Alexander.Levin@microsoft.com>
To: "stable@vger.kernel.org" <stable@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Nick Dyer <nick.dyer@itdev.co.uk>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Sasha Levin <Alexander.Levin@microsoft.com>
Subject: [PATCH AUTOSEL 4.4 30/47] Input: atmel_mxt_ts - only use first T9 instance
Date: Sun, 2 Sep 2018 13:16:15 +0000	[thread overview]
Message-ID: <20180902131533.184092-30-alexander.levin@microsoft.com> (raw)
In-Reply-To: <20180902131533.184092-1-alexander.levin@microsoft.com>

From: Nick Dyer <nick.dyer@itdev.co.uk>

[ Upstream commit 36f5d9ef26e52edff046b4b097855db89bf0cd4a ]

The driver only registers one input device, which uses the screen
parameters from the first T9 instance. The first T63 instance also uses
those parameters.

It is incorrect to send input reports from the second instances of these
objects if they are enabled: the input scaling will be wrong and the
positions will be mashed together.

This also causes problems on Android if the number of slots exceeds 32.

In the future, this could be handled by looking for enabled touch object
instances and creating an input device for each one.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 88dfe3008cf4..be2f2521c1c5 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1593,10 +1593,11 @@ static int mxt_get_object_table(struct mxt_data *data)
 			break;
 		case MXT_TOUCH_MULTI_T9:
 			data->multitouch = MXT_TOUCH_MULTI_T9;
+			/* Only handle messages from first T9 instance */
 			data->T9_reportid_min = min_id;
-			data->T9_reportid_max = max_id;
-			data->num_touchids = object->num_report_ids
-						* mxt_obj_instances(object);
+			data->T9_reportid_max = min_id +
+						object->num_report_ids - 1;
+			data->num_touchids = object->num_report_ids;
 			break;
 		case MXT_SPT_MESSAGECOUNT_T44:
 			data->T44_address = object->start_address;
-- 
2.17.1

  parent reply	other threads:[~2018-09-02 13:16 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-02 13:15 [PATCH AUTOSEL 4.4 01/47] misc: mic: SCIF Fix scif_get_new_port() error handling Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 02/47] ethtool: Remove trailing semicolon for static inline Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 03/47] Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 04/47] gpio: tegra: Move driver registration to subsys_init level Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 05/47] scsi: target: fix __transport_register_session locking Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 06/47] media: usbtv: use irqsave() in USB's complete callback Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 07/47] md/raid5: fix data corruption of replacements after originals dropped Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 08/47] misc: ti-st: Fix memory leak in the error path of probe() Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 09/47] uio: potential double frees if __uio_register_device() fails Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 10/47] tty: rocket: Fix possible buffer overwrite on register_PCI Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 11/47] f2fs: do not set free of current section Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 12/47] perf tools: Allow overriding MAX_NR_CPUS at compile time Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 13/47] NFSv4.0 fix client reference leak in callback Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 14/47] macintosh/via-pmu: Add missing mmio accessors Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 15/47] ath10k: prevent active scans on potential unusable channels Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 16/47] wlcore: Set rx_status boottime_ns field on rx Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 17/47] MIPS: Fix ISA virt/bus conversion for non-zero PHYS_OFFSET Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 18/47] ata: libahci: Correct setting of DEVSLP register Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 19/47] scsi: 3ware: fix return 0 on the error path of probe Sasha Levin
2018-09-02 13:15 ` [PATCH AUTOSEL 4.4 20/47] ath10k: disable bundle mgmt tx completion event support Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 21/47] Bluetooth: hidp: Fix handling of strncpy for hid->name information Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 22/47] x86/mm: Remove in_nmi() warning from vmalloc_fault() Sasha Levin
2018-09-03 13:42   ` Pavel Machek
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 23/47] x86/kexec: Allocate 8k PGDs for PTI Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 24/47] gpio: ml-ioh: Fix buffer underwrite on probe error path Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 25/47] net: mvneta: fix mtu change on port without link Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 26/47] tpm/tpm_i2c_infineon: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT) Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 27/47] MIPS: Octeon: add missing of_node_put() Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 28/47] iio: ad9523: Fix return value for ad952x_store() Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 29/47] net: dcb: For wild-card lookups, use priority -1, not 0 Sasha Levin
2018-09-02 13:16 ` Sasha Levin [this message]
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 31/47] partitions/aix: append null character to print data from disk Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 32/47] partitions/aix: fix usage of uninitialized lv_info and lvname structures Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 33/47] media: em28xx: Fix DualHD disconnect oops Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 34/47] iommu/ipmmu-vmsa: Fix allocation in atomic context Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 35/47] mfd: ti_am335x_tscadc: Fix struct clk memory leak Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 36/47] f2fs: fix to do sanity check with {sit,nat}_ver_bitmap_bytesize Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 38/47] ALSA: wss: Fix sparse warning wrt PCM format type Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 37/47] ALSA: riptide: Properly endian notations Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 39/47] ALSA: sb: Fix PCM format bit calculation Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 40/47] ALSA: asihpi: Fix PCM format notations Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 41/47] ALSA: ad1816a: Fix sparse warning wrt PCM format type Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 42/47] ALSA: hda: Fix implicit PCM format type conversion Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 43/47] ALSA: au88x0: Fix sparse warning wrt PCM format type Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 44/47] ALSA: sb: " Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 45/47] MIPS: WARN_ON invalid DMA cache maintenance, not BUG_ON Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 46/47] RDMA/cma: Do not ignore net namespace for unbound cm_id Sasha Levin
2018-09-02 13:16 ` [PATCH AUTOSEL 4.4 47/47] fuse: Add missed unlock_page() to fuse_readpages_fill() Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180902131533.184092-30-alexander.levin@microsoft.com \
    --to=alexander.levin@microsoft.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick.dyer@itdev.co.uk \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome