* [PATCH] hid: Add a hid quirk for input sync override
@ 2010-08-24 8:54 Henrik Rydberg
2010-09-01 10:54 ` Jiri Kosina
2010-09-21 14:12 ` Jiri Kosina
0 siblings, 2 replies; 8+ messages in thread
From: Henrik Rydberg @ 2010-08-24 8:54 UTC (permalink / raw)
To: Jiri Kosina
Cc: Dmitry Torokhov, linux-input, linux-kernel, Stephane Chatty,
Henrik Rydberg
From: Henrik Rydberg <rydberg@thabit.(none)>
As of lately, HID devices which send per-frame data split over several
HID reports have started to emerge. This patch adds a quirk which
allows the HID driver to take over the input layer synchronization,
and hence the control of the frame boundary.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
Jiri, Dmitry, Stephane,
No doubt, this is not a final solution, but it serves the purpose of
being able to make existing drivers functional while a satisfactory
solution is being worked out.
Cheers,
Henrik
drivers/hid/hid-input.c | 3 +++
include/linux/hid.h | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 69d152e..9d97934 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -656,6 +656,9 @@ void hidinput_report_event(struct hid_device *hid, struct hid_report *report)
{
struct hid_input *hidinput;
+ if (hid->quirks & HID_QUIRK_NO_INPUT_SYNC)
+ return;
+
list_for_each_entry(hidinput, &hid->inputs, list)
input_sync(hidinput->input);
}
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 895001f..8029883 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -315,6 +315,7 @@ struct hid_item {
#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
#define HID_QUIRK_NO_INIT_REPORTS 0x20000000
#define HID_QUIRK_NO_IGNORE 0x40000000
+#define HID_QUIRK_NO_INPUT_SYNC 0x80000000
/*
* This is the global environment of the parser. This information is
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] hid: Add a hid quirk for input sync override
2010-08-24 8:54 [PATCH] hid: Add a hid quirk for input sync override Henrik Rydberg
@ 2010-09-01 10:54 ` Jiri Kosina
2010-09-01 11:32 ` Henrik Rydberg
2010-09-21 14:12 ` Jiri Kosina
1 sibling, 1 reply; 8+ messages in thread
From: Jiri Kosina @ 2010-09-01 10:54 UTC (permalink / raw)
To: Henrik Rydberg
Cc: Dmitry Torokhov, linux-input, linux-kernel, Stephane Chatty
On Tue, 24 Aug 2010, Henrik Rydberg wrote:
> From: Henrik Rydberg <rydberg@thabit.(none)>
>
> As of lately, HID devices which send per-frame data split over several
> HID reports have started to emerge. This patch adds a quirk which
> allows the HID driver to take over the input layer synchronization,
> and hence the control of the frame boundary.
>
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> ---
> Jiri, Dmitry, Stephane,
>
> No doubt, this is not a final solution, but it serves the purpose of
> being able to make existing drivers functional while a satisfactory
> solution is being worked out.
Hi Henrik,
I obviously don't have any major objections to the patch, as it was my
initial idea :)
I'd like to merge it together with driver which actually uses it though.
Thanks.
>
> Cheers,
> Henrik
>
> drivers/hid/hid-input.c | 3 +++
> include/linux/hid.h | 1 +
> 2 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 69d152e..9d97934 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -656,6 +656,9 @@ void hidinput_report_event(struct hid_device *hid, struct hid_report *report)
> {
> struct hid_input *hidinput;
>
> + if (hid->quirks & HID_QUIRK_NO_INPUT_SYNC)
> + return;
> +
> list_for_each_entry(hidinput, &hid->inputs, list)
> input_sync(hidinput->input);
> }
> diff --git a/include/linux/hid.h b/include/linux/hid.h
> index 895001f..8029883 100644
> --- a/include/linux/hid.h
> +++ b/include/linux/hid.h
> @@ -315,6 +315,7 @@ struct hid_item {
> #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
> #define HID_QUIRK_NO_INIT_REPORTS 0x20000000
> #define HID_QUIRK_NO_IGNORE 0x40000000
> +#define HID_QUIRK_NO_INPUT_SYNC 0x80000000
>
> /*
> * This is the global environment of the parser. This information is
> --
> 1.7.1
>
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] hid: Add a hid quirk for input sync override
2010-09-01 10:54 ` Jiri Kosina
@ 2010-09-01 11:32 ` Henrik Rydberg
2010-09-02 10:42 ` Stéphane Chatty
2010-09-02 14:30 ` Jiri Kosina
0 siblings, 2 replies; 8+ messages in thread
From: Henrik Rydberg @ 2010-09-01 11:32 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Dmitry Torokhov, linux-input, linux-kernel, Stephane Chatty
On 09/01/2010 12:54 PM, Jiri Kosina wrote:
> On Tue, 24 Aug 2010, Henrik Rydberg wrote:
>
>> From: Henrik Rydberg <rydberg@thabit.(none)>
>>
>> As of lately, HID devices which send per-frame data split over several
>> HID reports have started to emerge. This patch adds a quirk which
>> allows the HID driver to take over the input layer synchronization,
>> and hence the control of the frame boundary.
>>
>> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
>> ---
>> Jiri, Dmitry, Stephane,
>>
>> No doubt, this is not a final solution, but it serves the purpose of
>> being able to make existing drivers functional while a satisfactory
>> solution is being worked out.
>
> Hi Henrik,
>
> I obviously don't have any major objections to the patch, as it was my
> initial idea :)
Ah! Then all is fine. :-)
>
> I'd like to merge it together with driver which actually uses it though.
Sounds good. I suppose Stephane wants to have a say regarding the 3m driver
first, but no rush. What version are you targeting?
Thanks,
Henrik
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] hid: Add a hid quirk for input sync override
2010-09-01 11:32 ` Henrik Rydberg
@ 2010-09-02 10:42 ` Stéphane Chatty
2010-09-02 14:30 ` Jiri Kosina
1 sibling, 0 replies; 8+ messages in thread
From: Stéphane Chatty @ 2010-09-02 10:42 UTC (permalink / raw)
To: Henrik Rydberg; +Cc: Jiri Kosina, Dmitry Torokhov, linux-input, linux-kernel
Le 1 sept. 10 à 13:32, Henrik Rydberg a écrit :
>
> Sounds good. I suppose Stephane wants to have a say regarding the
> 3m driver
> first, but no rush.
I was pretty happy with the general principles (after your
clarifications about single touch emulation), and said to myself that
I would look into the code and test at my convenience later. Then
Jiri asked me to Ack the patch and so I feel obliged to test. I hope
to find the time tomorrow, Friday being the day when I have access to
a 3M panel.
Cheers,
St.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] hid: Add a hid quirk for input sync override
2010-09-01 11:32 ` Henrik Rydberg
2010-09-02 10:42 ` Stéphane Chatty
@ 2010-09-02 14:30 ` Jiri Kosina
2010-09-17 16:20 ` Stéphane Chatty
1 sibling, 1 reply; 8+ messages in thread
From: Jiri Kosina @ 2010-09-02 14:30 UTC (permalink / raw)
To: Henrik Rydberg
Cc: Dmitry Torokhov, linux-input, linux-kernel, Stephane Chatty
On Wed, 1 Sep 2010, Henrik Rydberg wrote:
> >> As of lately, HID devices which send per-frame data split over several
> >> HID reports have started to emerge. This patch adds a quirk which
> >> allows the HID driver to take over the input layer synchronization,
> >> and hence the control of the frame boundary.
> >>
> >> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> >> ---
> >> Jiri, Dmitry, Stephane,
> >>
> >> No doubt, this is not a final solution, but it serves the purpose of
> >> being able to make existing drivers functional while a satisfactory
> >> solution is being worked out.
> >
> > Hi Henrik,
> >
> > I obviously don't have any major objections to the patch, as it was my
> > initial idea :)
>
>
> Ah! Then all is fine. :-)
>
> >
> > I'd like to merge it together with driver which actually uses it though.
>
>
> Sounds good. I suppose Stephane wants to have a say regarding the 3m driver
> first, but no rush. What version are you targeting?
2.6.37 looks reasonable if everything it agreed upon in the following
week(s).
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] hid: Add a hid quirk for input sync override
2010-09-02 14:30 ` Jiri Kosina
@ 2010-09-17 16:20 ` Stéphane Chatty
2010-09-17 16:49 ` Henrik Rydberg
0 siblings, 1 reply; 8+ messages in thread
From: Stéphane Chatty @ 2010-09-17 16:20 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Henrik Rydberg, Dmitry Torokhov, linux-input, linux-kernel
>>
>>
>> Sounds good. I suppose Stephane wants to have a say regarding the
>> 3m driver
>> first, but no rush. What version are you targeting?
>
> 2.6.37 looks reasonable if everything it agreed upon in the following
> week(s).
>
After many adventures, I finally managed to get the driver *and* the
3M panel available at the same time. XDS and the satellite events did
not help :-)
I'm observing a few things that look strange with evtest, starting
with missing ABS_MT_SLOT at the beginning of interaction sequences.
Investigating... Henrik, would it be useful if I send you evtest
logs, what I did with my fingers and what I find strange in the result?
Cheers
St.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] hid: Add a hid quirk for input sync override
2010-09-17 16:20 ` Stéphane Chatty
@ 2010-09-17 16:49 ` Henrik Rydberg
0 siblings, 0 replies; 8+ messages in thread
From: Henrik Rydberg @ 2010-09-17 16:49 UTC (permalink / raw)
To: Stéphane Chatty
Cc: Jiri Kosina, Dmitry Torokhov, linux-input, linux-kernel
On 09/17/2010 06:20 PM, Stéphane Chatty wrote:
>>>
>>>
>>> Sounds good. I suppose Stephane wants to have a say regarding the 3m driver
>>> first, but no rush. What version are you targeting?
>>
>> 2.6.37 looks reasonable if everything it agreed upon in the following
>> week(s).
>>
>
> After many adventures, I finally managed to get the driver *and* the 3M panel
> available at the same time. XDS and the satellite events did not help :-)
>
> I'm observing a few things that look strange with evtest, starting with missing
> ABS_MT_SLOT at the beginning of interaction sequences.
ABS_MT_SLOT will only be emitted when it actually changes, i.e., not necessarily
between frames.
> Investigating... Henrik,
> would it be useful if I send you evtest logs, what I did with my fingers and
> what I find strange in the result?
Certainly. Have you encountered anything strange in the actual interaction with
the device? I have been running the 3M patches daily for several weeks and found
no issues.
Cheers,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] hid: Add a hid quirk for input sync override
2010-08-24 8:54 [PATCH] hid: Add a hid quirk for input sync override Henrik Rydberg
2010-09-01 10:54 ` Jiri Kosina
@ 2010-09-21 14:12 ` Jiri Kosina
1 sibling, 0 replies; 8+ messages in thread
From: Jiri Kosina @ 2010-09-21 14:12 UTC (permalink / raw)
To: Henrik Rydberg
Cc: Dmitry Torokhov, linux-input, linux-kernel, Stephane Chatty
On Tue, 24 Aug 2010, Henrik Rydberg wrote:
> From: Henrik Rydberg <rydberg@thabit.(none)>
>
> As of lately, HID devices which send per-frame data split over several
> HID reports have started to emerge. This patch adds a quirk which
> allows the HID driver to take over the input layer synchronization,
> and hence the control of the frame boundary.
>
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Applied, thanks (into 3m branch, as 3m patches depend on this).
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-09-21 14:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-24 8:54 [PATCH] hid: Add a hid quirk for input sync override Henrik Rydberg
2010-09-01 10:54 ` Jiri Kosina
2010-09-01 11:32 ` Henrik Rydberg
2010-09-02 10:42 ` Stéphane Chatty
2010-09-02 14:30 ` Jiri Kosina
2010-09-17 16:20 ` Stéphane Chatty
2010-09-17 16:49 ` Henrik Rydberg
2010-09-21 14:12 ` 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).