예제 #1
0
int VIDIX_NAME(vixPlaybackFrameSelect)(unsigned int frame)
{
    mga_next_frame = frame;
    if (mga_verbose>1) printf(MGA_MSG" frameselect: %d\n", mga_next_frame);
#if MGA_ALLOW_IRQ
    if (mga_irq == -1)
#endif
    {
	//we don't need the vcount protection as we're only hitting
	//one register (and it doesn't seem to be double buffered)
	regs.besctl = (regs.besctl & ~0x07000000) + (mga_next_frame << 25);
	writel(BESCTL, regs.besctl);

	// writel( regs.besglobctl + ((readl(VCOUNT)+2)<<16),
	writel(BESGLOBCTL, regs.besglobctl + (MGA_VSYNC_POS<<16));
#ifdef CRTC2
	crtc2_frame_sel(mga_next_frame);
#endif
    }

    return(0);
}
예제 #2
0
파일: mga_vid.c 프로젝트: basinilya/mplayer
static int mga_frame_select(unsigned int frame)
{
    mga_next_frame = frame;
    if (mga_verbose>1) mp_msg(MSGT_VO, MSGL_STATUS, "[mga] frameselect: %d\n", mga_next_frame);
#if MGA_ALLOW_IRQ
    if (mga_irq == -1)
#endif
    {
	//we don't need the vcount protection as we're only hitting
	//one register (and it doesn't seem to be double buffered)
	regs.besctl = (regs.besctl & ~0x07000000) + (mga_next_frame << 25);
	writel( regs.besctl, mga_mmio_base + BESCTL );

//	writel( regs.besglobctl + ((readl(mga_mmio_base + VCOUNT)+2)<<16),
	writel( regs.besglobctl + (MGA_VSYNC_POS<<16),
			mga_mmio_base + BESGLOBCTL);
#ifdef CRTC2
	crtc2_frame_sel(mga_next_frame);
#endif
    }

    return 0;
}