a1ef73d
From: Daniel Martin <consume.noise@gmail.com>
a1ef73d
Date: Sun, 8 Mar 2015 22:28:40 -0700
a1ef73d
Subject: [PATCH] Input: synaptics - query min dimensions for fw v8.1
a1ef73d
a1ef73d
Query the min dimensions even if the check
a1ef73d
SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 7 fails, but we know that the
a1ef73d
firmware version 8.1 is safe.
a1ef73d
a1ef73d
With that we don't need quirks for post-2013 models anymore as they expose
a1ef73d
correct min and max dimensions.
a1ef73d
a1ef73d
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=91541
a1ef73d
a1ef73d
Cc: stable@vger.kernel.org
a1ef73d
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
a1ef73d
  re-order the tests to check SYN_CAP_MIN_DIMENSIONS even on FW 8.1
a1ef73d
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
a1ef73d
Acked-by: Hans de Goede <hdegoede@redhat.com>
a1ef73d
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
a1ef73d
---
a1ef73d
 drivers/input/mouse/synaptics.c | 10 ++++++++--
a1ef73d
 1 file changed, 8 insertions(+), 2 deletions(-)
a1ef73d
a1ef73d
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
a1ef73d
index 47c5dca20a60..87c37f745b92 100644
a1ef73d
--- a/drivers/input/mouse/synaptics.c
a1ef73d
+++ b/drivers/input/mouse/synaptics.c
a1ef73d
@@ -368,8 +368,14 @@ static int synaptics_resolution(struct psmouse *psmouse)
a1ef73d
 		}
a1ef73d
 	}
a1ef73d
 
a1ef73d
-	if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 7 &&
a1ef73d
-	    SYN_CAP_MIN_DIMENSIONS(priv->ext_cap_0c)) {
a1ef73d
+	if (SYN_CAP_MIN_DIMENSIONS(priv->ext_cap_0c) &&
a1ef73d
+	    (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 7 ||
a1ef73d
+	     /*
a1ef73d
+	      * Firmware v8.1 does not report proper number of extended
a1ef73d
+	      * capabilities, but has been proven to report correct min
a1ef73d
+	      * coordinates.
a1ef73d
+	      */
a1ef73d
+	     SYN_ID_FULL(priv->identity) == 0x801)) {
a1ef73d
 		if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_MIN_COORDS, resp)) {
a1ef73d
 			psmouse_warn(psmouse,
a1ef73d
 				     "device claims to have min coordinates query, but I'm not able to read it.\n");
a1ef73d
-- 
a1ef73d
2.1.0
a1ef73d