On Sun, 2 Dec 2001, Mark Vojkovich wrote:
> On Sun, 2 Dec 2001, Billy Biggs wrote:
>
> > Mark Vojkovich ([EMAIL PROTECTED]):
> >
> > > > I noticed nasty tearing when using my DVD player + XVideo. This is
> > > > in contrast to the i810 driver which will wait to blit if called
> > > > during the retrace. My code now spins on the VGA port, which fixed
> > > > the tearing.
> > >
> > > No, that's not what happens. The MGA driver doesn't double buffer
> > > video so you get tearing. The i810 driver does so you don't. I doubt
> > > spinning on the client side can do anything to prevent tearing.
> >
> > But if it double buffered it would still need to flip-on-retrace.
>
> Most hardware can't not flip on retrace. I believe the MGA
> is one of the exceptions where you can program it to flip on a
> particular line number, the special case of, which is flipping at
> the retrace.
ATI cards can.
Vladimir Dergachev
>
> >
> > So you're saying that my spinning on the client is just making the
> > video not suck by coincidence?
>
> You're still getting a tear, it's just always happenning at
> the same place so it's not so noticeable. You've essentially
> synced your software to the retrace, but there's no way the
> X-server can copy the data to the overlay entirely within
> the retrace. There's not enough time. The tear is just happening
> a fixed time after the retrace.
>
> >
> > > I think you misunderstand what the i810 driver is doing. [...]
> >
> > Thanks for the clarification.
> >
> > > > Do other drivers spin on a call to XvPut if the refresh is occuring?
> > >
> > > No. If you send faster than the retrace on NVIDIA hardware I just let
> > > it shear because I don't want the X-server eating CPU. Below the
> > > refresh rate, it won't shear.
> >
> > So, if I'm running my display at 59.94hz and sending it NTSC video,
> > there's no way for me to get in sync without having some way of querying
> > the refresh, yeah?
>
> The i810 would stall you if it were displaying a frame and already
> had another queued when you sent the next frame. I could do that, but
> I chose not to. You can see the place in the "nv" driver where I had
> code to do that and commented it out.
>
> >
> > > > Also, I wait for the refresh using something like this code:
> > > >
> > > > void spin_until_refresh_complete( void ) {
> > > > for(;;) if( inb( 0x3da ) & 8 ) break;
> > > > }
> > > >
> > > > Does anyone know what VGA cards this could fail on? So far it's
> > > > worked great for my i815, G400, and TNT2.
> > >
> > > It won't necessarily work on those. It depends whether or not I/O
> > > access is enabled. In the case of secondary cards, port access to
> > > legacy VGA registers is typically disabled.
> >
> > Ok, what do you mean by this? Is this a software or hardware setting
> > or what?
>
> What if you have two VGA cards in the machine? Who gets 0x3da?
> Not both obviously. The bios will disable access to one of them
> and the card can't be accessed in that fashion. Drivers like
> the "nv" and "mga" drivers don't program the card with port I/O.
> They do memory mapped I/O for everything so it's really not even
> necessary for proper server operation that the vga registers are
> even operational. The XFree86 RAC code may very well disable
> access to them. Actually, I thought it did, but I guess since
> you are finding something there, it must not have.
>
>
> Mark.
>
>
> _______________________________________________
> Xpert mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/xpert
>
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert