ivideo->sisfb_tvstd = -1; printk(KERN_ERR "sisfb: PALM/PALN/NTSCJ not supported\n"); 
ivideo->sisfb_tvstd = -1; printk(KERN_ERR "sisfb: PALM/PALN/NTSCJ not supported\n"); 
static void __devinit sisfb_detect_VB_connect(struct sis_video_info *ivideo){	u8 cr32, temp;#ifdef CONFIG_FB_SIS_300	if(ivideo->sisvga_engine == SIS_300_VGA) {		inSISIDXREG(SISSR, 0x17, temp);		if((temp & 0x0F) && (ivideo->chip != SIS_300)) {			/* PAL/NTSC is stored on SR16 on such machines */			if(!(ivideo->vbflags & (TV_PAL | TV_NTSC | TV_PALM | TV_PALN))) {		   		inSISIDXREG(SISSR, 0x16, temp);				if(temp & 0x20)					ivideo->vbflags |= TV_PAL;				else					ivideo->vbflags |= TV_NTSC;			}		}	}#endif	inSISIDXREG(SISCR, 0x32, cr32);	if(cr32 & SIS_CRT1) {		ivideo->sisfb_crt1off = 0;	} else {		ivideo->sisfb_crt1off = (cr32 & 0xDF) ? 1 : 0;	}	ivideo->vbflags &= ~(CRT2_TV | CRT2_LCD | CRT2_VGA);	if(cr32 & SIS_VB_TV)   ivideo->vbflags |= CRT2_TV;	if(cr32 & SIS_VB_LCD)  ivideo->vbflags |= CRT2_LCD;	if(cr32 & SIS_VB_CRT2) ivideo->vbflags |= CRT2_VGA;	/* Check given parms for hardware compatibility.	 * (Cannot do this in the search_xx routines since we don't	 * know what hardware we are running on then)	 */	if(ivideo->chip != SIS_550) {	   ivideo->sisfb_dstn = ivideo->sisfb_fstn = 0;	}	if(ivideo->sisfb_tvplug != -1) {	   if( (ivideo->sisvga_engine != SIS_315_VGA) ||	       (!(ivideo->vbflags & (VB_301C|VB_301LV|VB_302LV))) ) {	      if(ivideo->sisfb_tvplug & TV_YPBPR) {	         ivideo->sisfb_tvplug = -1;		 printk(KERN_ERR "sisfb: YPbPr not supported\n");	      }	   }	}	if(ivideo->sisfb_tvplug != -1) {	   if( (ivideo->sisvga_engine != SIS_315_VGA) ||	       (!(ivideo->vbflags & (VB_301|VB_301B|VB_302B))) ) {	      if(ivideo->sisfb_tvplug & TV_HIVISION) {	         ivideo->sisfb_tvplug = -1;		 printk(KERN_ERR "sisfb: HiVision not supported\n");	      }	   }	}	if(ivideo->sisfb_tvstd != -1) {	   if( (!(ivideo->vbflags & VB_SISBRIDGE)) &&	       (!((ivideo->sisvga_engine == SIS_315_VGA) && (ivideo->vbflags & VB_CHRONTEL))) ) {	      if(ivideo->sisfb_tvstd & (TV_PALN | TV_PALN | TV_NTSCJ)) {	         ivideo->sisfb_tvstd = -1;	         printk(KERN_ERR "sisfb: PALM/PALN/NTSCJ not supported\n");	      }	   }	}	/* Detect/set TV plug & type */	if(ivideo->sisfb_tvplug != -1) {		ivideo->vbflags |= ivideo->sisfb_tvplug;	} else {		if(cr32 & SIS_VB_YPBPR)     	 ivideo->vbflags |= (TV_YPBPR|TV_YPBPR525I); /* default: 480i */		else if(cr32 & SIS_VB_HIVISION)  ivideo->vbflags |= TV_HIVISION;		else if(cr32 & SIS_VB_SCART)     ivideo->vbflags |= TV_SCART;	 	else {			if(cr32 & SIS_VB_SVIDEO)    ivideo->vbflags |= TV_SVIDEO;			if(cr32 & SIS_VB_COMPOSITE) ivideo->vbflags |= TV_AVIDEO;		}	}	if(!(ivideo->vbflags & (TV_YPBPR | TV_HIVISION))) {	    if(ivideo->sisfb_tvstd != -1) {	       ivideo->vbflags &= ~(TV_NTSC | TV_PAL | TV_PALM | TV_PALN | TV_NTSCJ);	       ivideo->vbflags |= ivideo->sisfb_tvstd;	    }	    if(ivideo->vbflags & TV_SCART) {	       ivideo->vbflags &= ~(TV_NTSC | TV_PALM | TV_PALN | TV_NTSCJ);	       ivideo->vbflags |= TV_PAL;	    }	    if(!(ivideo->vbflags & (TV_PAL | TV_NTSC | TV_PALM | TV_PALN | TV_NTSCJ))) {		if(ivideo->sisvga_engine == SIS_300_VGA) {	        	inSISIDXREG(SISSR, 0x38, temp);			if(temp & 0x01) ivideo->vbflags |= TV_PAL;			else		ivideo->vbflags |= TV_NTSC;		} else if((ivideo->chip <= SIS_315PRO) || (ivideo->chip >= SIS_330)) {                	inSISIDXREG(SISSR, 0x38, temp);			if(temp & 0x01) ivideo->vbflags |= TV_PAL;			else		ivideo->vbflags |= TV_NTSC;	    	} else {	        	inSISIDXREG(SISCR, 0x79, temp);			if(temp & 0x20)	ivideo->vbflags |= TV_PAL;			else		ivideo->vbflags |= TV_NTSC;	    	}	    }	}	/* Copy forceCRT1 option to CRT1off if option is given */    	if(ivideo->sisfb_forcecrt1 != -1) {    	   ivideo->sisfb_crt1off = (ivideo->sisfb_forcecrt1) ? 0 : 1;    	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/sis_main.c/clean/drivers/video/sis/sis_main.c