Hi, On Thu, Aug 07, 2008 at 02:30:51AM +0800, Wen-Yen Chuang wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > This is a xf86-input-tslib bug report on BTS of Debian. > I paste the full text below. > > Binary package of xf86-input-tslib in Debian is named > "xserver-xorg-input-tslib". > You can see full discussion on http://bugs.debian.org/493942 . > > If you want to discuss it on BTS of Debian, > You can reply to the mail address: [EMAIL PROTECTED] . > > Thank you for the good X driver. > > Kind regards > Wen-Yen Chuang (caleb) > > > > Original bug report: > ======================================================================= > Hi, > > I???m working on getting Debian to support the Openmoko Freerunner. When > installing Xorg with the fbdev and tslib driver, I observed the > following problem: The curser only spans a part of the screen, although > it is correctly calibrated using ts_calibrate. > > I tracked it down to these lines in tslib.c: > > > InitValuatorAxisStruct(device, 0, 0, /* min val */ 1023, > /* max val */ > 1024, /* resolution */ > 0, /* min_res */ > 1024); /* max_res */ > > InitValuatorAxisStruct(device, 1, 0, /* min val */ 1023, > /* max val */ > 1024, /* resolution */ > 0, /* min_res */ > 1024); /* max_res */ > > which basically tell the Xserver: I will give you absolute curser > positions between 0 and 1024, when in fact it just passes through the > values from tslib, which are in 0-480 and 0-640 respectively.
These hardcoded values are pretty silly :-( We already have the width and height in the options, so lets use it. Can you try the following patch please? It compiles but is otherwise untested. I have no idea what min_res and max_res mean, I can only find documentation for old XFree Releases where these parameters didn't exist. Sascha Index: src/tslib.c =================================================================== --- a/src/tslib.c (revision 28) +++ b/src/tslib.c (working copy) @@ -184,9 +184,11 @@ InputInfoPtr pInfo; unsigned char map[MAXBUTTONS + 1]; int i; + struct ts_priv *priv; ErrorF("%s\n", __FUNCTION__); pInfo = device->public.devicePrivate; + priv = pInfo->private; switch (what) { case DEVICE_INIT: @@ -222,15 +224,17 @@ return !Success; } - InitValuatorAxisStruct(device, 0, 0, /* min val */ 1023, /* max val */ - 1024, /* resolution */ - 0, /* min_res */ - 1024); /* max_res */ + InitValuatorAxisStruct(device, 0, 0, /* min val */ + priv->width - 1, /* max val */ + priv->width, /* resolution */ + 0, /* min_res */ + priv->width); /* max_res */ - InitValuatorAxisStruct(device, 1, 0, /* min val */ 1023, /* max val */ - 1024, /* resolution */ - 0, /* min_res */ - 1024); /* max_res */ + InitValuatorAxisStruct(device, 1, 0, /* min val */ + priv->height - 1,/* max val */ + priv->height, /* resolution */ + 0, /* min_res */ + priv->height); /* max_res */ if (InitProximityClassDeviceStruct (device) == FALSE) { ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n"); -- Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]