linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6.36 regression] Under linux console gpm cursor now going to opposite direction of mouse
@ 2010-08-20 20:33 Bruno Prémont
  2010-08-21 13:50 ` [PATCH] Input: mousedev - fix regression of inverting axes Christoph Fritz
  2010-08-25 18:19 ` [2.6.36 regression] Under linux console gpm cursor now going to opposite direction of mouse Maciej Rutecki
  0 siblings, 2 replies; 4+ messages in thread
From: Bruno Prémont @ 2010-08-20 20:33 UTC (permalink / raw)
  To: linux-input; +Cc: linux-kernel

Somewhere between 2.6.35 and Linus's tree as of this writing gpm
started moving its cursor to the opposite direction of mouse movement.

e.g. moving mouse up causes cursor to move down, moving mouse left
     causes cursor to go right

Under 2.6.35 the cursor moved into the same direction as the mouse.

Note, mouse is synaptics touchpad (Acer TravelMate660):
  Synaptics Touchpad, model: 1, fw: 5.8, id: 0x9d48b1, caps: 0x904713/0x4006/0x0


When I get around to it I will try to get more precise information as
to when this regression got introduced, eventually bisecting.

Bruno

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

* [PATCH] Input: mousedev - fix regression of inverting axes
  2010-08-20 20:33 [2.6.36 regression] Under linux console gpm cursor now going to opposite direction of mouse Bruno Prémont
@ 2010-08-21 13:50 ` Christoph Fritz
  2010-08-21 16:49   ` Dmitry Torokhov
  2010-08-25 18:19 ` [2.6.36 regression] Under linux console gpm cursor now going to opposite direction of mouse Maciej Rutecki
  1 sibling, 1 reply; 4+ messages in thread
From: Christoph Fritz @ 2010-08-21 13:50 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Bruno Prémont, Daniel Mack, linux-input, linux-kernel

On Fri, Aug 20, 2010 at 10:33:16PM +0200, Bruno Prémont wrote:
> Somewhere between 2.6.35 and Linus's tree as of this writing gpm
> started moving its cursor to the opposite direction of mouse movement.
> 
> e.g. moving mouse up causes cursor to move down, moving mouse left
>      causes cursor to go right
> 
> Under 2.6.35 the cursor moved into the same direction as the mouse.
> 
> Note, mouse is synaptics touchpad (Acer TravelMate660):
>   Synaptics Touchpad, model: 1, fw: 5.8, id: 0x9d48b1, caps: 0x904713/0x4006/0x0
> 
> 
> When I get around to it I will try to get more precise information as
> to when this regression got introduced, eventually bisecting.
> 
> Bruno

Thanks Bruno,
 I successfully tested the patch below with gpm.

---
Introduced by 987a6c0298260b7aa40702b349282554d6180e4b a swap in max/min
calculation gets fixed by this patch.

Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
 drivers/input/mousedev.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 83c24cc..d528a2d 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -138,8 +138,8 @@ static void mousedev_touchpad_event(struct input_dev *dev,
 
 		fx(0) = value;
 		if (mousedev->touch && mousedev->pkt_count >= 2) {
-			size = input_abs_get_min(dev, ABS_X) -
-					input_abs_get_max(dev, ABS_X);
+			size = input_abs_get_max(dev, ABS_X) -
+					input_abs_get_min(dev, ABS_X);
 			if (size == 0)
 				size = 256 * 2;
 
@@ -155,8 +155,8 @@ static void mousedev_touchpad_event(struct input_dev *dev,
 		fy(0) = value;
 		if (mousedev->touch && mousedev->pkt_count >= 2) {
 			/* use X size for ABS_Y to keep the same scale */
-			size = input_abs_get_min(dev, ABS_X) -
-					input_abs_get_max(dev, ABS_X);
+			size = input_abs_get_max(dev, ABS_X) -
+					input_abs_get_min(dev, ABS_X);
 			if (size == 0)
 				size = 256 * 2;
 
-- 
1.7.1


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

* Re: [PATCH] Input: mousedev - fix regression of inverting axes
  2010-08-21 13:50 ` [PATCH] Input: mousedev - fix regression of inverting axes Christoph Fritz
@ 2010-08-21 16:49   ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2010-08-21 16:49 UTC (permalink / raw)
  To: Christoph Fritz
  Cc: Bruno Prémont, Daniel Mack, linux-input, linux-kernel

On Sat, Aug 21, 2010 at 03:50:03PM +0200, Christoph Fritz wrote:
> On Fri, Aug 20, 2010 at 10:33:16PM +0200, Bruno Prémont wrote:
> > Somewhere between 2.6.35 and Linus's tree as of this writing gpm
> > started moving its cursor to the opposite direction of mouse movement.
> > 
> > e.g. moving mouse up causes cursor to move down, moving mouse left
> >      causes cursor to go right
> > 
> > Under 2.6.35 the cursor moved into the same direction as the mouse.
> > 
> > Note, mouse is synaptics touchpad (Acer TravelMate660):
> >   Synaptics Touchpad, model: 1, fw: 5.8, id: 0x9d48b1, caps: 0x904713/0x4006/0x0
> > 
> > 
> > When I get around to it I will try to get more precise information as
> > to when this regression got introduced, eventually bisecting.
> > 
> > Bruno
> 
> Thanks Bruno,
>  I successfully tested the patch below with gpm.
> 
> ---
> Introduced by 987a6c0298260b7aa40702b349282554d6180e4b a swap in max/min
> calculation gets fixed by this patch.
> 
> Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>

Applied, thanks Christoph.

-- 
Dmitry

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

* Re: [2.6.36 regression] Under linux console gpm cursor now going to opposite direction of mouse
  2010-08-20 20:33 [2.6.36 regression] Under linux console gpm cursor now going to opposite direction of mouse Bruno Prémont
  2010-08-21 13:50 ` [PATCH] Input: mousedev - fix regression of inverting axes Christoph Fritz
@ 2010-08-25 18:19 ` Maciej Rutecki
  1 sibling, 0 replies; 4+ messages in thread
From: Maciej Rutecki @ 2010-08-25 18:19 UTC (permalink / raw)
  To: Bruno Prémont; +Cc: linux-input, linux-kernel

On piątek, 20 sierpnia 2010 o 22:33:16 Bruno Prémont wrote:
> Somewhere between 2.6.35 and Linus's tree as of this writing gpm
> started moving its cursor to the opposite direction of mouse movement.
> 
> e.g. moving mouse up causes cursor to move down, moving mouse left
>      causes cursor to go right
> 
> Under 2.6.35 the cursor moved into the same direction as the mouse.
> 
> Note, mouse is synaptics touchpad (Acer TravelMate660):
>   Synaptics Touchpad, model: 1, fw: 5.8, id: 0x9d48b1, caps:
> 0x904713/0x4006/0x0
> 
> 
> When I get around to it I will try to get more precise information as
> to when this regression got introduced, eventually bisecting.
> 
> Bruno

I created a Bugzilla entry at 
https://bugzilla.kernel.org/show_bug.cgi?id=17031
for your bug report, please add your address to the CC list in there, thanks!
-- 
Maciej Rutecki
http://www.maciek.unixy.pl

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

end of thread, other threads:[~2010-08-25 18:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-20 20:33 [2.6.36 regression] Under linux console gpm cursor now going to opposite direction of mouse Bruno Prémont
2010-08-21 13:50 ` [PATCH] Input: mousedev - fix regression of inverting axes Christoph Fritz
2010-08-21 16:49   ` Dmitry Torokhov
2010-08-25 18:19 ` [2.6.36 regression] Under linux console gpm cursor now going to opposite direction of mouse Maciej Rutecki

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