Lines Matching refs:par

556 			  const struct neofb_par  *par)  in vgaHWRestore()  argument
560 VGAwMISC (par->MiscOutReg); in vgaHWRestore()
563 VGAwSEQ (i, par->Sequencer[i]); in vgaHWRestore()
566 VGAwCR (17, par->CRTC[17] & ~0x80); in vgaHWRestore()
569 VGAwCR (i, par->CRTC[i]); in vgaHWRestore()
572 VGAwGR (i, par->Graphics[i]); in vgaHWRestore()
577 VGAwATTR (i, par->Attribute[i]); in vgaHWRestore()
583 const struct neofb_par *par) in neofb_set_par() argument
596 switch (par->depth) in neofb_set_par()
632 VGAwGR (0x0A, par->GeneralLockReg); in neofb_set_par()
646 temp |= (par->ExtColorModeSelect & ~0xF0); in neofb_set_par()
657 temp |= (par->ExtColorModeSelect & ~0x70); in neofb_set_par()
685 vgaHWRestore (info, par); in neofb_set_par()
688 VGAwGR(0x0E, par->ExtCRTDispAddr); in neofb_set_par()
689 VGAwGR(0x0F, par->ExtCRTOffset); in neofb_set_par()
692 temp |= (par->SysIfaceCntl1 & ~0x0F); /* VESA Bios sets bit 1! */ in neofb_set_par()
695 VGAwGR(0x11, par->SysIfaceCntl2); in neofb_set_par()
704 temp |= (par->PanelDispCntlReg1 & ~0xFC); in neofb_set_par()
711 temp |= (par->PanelDispCntlReg1 & ~0xDC); in neofb_set_par()
718 temp |= (par->PanelDispCntlReg1 & ~0x98); in neofb_set_par()
725 temp |= (par->PanelDispCntlReg2 & ~0x38); in neofb_set_par()
732 temp |= (par->PanelDispCntlReg3 & ~0xEF); in neofb_set_par()
736 VGAwGR(0x28, par->PanelVertCenterReg1); in neofb_set_par()
737 VGAwGR(0x29, par->PanelVertCenterReg2); in neofb_set_par()
738 VGAwGR(0x2a, par->PanelVertCenterReg3); in neofb_set_par()
742 VGAwGR(0x32, par->PanelVertCenterReg4); in neofb_set_par()
743 VGAwGR(0x33, par->PanelHorizCenterReg1); in neofb_set_par()
744 VGAwGR(0x34, par->PanelHorizCenterReg2); in neofb_set_par()
745 VGAwGR(0x35, par->PanelHorizCenterReg3); in neofb_set_par()
749 VGAwGR(0x36, par->PanelHorizCenterReg4); in neofb_set_par()
756 VGAwGR(0x36, par->PanelHorizCenterReg4); in neofb_set_par()
757 VGAwGR(0x37, par->PanelVertCenterReg5); in neofb_set_par()
758 VGAwGR(0x38, par->PanelHorizCenterReg5); in neofb_set_par()
764 if (par->ProgramVCLK in neofb_set_par()
765 && ((VGArGR(0x9B) != par->VCLK3NumeratorLow) in neofb_set_par()
766 || (VGArGR(0x9F) != par->VCLK3Denominator) in neofb_set_par()
768 != (par->VCLK3NumeratorHigh & ~0x0F))))) in neofb_set_par()
770 VGAwGR(0x9B, par->VCLK3NumeratorLow); in neofb_set_par()
775 temp |= (par->VCLK3NumeratorHigh & ~0x0F); in neofb_set_par()
778 VGAwGR(0x9F, par->VCLK3Denominator); in neofb_set_par()
781 if (par->biosMode) in neofb_set_par()
782 VGAwCR(0x23, par->biosMode); in neofb_set_par()
792 VGAwCR(0x70, par->VerticalExt); in neofb_set_par()
881 static void neoCalcVCLK (const struct neofb_info *info, struct neofb_par *par, long freq) in neoCalcVCLK() argument
913 par->VCLK3NumeratorLow = n_best; in neoCalcVCLK()
914 par->VCLK3NumeratorHigh = (f_best << 7); in neoCalcVCLK()
917 par->VCLK3NumeratorLow = n_best | (f_best << 7); in neoCalcVCLK()
919 par->VCLK3Denominator = d_best; in neoCalcVCLK()
924 par->VCLK3NumeratorLow, in neoCalcVCLK()
925 par->VCLK3NumeratorHigh, in neoCalcVCLK()
926 par->VCLK3Denominator, in neoCalcVCLK()
939 struct neofb_par *par, in vgaHWInit() argument
942 par->MiscOutReg = 0x23; in vgaHWInit()
945 par->MiscOutReg |= 0x40; in vgaHWInit()
948 par->MiscOutReg |= 0x80; in vgaHWInit()
953 par->Sequencer[0] = 0x00; in vgaHWInit()
954 par->Sequencer[1] = 0x01; in vgaHWInit()
955 par->Sequencer[2] = 0x0F; in vgaHWInit()
956 par->Sequencer[3] = 0x00; /* Font select */ in vgaHWInit()
957 par->Sequencer[4] = 0x0E; /* Misc */ in vgaHWInit()
962 par->CRTC[0] = (timings->HTotal >> 3) - 5; in vgaHWInit()
963 par->CRTC[1] = (timings->HDisplay >> 3) - 1; in vgaHWInit()
964 par->CRTC[2] = (timings->HDisplay >> 3) - 1; in vgaHWInit()
965 par->CRTC[3] = (((timings->HTotal >> 3) - 1) & 0x1F) | 0x80; in vgaHWInit()
966 par->CRTC[4] = (timings->HSyncStart >> 3); in vgaHWInit()
967 par->CRTC[5] = ((((timings->HTotal >> 3) - 1) & 0x20) << 2) in vgaHWInit()
969 par->CRTC[6] = (timings->VTotal - 2) & 0xFF; in vgaHWInit()
970 par->CRTC[7] = (((timings->VTotal - 2) & 0x100) >> 8) in vgaHWInit()
978 par->CRTC[8] = 0x00; in vgaHWInit()
979 par->CRTC[9] = (((timings->VDisplay - 1) & 0x200) >> 4) | 0x40; in vgaHWInit()
982 par->CRTC[9] |= 0x80; in vgaHWInit()
984 par->CRTC[10] = 0x00; in vgaHWInit()
985 par->CRTC[11] = 0x00; in vgaHWInit()
986 par->CRTC[12] = 0x00; in vgaHWInit()
987 par->CRTC[13] = 0x00; in vgaHWInit()
988 par->CRTC[14] = 0x00; in vgaHWInit()
989 par->CRTC[15] = 0x00; in vgaHWInit()
990 par->CRTC[16] = timings->VSyncStart & 0xFF; in vgaHWInit()
991 par->CRTC[17] = (timings->VSyncEnd & 0x0F) | 0x20; in vgaHWInit()
992 par->CRTC[18] = (timings->VDisplay - 1) & 0xFF; in vgaHWInit()
993 par->CRTC[19] = var->xres_virtual >> 4; in vgaHWInit()
994 par->CRTC[20] = 0x00; in vgaHWInit()
995 par->CRTC[21] = (timings->VDisplay - 1) & 0xFF; in vgaHWInit()
996 par->CRTC[22] = (timings->VTotal - 1) & 0xFF; in vgaHWInit()
997 par->CRTC[23] = 0xC3; in vgaHWInit()
998 par->CRTC[24] = 0xFF; in vgaHWInit()
1009 par->Graphics[0] = 0x00; in vgaHWInit()
1010 par->Graphics[1] = 0x00; in vgaHWInit()
1011 par->Graphics[2] = 0x00; in vgaHWInit()
1012 par->Graphics[3] = 0x00; in vgaHWInit()
1013 par->Graphics[4] = 0x00; in vgaHWInit()
1014 par->Graphics[5] = 0x40; in vgaHWInit()
1015 par->Graphics[6] = 0x05; /* only map 64k VGA memory !!!! */ in vgaHWInit()
1016 par->Graphics[7] = 0x0F; in vgaHWInit()
1017 par->Graphics[8] = 0xFF; in vgaHWInit()
1020 par->Attribute[0] = 0x00; /* standard colormap translation */ in vgaHWInit()
1021 par->Attribute[1] = 0x01; in vgaHWInit()
1022 par->Attribute[2] = 0x02; in vgaHWInit()
1023 par->Attribute[3] = 0x03; in vgaHWInit()
1024 par->Attribute[4] = 0x04; in vgaHWInit()
1025 par->Attribute[5] = 0x05; in vgaHWInit()
1026 par->Attribute[6] = 0x06; in vgaHWInit()
1027 par->Attribute[7] = 0x07; in vgaHWInit()
1028 par->Attribute[8] = 0x08; in vgaHWInit()
1029 par->Attribute[9] = 0x09; in vgaHWInit()
1030 par->Attribute[10] = 0x0A; in vgaHWInit()
1031 par->Attribute[11] = 0x0B; in vgaHWInit()
1032 par->Attribute[12] = 0x0C; in vgaHWInit()
1033 par->Attribute[13] = 0x0D; in vgaHWInit()
1034 par->Attribute[14] = 0x0E; in vgaHWInit()
1035 par->Attribute[15] = 0x0F; in vgaHWInit()
1036 par->Attribute[16] = 0x41; in vgaHWInit()
1037 par->Attribute[17] = 0xFF; in vgaHWInit()
1038 par->Attribute[18] = 0x0F; in vgaHWInit()
1039 par->Attribute[19] = 0x00; in vgaHWInit()
1040 par->Attribute[20] = 0x00; in vgaHWInit()
1047 struct neofb_par *par) in neofb_decode_var() argument
1145 par->depth = var->bits_per_pixel; in neofb_decode_var()
1180 if (vgaHWInit (var, info, par, &timings)) in neofb_decode_var()
1187 par->Attribute[16] = 0x01; in neofb_decode_var()
1192 par->CRTC[0x13] = var->xres_virtual >> 3; in neofb_decode_var()
1193 par->ExtCRTOffset = var->xres_virtual >> 11; in neofb_decode_var()
1194 par->ExtColorModeSelect = 0x11; in neofb_decode_var()
1197 par->CRTC[0x13] = var->xres_virtual >> 2; in neofb_decode_var()
1198 par->ExtCRTOffset = var->xres_virtual >> 10; in neofb_decode_var()
1199 par->ExtColorModeSelect = 0x13; in neofb_decode_var()
1202 par->CRTC[0x13] = (var->xres_virtual * 3) >> 3; in neofb_decode_var()
1203 par->ExtCRTOffset = (var->xres_virtual * 3) >> 11; in neofb_decode_var()
1204 par->ExtColorModeSelect = 0x14; in neofb_decode_var()
1208 par->CRTC[0x13] = var->xres_virtual >> 1; in neofb_decode_var()
1209 par->ExtCRTOffset = var->xres_virtual >> 9; in neofb_decode_var()
1210 par->ExtColorModeSelect = 0x15; in neofb_decode_var()
1217 par->ExtCRTDispAddr = 0x10; in neofb_decode_var()
1220 par->VerticalExt = (((timings.VTotal -2) & 0x400) >> 10 ) in neofb_decode_var()
1227 par->SysIfaceCntl1 = 0x30; in neofb_decode_var()
1229 par->SysIfaceCntl1 = 0x00; in neofb_decode_var()
1231 par->SysIfaceCntl2 = 0xc0; /* VESA Bios sets this to 0x80! */ in neofb_decode_var()
1234 par->PanelDispCntlReg1 = 0x00; in neofb_decode_var()
1236 par->PanelDispCntlReg1 |= 0x02; in neofb_decode_var()
1238 par->PanelDispCntlReg1 |= 0x01; in neofb_decode_var()
1241 if (par->PanelDispCntlReg1 == 0x00) { in neofb_decode_var()
1243 par->PanelDispCntlReg1 |= 0x02; in neofb_decode_var()
1250 par->PanelDispCntlReg1 |= 0x60; in neofb_decode_var()
1253 par->PanelDispCntlReg1 |= 0x40; in neofb_decode_var()
1256 par->PanelDispCntlReg1 |= 0x20; in neofb_decode_var()
1264 switch (par->PanelDispCntlReg1 & 0x03) in neofb_decode_var()
1267 par->GeneralLockReg = 0x00; in neofb_decode_var()
1269 par->ProgramVCLK = 1; in neofb_decode_var()
1273 par->GeneralLockReg = 0x01; in neofb_decode_var()
1275 par->ProgramVCLK = 0; in neofb_decode_var()
1285 par->PanelDispCntlReg2 = 0x00; in neofb_decode_var()
1286 par->PanelDispCntlReg3 = 0x00; in neofb_decode_var()
1289 (par->PanelDispCntlReg1 == 0x02) && /* LCD only */ in neofb_decode_var()
1300 par->PanelDispCntlReg2 |= 0xC6; in neofb_decode_var()
1314 par->PanelVertCenterReg1 = 0x00; in neofb_decode_var()
1315 par->PanelVertCenterReg2 = 0x00; in neofb_decode_var()
1316 par->PanelVertCenterReg3 = 0x00; in neofb_decode_var()
1317 par->PanelVertCenterReg4 = 0x00; in neofb_decode_var()
1318 par->PanelVertCenterReg5 = 0x00; in neofb_decode_var()
1319 par->PanelHorizCenterReg1 = 0x00; in neofb_decode_var()
1320 par->PanelHorizCenterReg2 = 0x00; in neofb_decode_var()
1321 par->PanelHorizCenterReg3 = 0x00; in neofb_decode_var()
1322 par->PanelHorizCenterReg4 = 0x00; in neofb_decode_var()
1323 par->PanelHorizCenterReg5 = 0x00; in neofb_decode_var()
1326 if (par->PanelDispCntlReg1 & 0x02) in neofb_decode_var()
1337 par->PanelDispCntlReg2 |= 0x01; in neofb_decode_var()
1338 par->PanelDispCntlReg3 |= 0x10; in neofb_decode_var()
1356 par->PanelHorizCenterReg3 = hoffset; in neofb_decode_var()
1357 par->PanelVertCenterReg2 = voffset; in neofb_decode_var()
1360 par->PanelHorizCenterReg4 = hoffset; in neofb_decode_var()
1361 par->PanelVertCenterReg1 = voffset; in neofb_decode_var()
1364 par->PanelHorizCenterReg1 = hoffset; in neofb_decode_var()
1365 par->PanelVertCenterReg3 = voffset; in neofb_decode_var()
1368 par->PanelHorizCenterReg2 = hoffset; in neofb_decode_var()
1369 par->PanelVertCenterReg4 = voffset; in neofb_decode_var()
1372 par->PanelHorizCenterReg5 = hoffset; in neofb_decode_var()
1373 par->PanelVertCenterReg5 = voffset; in neofb_decode_var()
1383 par->biosMode = neoFindMode (var->xres, var->yres, var->bits_per_pixel); in neofb_decode_var()
1389 neoCalcVCLK (info, par, timings.pixclock); in neofb_decode_var()
1392 par->MiscOutReg |= 0x0C; in neofb_decode_var()
1402 struct neofb_par par; in neofb_set_var() local
1407 err = neofb_decode_var (var, info, &par); in neofb_set_var()
1569 neofb_set_par (info, &par); in neofb_set_var()