[MPlayer-dev-eng] [PATCH] Mach64 vidix register corruption

Colin Leroy colin at colino.net
Tue Oct 22 13:44:31 CEST 2002


On Tue, 22 Oct 2002 13:28:39 +0200 Michael Niedermayer <michaelni at gmx.at>
wrote:

Hi Michael,

> perhaps yes, perhaps no, i dunno, i dont have any docs of these
> registers, but just reading & writing everything in random order might
> have bad sideeffects, i would prefer if we could reduce the number of
> registers written (especially the control registers, the
> width/height/coeff stuff shouldnt cause problems) the reason is that i
> have seen cases where reading and then writeing the same value back did
> cause problems (some old intel chipset, but thats offtopic)

Well, that's just a "put everything back as we found it", and works for
me.
This were the control registers which were causing the problem,
specifically one of these ones:
  DECLARE_VREG(CLOCK_CNTL),
  DECLARE_VREG(SCALER_COLOUR_CNTL),
  DECLARE_VREG(OVERLAY_GRAPHICS_KEY_MSK),
  DECLARE_VREG(OVERLAY_GRAPHICS_KEY_CLR),
  DECLARE_VREG(OVERLAY_KEY_CNTL)
(the last ones I added during my tests). I didn't tested any further
'cause it was late, but I'll guess the OVERLAY_something was leaved in a
bad (or more precisely xvidix-ed) state which prevented xv to work. 

I don't think this is dangerous to set them back (many of them are already
reset in mach64_vid_stop_video()). ATI's docs (i have them, i signed their
nda) don't mention it at least.

We could also #ifdef the restore stuff to limit it to ppc (I don't know if
it works on x86 ?) if you'd prefer.
-- 
Colin
if(debut) {
    fin=true;
}



More information about the MPlayer-dev-eng mailing list