linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Martin <consume.noise@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	linux-input <linux-input@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Andrew Duggan <aduggan@synaptics.com>,
	Christopher Heiny <cheiny@synaptics.com>,
	Peter Hutterer <peter.hutterer@who-t.net>
Subject: Re: [PATCH v2 4/5] Input: synaptics - Skip quirks when post-2013 dimensions
Date: Sat, 31 Jan 2015 09:18:48 +0100	[thread overview]
Message-ID: <20150131081848.GB27794@unplugged.fritz.box> (raw)
In-Reply-To: <CAN+gG=Eu5JaEobOZv1=+H2-5DwWMSs_G8_w=EXFzG+ve1ivLNg@mail.gmail.com>

On Fri, Jan 30, 2015 at 10:34:22AM -0500, Benjamin Tissoires wrote:
> On Fri, Jan 30, 2015 at 4:59 AM, Hans de Goede <hdegoede@redhat.com> wrote:
> > Hi,
> >
> > On 01/29/2015 08:50 PM, Benjamin Tissoires wrote:
> >> On Thu, Jan 29, 2015 at 2:02 PM, Benjamin Tissoires
> >> <benjamin.tissoires@gmail.com> wrote:
> >>> Hi Daniel,
> >>>
> >>> On Tue, Jan 27, 2015 at 3:34 AM, Daniel Martin
> >>> <daniel.martin@secunet.com> wrote:
> >>>> From: Daniel Martin <consume.noise@gmail.com>
> >>>>
> >>>> If we queried min/max dimensions of x [1266..5674], y [1170..4684] we
> >>>> have post-2013 model and don't need to apply any quirk.
> >>>>
> >>>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=91541
> >>>> Signed-off-by: Daniel Martin <consume.noise@gmail.com>
> >>>> ---
> >>>>  drivers/input/mouse/synaptics.c | 5 +++++
> >>>>  1 file changed, 5 insertions(+)
> >>>>
> >>>> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> >>>> index 37d4dff..f6c43ff 100644
> >>>> --- a/drivers/input/mouse/synaptics.c
> >>>> +++ b/drivers/input/mouse/synaptics.c
> >>>> @@ -420,6 +420,11 @@ static int synaptics_quirks(struct psmouse *psmouse)
> >>>>         struct synaptics_data *priv = psmouse->private;
> >>>>         int i;
> >>>>
> >>>> +       /* Post-2013 models expose correct dimensions. */
> >>>> +       if (priv->x_min == 1266 && priv->x_max == 5674 &&
> >>>> +           priv->y_min == 1170 && priv->y_max == 4684)
> >>>> +               return 0;
> >>>> +
> >>>
> >>> Well, this one, I don't like it either :(
> >>>
> >>> At least, the test should be within the psmouse_matches_pnp_id() below
> >>> to ensure we are deciding with Lenovo devices only.
> >>>
> >>> The other concern is hardcoding these values in the code directly.
> >>> What if Synaptics/Lenovo decides to ship a new released model with
> >>> proper min_max ranges but with a different offset?
> >>>
> >>> Andrew told us that the board ID should be enough to discriminate old
> >>> and faulty touchpads from the new and valid touchpads.
> >>>
> >>> My concern here is that we will have to backport these changes in the
> >>> various stable kernel and the various distributions. And if we do not
> >>> end up with the right solution right now, that means that we will have
> >>> to do the job over and over.
> >>>
> >>> I am quite tempted to find a solution in the userspace for that fix.
> >>> Not sure I'll be able to find the right one right now, but it may
> >>> worth trying.
> >>>
> >>
> >> So, the user space solution seems difficult because we do not export
> >> either the board_id or the firmware_id. So that would required to
> >> update the kernel anyway, a bunch of user space tools and a hwdb... :(
> >>
> >> How about we just add an extra min/max in struct min_max_quirk,
> >> compare the current min/max with the 2 possible values and if there is
> >> a match, we do not override the values.
> >> This way, we keep the crap of wrong/correct min max in the small list
> >> of device we know are problematic, and if the new batch of E540 has a
> >> different correct min/max range, then we will be able to adjust it
> >> without breaking the other we fixed.
> >>
> >> Dmitry, Hans, any comments on this?
> >
> > I'm thinking more along the lines of adding a max_broken_board_id field
> > to the quirks, and if the touchpad board_id is larger then the
> > max_broken_board_id not use the quirk.
> >
> 
> Yep, this was confirmed by Synaptics that the board id will be
> incremented only at each new board revision. So it should be safe to
> only check for that.

Could you ask your contact for an exact board id, since when the ranges
have been fixed? From the data I can look at it seems to be <= 2962.

  parent reply	other threads:[~2015-01-31  8:18 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 16:46 synaptics: match PNP-Id is not sufficient for min/max quirks Daniel Martin
2015-01-22 16:46 ` [PATCH 1/6] Input: synaptics - Split synaptics_resolution(), query first Daniel Martin
2015-01-22 16:46 ` [PATCH 2/6] Input: synaptics - Log queried and quirked dimension values Daniel Martin
2015-01-22 16:46 ` [PATCH 3/6] Input: synaptics - Query min dimensions when safe firmware Daniel Martin
2015-01-22 16:46 ` [PATCH 4/6] Input: synaptics - Skip quirks when post-2013 dimensions Daniel Martin
2015-01-22 16:46 ` [PATCH 5/6] Input: synaptics - Add PnP id for X1 Carbon 1nd Daniel Martin
2015-01-23  8:42   ` Daniel Martin
2015-01-23 13:40   ` Daniel Martin
2015-01-22 16:46 ` [PATCH 6/6] Input: synaptics - Remove obsolete min/max quirk for X240 Daniel Martin
2015-01-27  8:34 ` [v2] synaptics: match PNP-Id is not sufficient for min/max quirks Daniel Martin
2015-01-27  8:34   ` [PATCH v2 1/5] Input: synaptics - Split synaptics_resolution(), query first Daniel Martin
2015-01-27  8:34   ` [PATCH v2 2/5] Input: synaptics - Log queried and quirked dimension values Daniel Martin
2015-01-27  8:34   ` [PATCH v2 3/5] Input: synaptics - Query min dimensions when safe firmware Daniel Martin
2015-01-29 18:48     ` Benjamin Tissoires
2015-01-30  9:03       ` Hans de Goede
2015-01-30 15:41         ` Benjamin Tissoires
2015-01-30 22:35           ` Andrew Duggan
2015-01-31  8:11             ` Daniel Martin
2015-01-27  8:34   ` [PATCH v2 4/5] Input: synaptics - Skip quirks when post-2013 dimensions Daniel Martin
2015-01-29 19:02     ` Benjamin Tissoires
2015-01-29 19:50       ` Benjamin Tissoires
2015-01-30  9:59         ` Hans de Goede
2015-01-30 15:34           ` Benjamin Tissoires
2015-01-30 22:47             ` Andrew Duggan
2015-01-31  8:18             ` Daniel Martin [this message]
2015-02-05 21:22               ` Benjamin Tissoires
2015-02-07  8:02                 ` Hans de Goede
2015-01-27  8:34   ` [PATCH v2 5/5] Input: synaptics - Remove obsolete min/max quirk for X240 Daniel Martin
2015-01-27 16:36   ` [v2] synaptics: match PNP-Id is not sufficient for min/max quirks Hans de Goede

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=20150131081848.GB27794@unplugged.fritz.box \
    --to=consume.noise@gmail.com \
    --cc=aduggan@synaptics.com \
    --cc=benjamin.tissoires@gmail.com \
    --cc=cheiny@synaptics.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    /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).