Commit c164c147 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: ALPS - fix max coordinates for v5 and v7 protocols

Commit 3296f71c ("Input: ALPS - consolidate
setting protocol parameters") inadvertently moved call to
alps_dolphin_get_device_area() from v5 to v7 protocol, causing both
protocols report incorrect maximum values for X and Y axes which resulted
in crash in Synaptics X driver.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94801Reported-by: default avatarSantiago Gala <sgala@apache.org>
Reported-by: default avatarPali Rohár <pali.rohar@gmail.com>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarPali Rohár <pali.rohar@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent a736775d
...@@ -2281,10 +2281,12 @@ static int alps_set_protocol(struct psmouse *psmouse, ...@@ -2281,10 +2281,12 @@ static int alps_set_protocol(struct psmouse *psmouse,
priv->set_abs_params = alps_set_abs_params_mt; priv->set_abs_params = alps_set_abs_params_mt;
priv->nibble_commands = alps_v3_nibble_commands; priv->nibble_commands = alps_v3_nibble_commands;
priv->addr_command = PSMOUSE_CMD_RESET_WRAP; priv->addr_command = PSMOUSE_CMD_RESET_WRAP;
priv->x_max = 1360;
priv->y_max = 660;
priv->x_bits = 23; priv->x_bits = 23;
priv->y_bits = 12; priv->y_bits = 12;
if (alps_dolphin_get_device_area(psmouse, priv))
return -EIO;
break; break;
case ALPS_PROTO_V6: case ALPS_PROTO_V6:
...@@ -2303,9 +2305,8 @@ static int alps_set_protocol(struct psmouse *psmouse, ...@@ -2303,9 +2305,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
priv->set_abs_params = alps_set_abs_params_mt; priv->set_abs_params = alps_set_abs_params_mt;
priv->nibble_commands = alps_v3_nibble_commands; priv->nibble_commands = alps_v3_nibble_commands;
priv->addr_command = PSMOUSE_CMD_RESET_WRAP; priv->addr_command = PSMOUSE_CMD_RESET_WRAP;
priv->x_max = 0xfff;
if (alps_dolphin_get_device_area(psmouse, priv)) priv->y_max = 0x7ff;
return -EIO;
if (priv->fw_ver[1] != 0xba) if (priv->fw_ver[1] != 0xba)
priv->flags |= ALPS_BUTTONPAD; priv->flags |= ALPS_BUTTONPAD;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment