From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
"Dave.Wang" <dave.wang@emc.com.tw>, jingle <jingle.wu@emc.com.tw>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
Enrico Weigelt <info@metux.net>,
Allison Randal <allison@lohutok.net>,
Aaron Ma <aaron.ma@canonical.com>
Subject: Re: [PATCH v2] Input: elantech - fix x_max/y_max values
Date: Sun, 5 Apr 2020 07:26:22 +0200 [thread overview]
Message-ID: <AM6PR03MB5170D26019747F5090FE74B5E4C50@AM6PR03MB5170.eurprd03.prod.outlook.com> (raw)
In-Reply-To: <AM6PR03MB5170F5FC30556BEF89C775C2E4EB0@AM6PR03MB5170.eurprd03.prod.outlook.com>
Ping...
This patch works fine for me since several weeks,
without it I would not be able to use my laptop any more.
Could you please accept this patch?
Thanks
Bernd.
On 2/27/20 11:03 PM, Bernd Edlinger wrote:
> Since commit 37548659bb22 ("Input: elantech - query the min/max information beforehand too")
> moved the querying of the x_max/y_max values from
> elantech_set_input_params to elantech_query_info,
> the returned x_max/y_max values are different than before,
> at least for some firmware versions.
>
> The reason is likely that this is now done before
> elantech_set_absolute_mode does run. So it may happen that
> the returned values are exactly half of what they used to be,
> which makes input_report_abs in PS/2 mode report ABS_X values which
> exceed the x_max value, which is very annoying since the mouse stops
> to move then, and ABS_Y value become negative, which is benign.
>
> This was observed with a MSI GX70 laptop:
>
> elantech: assuming hardware version 3 (with firmware version 0x250f01)
> elantech: Synaptics capabilities query result 0x18, 0x17, 0x0b.
> elantech: Elan sample query result 05, 0e, 00
> input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio...
>
> Correct this by doubling the returned x_max and y_max
> value for this specific firmware version.
>
> Fixes: 37548659bb22 ("Input: elantech - query the min/max information beforehand too")
>
> Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
> ---
> drivers/input/mouse/elantech.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> index 2d8434b..3399db8 100644
> --- a/drivers/input/mouse/elantech.c
> +++ b/drivers/input/mouse/elantech.c
> @@ -1720,6 +1720,10 @@ static int elantech_query_info(struct psmouse *psmouse,
>
> info->x_max = (0x0f & param[0]) << 8 | param[1];
> info->y_max = (0xf0 & param[0]) << 4 | param[2];
> + if (info->fw_version == 0x250f01) {
> + info->x_max <<= 1;
> + info->y_max <<= 1;
> + }
> break;
>
> case 4:
>
next prev parent reply other threads:[~2020-04-05 5:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 11:59 [PATCH] Input: elantech - fix x_max/y_max values Bernd Edlinger
2020-02-27 12:59 ` Benjamin Tissoires
[not found] ` <PR2PR03MB51799BF709B3975A08F139F4E4EB0@PR2PR03MB5179.eurprd03.prod.outlook.com>
[not found] ` <AM6PR03MB5170F5FC30556BEF89C775C2E4EB0@AM6PR03MB5170.eurprd03.prod.outlook.com>
2020-04-05 5:26 ` Bernd Edlinger [this message]
2020-04-05 5:54 ` [PATCH v2] " Bernd Edlinger
2020-04-09 17:38 ` Bernd Edlinger
2020-04-09 20:07 ` Dmitry Torokhov
2020-04-14 6:09 ` jingle
2021-05-29 15:17 ` Bernd Edlinger
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=AM6PR03MB5170D26019747F5090FE74B5E4C50@AM6PR03MB5170.eurprd03.prod.outlook.com \
--to=bernd.edlinger@hotmail.de \
--cc=aaron.ma@canonical.com \
--cc=allison@lohutok.net \
--cc=benjamin.tissoires@redhat.com \
--cc=dave.wang@emc.com.tw \
--cc=dmitry.torokhov@gmail.com \
--cc=info@metux.net \
--cc=jingle.wu@emc.com.tw \
--cc=kai.heng.feng@canonical.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).