[PATCH] HID: multitouch: Synchronize MT frame on reset_resume

Subsystems: hid core layer, the rest

STALE3857d

4 messages, 4 authors, 2016-04-01 · open the first message on its own page

[PATCH] HID: multitouch: Synchronize MT frame on reset_resume

From: Gabriele Mazzotta <hidden>
Date: 2016-03-29 20:10:56

input_mt_get_slot_by_key() requires input_mt_sync_frame() to be called
at each frame. Do it when releasing the touches, or else we won't get
a proper slot number after mt_reset_resume().

Signed-off-by: Gabriele Mazzotta <redacted>
---
 drivers/hid/hid-multitouch.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 25d3c43..c741f5e 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1169,6 +1169,7 @@ static void mt_release_contacts(struct hid_device *hid)
 							   MT_TOOL_FINGER,
 							   false);
 			}
+			input_mt_sync_frame(input_dev);
 			input_sync(input_dev);
 		}
 	}
-- 
2.8.0.rc3

Re: [PATCH] HID: multitouch: Synchronize MT frame on reset_resume

From: Benson Leung <bleung@chromium.org>
Date: 2016-03-29 20:36:14

Hi Gabriele,

Thanks for the fix!

On Tue, Mar 29, 2016 at 1:10 PM, Gabriele Mazzotta
[off-list ref] wrote:
input_mt_get_slot_by_key() requires input_mt_sync_frame() to be called
at each frame. Do it when releasing the touches, or else we won't get
a proper slot number after mt_reset_resume().

Signed-off-by: Gabriele Mazzotta <redacted>
Reviewed-by: Benson Leung <bleung@chromium.org>
quoted hunk
---
 drivers/hid/hid-multitouch.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 25d3c43..c741f5e 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1169,6 +1169,7 @@ static void mt_release_contacts(struct hid_device *hid)
                                                           MT_TOOL_FINGER,
                                                           false);
                        }
+                       input_mt_sync_frame(input_dev);
                        input_sync(input_dev);
                }
        }
--
2.8.0.rc3


-- 
Benson Leung
Senior Software Engineer, Chrom* OS
bleung@chromium.org

Re: [PATCH] HID: multitouch: Synchronize MT frame on reset_resume

From: Benjamin Tissoires <hidden>
Date: 2016-03-30 07:46:35

On Mar 29 2016 or thereabouts, Gabriele Mazzotta wrote:
input_mt_get_slot_by_key() requires input_mt_sync_frame() to be called
at each frame. Do it when releasing the touches, or else we won't get
a proper slot number after mt_reset_resume().

Signed-off-by: Gabriele Mazzotta <redacted>
Thanks for the fix (I should have spot that earlier :( )

Reviewed-by: Benjamin TIssoires <redacted>

Cheers,
Benjamin
quoted hunk
---
 drivers/hid/hid-multitouch.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 25d3c43..c741f5e 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1169,6 +1169,7 @@ static void mt_release_contacts(struct hid_device *hid)
 							   MT_TOOL_FINGER,
 							   false);
 			}
+			input_mt_sync_frame(input_dev);
 			input_sync(input_dev);
 		}
 	}
-- 
2.8.0.rc3

Re: [PATCH] HID: multitouch: Synchronize MT frame on reset_resume

From: Jiri Kosina <jikos@kernel.org>
Date: 2016-04-01 09:35:42

On Tue, 29 Mar 2016, Gabriele Mazzotta wrote:
input_mt_get_slot_by_key() requires input_mt_sync_frame() to be called
at each frame. Do it when releasing the touches, or else we won't get
a proper slot number after mt_reset_resume().

Signed-off-by: Gabriele Mazzotta <redacted>
Queued for 4.6. Thanks,

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help