* [PATCH 1/2] Input: MT - do not apply filtering on emulated events
@ 2013-02-15 19:36 Henrik Rydberg
2013-02-15 19:36 ` [PATCH 2/2] Input: synaptics - initialize pointer emulation usage Henrik Rydberg
2013-02-15 19:47 ` [PATCH 1/2] Input: MT - do not apply filtering on emulated events Daniel Kurtz
0 siblings, 2 replies; 6+ messages in thread
From: Henrik Rydberg @ 2013-02-15 19:36 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Daniel Kurtz, linux-input, linux-kernel, Henrik Rydberg
The pointer emulation events are derived from contact values that
have already been filtered, so send the emulated events as is.
Reported-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
drivers/input/input-mt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c
index 1abbc17..1b7f4d4 100644
--- a/drivers/input/input-mt.c
+++ b/drivers/input/input-mt.c
@@ -18,6 +18,7 @@ static void copy_abs(struct input_dev *dev, unsigned int dst, unsigned int src)
{
if (dev->absinfo && test_bit(src, dev->absbit)) {
dev->absinfo[dst] = dev->absinfo[src];
+ dev->absinfo[dst].fuzz = 0;
dev->absbit[BIT_WORD(dst)] |= BIT_MASK(dst);
}
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] Input: synaptics - initialize pointer emulation usage
2013-02-15 19:36 [PATCH 1/2] Input: MT - do not apply filtering on emulated events Henrik Rydberg
@ 2013-02-15 19:36 ` Henrik Rydberg
2013-02-15 19:54 ` Daniel Kurtz
2013-02-16 2:54 ` Dmitry Torokhov
2013-02-15 19:47 ` [PATCH 1/2] Input: MT - do not apply filtering on emulated events Daniel Kurtz
1 sibling, 2 replies; 6+ messages in thread
From: Henrik Rydberg @ 2013-02-15 19:36 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Daniel Kurtz, linux-input, linux-kernel, Henrik Rydberg
To properly setup event parameters for emulated events, pass
the appropriate flag to the slot initialization function. Also,
all MT-related events should be setup before initialization.
Incidentally, this solves the issue of doubly filtered pointer
events.
Reported-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
Hi Daniel,
This patch has only been compile tested, but chances are that it will
work for you, together with the previous patch.
Cheers,
Henrik
drivers/input/mouse/synaptics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 12d12ca..a8590ad 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -1247,11 +1247,11 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0);
if (SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c)) {
- input_mt_init_slots(dev, 2, 0);
set_abs_position_params(dev, priv, ABS_MT_POSITION_X,
ABS_MT_POSITION_Y);
/* Image sensors can report per-contact pressure */
input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
+ input_mt_init_slots(dev, 2, INPUT_MT_POINTER);
/* Image sensors can signal 4 and 5 finger clicks */
__set_bit(BTN_TOOL_QUADTAP, dev->keybit);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Input: MT - do not apply filtering on emulated events
2013-02-15 19:36 [PATCH 1/2] Input: MT - do not apply filtering on emulated events Henrik Rydberg
2013-02-15 19:36 ` [PATCH 2/2] Input: synaptics - initialize pointer emulation usage Henrik Rydberg
@ 2013-02-15 19:47 ` Daniel Kurtz
1 sibling, 0 replies; 6+ messages in thread
From: Daniel Kurtz @ 2013-02-15 19:47 UTC (permalink / raw)
To: Henrik Rydberg; +Cc: Dmitry Torokhov, linux-input, linux-kernel
On Fri, Feb 15, 2013 at 11:36 AM, Henrik Rydberg <rydberg@euromail.se> wrote:
> The pointer emulation events are derived from contact values that
> have already been filtered, so send the emulated events as is.
>
> Reported-by: Daniel Kurtz <djkurtz@chromium.org>
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Hi Henrik,
Brilliant! Glad there is now such an easy fix for this.
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
> ---
> drivers/input/input-mt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c
> index 1abbc17..1b7f4d4 100644
> --- a/drivers/input/input-mt.c
> +++ b/drivers/input/input-mt.c
> @@ -18,6 +18,7 @@ static void copy_abs(struct input_dev *dev, unsigned int dst, unsigned int src)
> {
> if (dev->absinfo && test_bit(src, dev->absbit)) {
> dev->absinfo[dst] = dev->absinfo[src];
> + dev->absinfo[dst].fuzz = 0;
> dev->absbit[BIT_WORD(dst)] |= BIT_MASK(dst);
> }
> }
> --
> 1.8.1.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Input: synaptics - initialize pointer emulation usage
2013-02-15 19:36 ` [PATCH 2/2] Input: synaptics - initialize pointer emulation usage Henrik Rydberg
@ 2013-02-15 19:54 ` Daniel Kurtz
2013-02-15 20:11 ` Henrik Rydberg
2013-02-16 2:54 ` Dmitry Torokhov
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Kurtz @ 2013-02-15 19:54 UTC (permalink / raw)
To: Henrik Rydberg; +Cc: Dmitry Torokhov, linux-input, linux-kernel
On Fri, Feb 15, 2013 at 11:36 AM, Henrik Rydberg <rydberg@euromail.se> wrote:
> To properly setup event parameters for emulated events, pass
> the appropriate flag to the slot initialization function. Also,
> all MT-related events should be setup before initialization.
>
> Incidentally, this solves the issue of doubly filtered pointer
> events.
>
> Reported-by: Daniel Kurtz <djkurtz@chromium.org>
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> ---
> Hi Daniel,
>
> This patch has only been compile tested, but chances are that it will
> work for you, together with the previous patch.
>
> Cheers,
> Henrik
>
> drivers/input/mouse/synaptics.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 12d12ca..a8590ad 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -1247,11 +1247,11 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
> input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0);
>
> if (SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c)) {
> - input_mt_init_slots(dev, 2, 0);
> set_abs_position_params(dev, priv, ABS_MT_POSITION_X,
> ABS_MT_POSITION_Y);
> /* Image sensors can report per-contact pressure */
> input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
> + input_mt_init_slots(dev, 2, INPUT_MT_POINTER);
ABS_X/Y/PRESSURE are already init'ed in the common code a few lines
above the if ().
Perhaps you could refactor things a bit to only define them once?
Thanks,
-Dan
>
> /* Image sensors can signal 4 and 5 finger clicks */
> __set_bit(BTN_TOOL_QUADTAP, dev->keybit);
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Input: synaptics - initialize pointer emulation usage
2013-02-15 19:54 ` Daniel Kurtz
@ 2013-02-15 20:11 ` Henrik Rydberg
0 siblings, 0 replies; 6+ messages in thread
From: Henrik Rydberg @ 2013-02-15 20:11 UTC (permalink / raw)
To: Daniel Kurtz; +Cc: Dmitry Torokhov, linux-input, linux-kernel
> > @@ -1247,11 +1247,11 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
> > input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0);
> >
> > if (SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c)) {
> > - input_mt_init_slots(dev, 2, 0);
> > set_abs_position_params(dev, priv, ABS_MT_POSITION_X,
> > ABS_MT_POSITION_Y);
> > /* Image sensors can report per-contact pressure */
> > input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
> > + input_mt_init_slots(dev, 2, INPUT_MT_POINTER);
>
> ABS_X/Y/PRESSURE are already init'ed in the common code a few lines
> above the if ().
> Perhaps you could refactor things a bit to only define them once?
I looked into it, of course, but there are many other values (event
bits, event properties) that also get duplicated. Treating them the
same way leads to a fairly large patch, for a small change in
truth. The present patch is the balanced optimum, IMHO. It is also
easy to prove.
Henrik
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Input: synaptics - initialize pointer emulation usage
2013-02-15 19:36 ` [PATCH 2/2] Input: synaptics - initialize pointer emulation usage Henrik Rydberg
2013-02-15 19:54 ` Daniel Kurtz
@ 2013-02-16 2:54 ` Dmitry Torokhov
1 sibling, 0 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2013-02-16 2:54 UTC (permalink / raw)
To: Henrik Rydberg; +Cc: Daniel Kurtz, linux-input, linux-kernel
On Fri, Feb 15, 2013 at 08:36:21PM +0100, Henrik Rydberg wrote:
> To properly setup event parameters for emulated events, pass
> the appropriate flag to the slot initialization function. Also,
> all MT-related events should be setup before initialization.
>
> Incidentally, this solves the issue of doubly filtered pointer
> events.
>
> Reported-by: Daniel Kurtz <djkurtz@chromium.org>
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Applied both, thank you Henrik.
--
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-02-16 2:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-15 19:36 [PATCH 1/2] Input: MT - do not apply filtering on emulated events Henrik Rydberg
2013-02-15 19:36 ` [PATCH 2/2] Input: synaptics - initialize pointer emulation usage Henrik Rydberg
2013-02-15 19:54 ` Daniel Kurtz
2013-02-15 20:11 ` Henrik Rydberg
2013-02-16 2:54 ` Dmitry Torokhov
2013-02-15 19:47 ` [PATCH 1/2] Input: MT - do not apply filtering on emulated events Daniel Kurtz
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).