linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
[parent not found: <200003031924.LAA72531@bromo.med.uc.edu>]
* Re: patch to get latest XFree 4.0 snapshot (xf3918) to work on ppc with r128
@ 2000-02-25 14:36 Kevin_Hendricks
  0 siblings, 0 replies; 12+ messages in thread
From: Kevin_Hendricks @ 2000-02-25 14:36 UTC (permalink / raw)
  To: khendricks, gewrgiou; +Cc: linuxppc-dev

[-- Attachment #1: Type: TEXT/plain, Size: 3592 bytes --]

Hi,

>  There were some changes recently in the mouse module in xfree, some PS/2
>mice were broken for a while but that has been fixed before 3.9.18, I don't
>a usb mouse at my mac so i can't help there but IMPS/2 works fine in my x86
>machine.

>From looking at mouse.c, either x86 IMPS/2 is very different from that used in
ppc or something else is messed up.

Here is the problem pieces of code:

First are the protocol parameters for IMPS2 which map to the IntelliMouse:


  {  0x08, 0x08, 0x00, 0x00,  4,   0x00, 0xff, MPF_NONE },  /* IntelliMouse */



Then in MouseReadInput() there is a check to see if the packet looks reasonable
to determine if things have gotten out of sync.

        /* Accept or reject the packet ? */
        if ((pBuf[0] & pMse->protoPara[0]) != pMse->protoPara[1] || baddata) {
#ifdef EXTMOUSEDEBUG
            if (pMse->inSync)
                ErrorF("mouse driver lost sync\n");
            ErrorF("skipping byte %02x\n",*pBuf);
#endif
            pMse->protoBufTail = --pBufP;
            for (j = 0; j < pBufP; j++)
                pBuf[j] = pBuf[j+1];
            pMse->inSync = 0;
            continue;
        }


But according to my specs on IMPS/2 the first character has the following binary
format:

0b00xy0321  with xy indicating movement in positive x or y direction of mouse
and 321 being the mouse buttons.  The later characters determine the dx, dy, and
dz values.

but the test for out of sync:

        if ((pBuf[0] & pMse->protoPara[0]) != pMse->protoPara[1] || baddata) {

             0b00xy0321 & 0x8 !=  0x8

This will result in deliberately throwing out the the current pBuf[0] since on a
good first character they can never be equal.

This was resulting in out of sync conditions completely since we were throwing
out perfectly good characters until we got one that randomly fit the sync
test!!!

I checked 3.9.17 and the values for the protocol parameters were in fact
different:

Here are the old ones:

  {  0xc0, 0x00, 0x00, 0x00,  4,   0x00, 0xff, MPF_NONE },  /* IntelliMouse */

These would work for my IMPS/2 mouse.

So because someone wanted this to work with their mouse (which has two extra
buttons) they had to change the first parameter from 0xc0 to 0x8 (because their
protocal mapped buttons 4 and 5 into those first two bits) but for some reason
they wanted or needed to always throw out the first character and then changed
the second parameter from 0x00 to 0x08.

This is simply not correct.  The IMPS/2 protocol I have seen does not have
buttons 4 and 5 and does not throw out one bad character at the beginning.

I have changed mouse.c to remove the "extra" buttons 4 and 5 and changed to the
correct out of sync parameter masks: { 0xc8, 0x00 ... and now it works fine with
3 or 4 bytes being read (the value for dz is optional).


So someone kludged it to work for their mouse and broke it for everyone else.

If IMPS/2 (nonserial) does indeed work on your x86 machine then something has
defintely changed!

I have attached my mouse.c patch and now finally with this patch in place,
everything is working on xf 3.9.18

The patch is attached:


Will you check this with your IMPS/2 (assuming it is non-serial since the IMPS/2
serial mice use a different code)?  If it works, please consider forwarding this
to the xfree lists for possible inclusion for xf 4.0.

Thanks,

Kevin

--
Kevin B. Hendricks
Associate Professor of Operations and Information Technology
Richard Ivey School of Business, University of Western Ontario
London, Ontario  N6A-3K7  CANADA
khendricks@ivey.uwo.ca, (519) 661-3874, fax: 519-661-3959

[-- Attachment #2: mouse_chg.patch.gz --]
[-- Type: APPLICATION/octet-stream, Size: 468 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: patch to get latest XFree 4.0 snapshot (xf3918) to work on ppc with r128
@ 2000-02-25  0:07 Dan Bethe
  2000-02-25  8:04 ` Geert Uytterhoeven
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Bethe @ 2000-02-25  0:07 UTC (permalink / raw)
  To: linuxppc-dev


	Hi there Kevin.  Thanks for your good work.  I was wondering if we can
have similar benefits for users of ATI Rage LT Pro in the Powerbook G3
Series.
	And I assume that when you say you have full acceleration on Rage 128,
that this is just 2D acceleration.  And do you mean that the
acceleration implements all features of the card?  Or just that it's a
lot better than without acceleration support?
	I would be willing to help pay/motivate someone on a gift basis for 2D
and 3D acceleration of ATI Rage LT Pro.  I'm serious.
	I got either no response or no conclusive info from the people on the
fbdev mailing list, to whom I was originally pointed by someone on
linuxppc-dev.  The only other spot I can find for acceleration is
http://glx.on.openprojects.net.  The source rpm doesn't build for me,
and is blatantly hardcoded biased toward IA32.  It does list ATI Rage
LT and ATI "mobility", but I don't know what to do to get it to build
for me.
	What is ATI "mobility" anyway?

	Finally, here's a recent link to the ATI Linux developer kit:

http://www.ati.com/na/pages/resource_centre/dev_rel/linux.html

	And the recent Slashdot article about it, moderated up to useful
commentary:

http://slashdot.org/article.pl?sid=00/02/23/0848227&mode=nested

	Thank you!

=====
"Don't expect your own messiah; this neverworld which you desire is
only in your mind." -- http://www.dreamtheater.net/songb4.htm#IV5

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 12+ messages in thread
* patch to get latest XFree 4.0 snapshot (xf3918) to work on ppc with r128
@ 2000-02-24 15:06 Kevin Hendricks
  2000-02-24 17:48 ` Kostas Gewrgiou
  0 siblings, 1 reply; 12+ messages in thread
From: Kevin Hendricks @ 2000-02-24 15:06 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

Hi,

Yesterday the last Xfree4.0 snapshot was released (xf3.9.18).  Because of all
of the hard work of Kostas integrating powerpc changes into the official xf 4.0
tree, the xf3918 snapshot almost builds out of the box and provides wonderful
Rage128 acceleration at 16bpp and 32bpp.

The only changes needed were to xfree86.cf to add the r128 module to those being
built on powerpc and a patch to lnxResource.c provided by Kostas.

Will someone who understands PCI addressing and memory-mapped io, please look at
xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c and help us
figure out what really needs to be done here so that xf 4.0 final will build
completely out of the box.

Anyway,  I have attached the small patch needed.

With this patch XFree86 Xserver with full rage 128 acceleration is working
nicely on my B+W G3 right now with any recent kernel 2.2.15 kernel (ie. one
that includes Anthony's latest aty128fb.c kernel video driver).

Thanks Kostas and Anthony for your great work!

If anyone is interested, after some more testing, I will create a binary that
can be installed over XFree 3.3.X.  Just let me know if interested.

Thanks,

Kevin

--
Kevin B. Hendricks
Associate Professor of Operations and Information Technology
Richard Ivey School of Business, University of Western Ontario
London, Ontario  N6A-3K7  CANADA
khendricks@ivey.uwo.ca, (519) 661-3874, fax: 519-661-3959


[-- Attachment #2: xf3918_r128.diff.gz --]
[-- Type: application/x-gzip, Size: 1053 bytes --]

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

end of thread, other threads:[~2000-03-03 22:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <v03110700b4dd777b032a@[209.183.136.166]>
2000-02-28  0:29 ` patch to get latest XFree 4.0 snapshot (xf3918) to work on ppc with r128 Kostas Gewrgiou
2000-03-03 20:51   ` Kevin Hendricks
     [not found] <200003031924.LAA72531@bromo.med.uc.edu>
2000-03-03 22:14 ` Kevin Hendricks
2000-02-25 14:36 Kevin_Hendricks
  -- strict thread matches above, loose matches on Subject: below --
2000-02-25  0:07 Dan Bethe
2000-02-25  8:04 ` Geert Uytterhoeven
2000-02-24 15:06 Kevin Hendricks
2000-02-24 17:48 ` Kostas Gewrgiou
2000-02-24 18:53   ` Kevin Hendricks
2000-02-24 22:25   ` Kevin Hendricks
2000-02-25  3:19     ` Kevin Hendricks
2000-02-25 12:28     ` Kostas Gewrgiou

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