linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: multitouch: Synchronize MT frame on reset_resume
@ 2016-03-29 20:10 Gabriele Mazzotta
  2016-03-29 20:36 ` Benson Leung
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gabriele Mazzotta @ 2016-03-29 20:10 UTC (permalink / raw)
  To: jikos
  Cc: benjamin.tissoires, linux-input, linux-kernel, bleung, Gabriele Mazzotta

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 <gabriele.mzt@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] HID: multitouch: Synchronize MT frame on reset_resume
  2016-03-29 20:10 [PATCH] HID: multitouch: Synchronize MT frame on reset_resume Gabriele Mazzotta
@ 2016-03-29 20:36 ` Benson Leung
  2016-03-30  7:46 ` Benjamin Tissoires
  2016-04-01  9:35 ` Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: Benson Leung @ 2016-03-29 20:36 UTC (permalink / raw)
  To: Gabriele Mazzotta
  Cc: Jiri Kosina, Benjamin Tissoires, linux-input, linux-kernel,
	Dmitry Torokhov

Hi Gabriele,

Thanks for the fix!

On Tue, Mar 29, 2016 at 1:10 PM, Gabriele Mazzotta
<gabriele.mzt@gmail.com> 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 <gabriele.mzt@gmail.com>

Reviewed-by: Benson Leung <bleung@chromium.org>

> ---
>  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] HID: multitouch: Synchronize MT frame on reset_resume
  2016-03-29 20:10 [PATCH] HID: multitouch: Synchronize MT frame on reset_resume Gabriele Mazzotta
  2016-03-29 20:36 ` Benson Leung
@ 2016-03-30  7:46 ` Benjamin Tissoires
  2016-04-01  9:35 ` Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: Benjamin Tissoires @ 2016-03-30  7:46 UTC (permalink / raw)
  To: Gabriele Mazzotta; +Cc: jikos, linux-input, linux-kernel, bleung

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 <gabriele.mzt@gmail.com>

Thanks for the fix (I should have spot that earlier :( )

Reviewed-by: Benjamin TIssoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

> ---
>  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
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] HID: multitouch: Synchronize MT frame on reset_resume
  2016-03-29 20:10 [PATCH] HID: multitouch: Synchronize MT frame on reset_resume Gabriele Mazzotta
  2016-03-29 20:36 ` Benson Leung
  2016-03-30  7:46 ` Benjamin Tissoires
@ 2016-04-01  9:35 ` Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2016-04-01  9:35 UTC (permalink / raw)
  To: Gabriele Mazzotta; +Cc: benjamin.tissoires, linux-input, linux-kernel, bleung

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 <gabriele.mzt@gmail.com>

Queued for 4.6. Thanks,

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-01  9:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29 20:10 [PATCH] HID: multitouch: Synchronize MT frame on reset_resume Gabriele Mazzotta
2016-03-29 20:36 ` Benson Leung
2016-03-30  7:46 ` Benjamin Tissoires
2016-04-01  9:35 ` Jiri Kosina

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).