On Fri, Jul 19, 2002 at 01:30:11AM +0300, Ville Syrj�l� wrote:
> 
> The fix (TM). Works on 2.4.19-rc1 at least.
> - ACCESS_FBINFO(currenthw)->CRTC[0x11]
> + ACCESS_FBINFO(hw).CRTC[0x11]

OK, but that does not solve the problem that:

#define ACCESS_FBINFO2(info, x) (info->x)
#define ACCESS_FBINFO(x) ACCESS_FBINFO2(minfo,x)

There is no "minfo" available to matrox_irq() when those macros above
are expanded to be:

    minfo->hw

Is this it being passed on the end of request_irq()?

    request_irq(pdev->irq, matrox_irq, SA_SHIRQ, "MGA Vertical Sync", MINFO);

Does it arrive in matrox_irq() in the 2nd parameter, "dummy"?  What
type should dummy cast to then?  I went with the following addition to
matrox_irq():

    struct matrox_fb_info* minfo = dummy;

And it seems to work!  CPU usage of mplayer/directfb is now quite
comparible to mplayer/framebuffer/mga!

> Also when building DirectFB make sure you get the FBIO_WAITFORVSYNC
> definition. Add it to /usr/include/linux/fb.h

Did that.  Put an "#error bla" in the #ifdef FBIO_WAITFORVSYNC just to
be sure I was getting it and I am.  :-)

> The patch only adds it to
> the kernel tree. Without the definition you just end up polling some CGA
> registers and that's not nice for CPU usage.

Indeed.

b.

-- 
Brian J. Murrell

Attachment: msg00807/pgp00000.pgp
Description: PGP signature

Reply via email to