rem: CRTCW(REPAINT1, (CRTCR(REPAINT1) & 0x3f));
context: status_t BT_stop_tvout(void){	/* prevent BT from being overclocked by VGA-only modes & black-out TV-out */	BT_killclk_blackout();	/* enable access to primary head */	set_crtc_owner(0);	/* switch on VGA monitor HSYNC and VSYNC */	//fixme: is this needed?	CRTCW(REPAINT1, (CRTCR(REPAINT1) & 0x3f));	/* wait for one image to be generated to make sure VGA has kicked in and is	 * running OK before continuing...	 * (Kicking in will fail often if we do not wait here) */	/* make sure we are 'in' active VGA picture */	while (NV_REG8(NV8_INSTAT1) & 0x08) snooze(1);	/* wait for next vertical retrace start on VGA */	while (!(NV_REG8(NV8_INSTAT1) & 0x08)) snooze(1);	/* now wait until we are 'in' active VGA picture again */	while (NV_REG8(NV8_INSTAT1) & 0x08) snooze(1);	/* set CRTC to master mode (b7 = 0) if it wasn't slaved for a panel before */	if (!(si->ps.slaved_tmds1))	CRTCW(PIXEL, (CRTCR(PIXEL) & 0x03));	/* CAUTION:	 * On old cards, PLLSEL (and TV_SETUP?) cannot be read (sometimes?), but	 * write actions do succeed ...	 * This is confirmed for both ISA and PCI access, on NV04 and NV11. */	/* setup TVencoder connection */	/* b1-0 = %00: encoder type is SLAVE;	 * b24 = 1: VIP datapos is b0-7 */	//fixme if needed: setup completely instead of relying on pre-init by BIOS..	//(it seems to work OK on NV04 and NV11 although read reg. doesn't seem to work)	DACW(TV_SETUP, ((DACR(TV_SETUP) & ~0x00000003) | 0x01000000));	/* tell GPU to use pixelclock from internal source instead of using TVencoder */	if (si->ps.secondary_head)		DACW(PLLSEL, 0x30000f00);	else		DACW(PLLSEL, 0x10000700);	/* HTOTAL, VTOTAL and OVERFLOW return their default CRTC use, instead of	 * H, V-low and V-high 'shadow' counters(?)(b0, 4 and 6 = 0) (b7 use = unknown) */	CRTCW(TREG, 0x00);	/* select panel encoder, not TV encoder if needed (b0 = 1).	 * Note:	 * Both are devices (often) using the CRTC in slaved mode. */	if (si->ps.slaved_tmds1) CRTCW(LCD, (CRTCR(LCD) | 0x01));	/* fixme if needed:	 * a full encoder chip reset could be done here (so after decoupling crtc)... */	/* (but: beware of the 'locked SDA' syndrome then!) */	return B_OK;}//end BT_stop_tvout.