--- via_fbobj.c.orig 2004-02-09 19:03:41.000000000 -0500 +++ via_fbobj.c 2004-02-09 19:25:55.000000000 -0500 @@ -51,6 +51,7 @@ MODULE_PARM(noaccel,"i"); MODULE_PARM(TVon,"i"); // 0:off 1:on MODULE_PARM(TVtype,"i"); // 0:none 1:NTSC 2:PAL MODULE_PARM(TVoverscan,"i"); // 0:off 1:on +MODULE_PARM(TVfilter,"i"); // 0:off 1 1:1:1 2 1:2:1 MODULE_PARM(memsize,"i"); #define VERSION "0.8" @@ -133,7 +134,7 @@ static int TVindex = 0xFF; static int TVtype = TVTYPE_PAL; // 0:none 1:NTSC 2:PAL static int TVoverscan = VIA_TVOVER; // 0:VIA_TVNORMAL 1:VIA_TVOVER static int TVEncoder = VIA_NONETV; - +static int TVfilter = 2; // filter on static int memsize; #ifndef VIA_MMIO @@ -1181,7 +1182,7 @@ static int __devinit via_pci_probe(struc else // TVtype == TVTYPE_PAL refresh = 50; } - output("mode=%s bpp=%d refresh=%d TVon=%d TVtype=%d \n",mode,bpp,refresh,TVon,TVtype); + output("mode=%s bpp=%d refresh=%d TVon=%d TVtype=%d TVfilter=%d\n",mode,bpp,refresh,TVon,TVtype,TVfilter); default_var.xres=default_xres; default_var.yres=default_yres; @@ -1309,6 +1310,8 @@ int __init viafb_setup(char *options) TVon = simple_strtoul(opt+5,NULL,0); else if (!strncmp(opt,"TVtype=",7)) TVtype = simple_strtoul(opt+7,NULL,0); + else if (!strncmp(opt,"TVfilter=",9)) + TVtype = simple_strtoul(opt+9,NULL,0); else if (!strncmp(opt,"memsize=",8)) memsize = simple_strtoul(opt+8,NULL,0); else @@ -1499,6 +1502,10 @@ void VIAPreSetTV3Mode(int xres,int yres, w_bytes = j + 1; + /* Set up deflicker bits 0 and 1 of registers 2 and 3 */ + W_Buffer[2+1] = (W_Buffer[2+1] & ~3) | (TVfilter & 3); + W_Buffer[3+1] = (W_Buffer[3+1] & ~3) | (TVfilter & 3); + I2C_Enable(I2CPort); /* TV Reset */