Lines Matching refs:_par
681 struct clgenfb_par *_par = (struct clgenfb_par *) par; in clgen_encode_fix() local
691 switch (_par->var.bits_per_pixel) { in clgen_encode_fix()
710 fix->smem_len = _par->var.bits_per_pixel == 1 ? _info->size / 4 in clgen_encode_fix()
712 fix->type = _par->type; in clgen_encode_fix()
714 fix->visual = _par->visual; in clgen_encode_fix()
718 fix->line_length = _par->line_length; in clgen_encode_fix()
799 struct clgenfb_par *_par = (struct clgenfb_par *) par; in clgen_decode_var() local
815 _par->var = *var; in clgen_decode_var()
823 _par->var.bits_per_pixel = 8; in clgen_decode_var()
828 _par->var.bits_per_pixel = 16; in clgen_decode_var()
833 _par->var.bits_per_pixel = 24; in clgen_decode_var()
838 _par->var.bits_per_pixel = 32; in clgen_decode_var()
849 if (_par->var.xres * nom / den * _par->var.yres > fb_info->size) { in clgen_decode_var()
856 if (_par->var.xres_virtual == -1 && in clgen_decode_var()
857 _par->var.yres_virtual == -1) { in clgen_decode_var()
868 _par->var.xres_virtual = modes[i].xres; in clgen_decode_var()
869 _par->var.yres_virtual = modes[i].yres; in clgen_decode_var()
872 _par->var.xres_virtual, _par->var.yres_virtual); in clgen_decode_var()
873 } else if (_par->var.xres_virtual == -1) { in clgen_decode_var()
875 } else if (_par->var.yres_virtual == -1) { in clgen_decode_var()
878 if (_par->var.xoffset < 0) in clgen_decode_var()
879 _par->var.xoffset = 0; in clgen_decode_var()
880 if (_par->var.yoffset < 0) in clgen_decode_var()
881 _par->var.yoffset = 0; in clgen_decode_var()
884 if (_par->var.xoffset > _par->var.xres_virtual - _par->var.xres) in clgen_decode_var()
885 _par->var.xoffset = _par->var.xres_virtual - _par->var.xres - 1; in clgen_decode_var()
887 if (_par->var.yoffset > _par->var.yres_virtual - _par->var.yres) in clgen_decode_var()
888 _par->var.yoffset = _par->var.yres_virtual - _par->var.yres - 1; in clgen_decode_var()
890 switch (_par->var.bits_per_pixel) { in clgen_decode_var()
892 _par->line_length = _par->var.xres_virtual / 8; in clgen_decode_var()
893 _par->visual = FB_VISUAL_MONO10; in clgen_decode_var()
897 _par->line_length = _par->var.xres_virtual; in clgen_decode_var()
898 _par->visual = FB_VISUAL_PSEUDOCOLOR; in clgen_decode_var()
899 _par->var.red.offset = 0; in clgen_decode_var()
900 _par->var.red.length = 6; in clgen_decode_var()
901 _par->var.green.offset = 0; in clgen_decode_var()
902 _par->var.green.length = 6; in clgen_decode_var()
903 _par->var.blue.offset = 0; in clgen_decode_var()
904 _par->var.blue.length = 6; in clgen_decode_var()
908 _par->line_length = _par->var.xres_virtual * 2; in clgen_decode_var()
909 _par->visual = FB_VISUAL_DIRECTCOLOR; in clgen_decode_var()
911 _par->var.red.offset = 2; in clgen_decode_var()
912 _par->var.green.offset = -3; in clgen_decode_var()
913 _par->var.blue.offset = 8; in clgen_decode_var()
915 _par->var.red.offset = 10; in clgen_decode_var()
916 _par->var.green.offset = 5; in clgen_decode_var()
917 _par->var.blue.offset = 0; in clgen_decode_var()
919 _par->var.red.length = 5; in clgen_decode_var()
920 _par->var.green.length = 5; in clgen_decode_var()
921 _par->var.blue.length = 5; in clgen_decode_var()
925 _par->line_length = _par->var.xres_virtual * 3; in clgen_decode_var()
926 _par->visual = FB_VISUAL_DIRECTCOLOR; in clgen_decode_var()
928 _par->var.red.offset = 8; in clgen_decode_var()
929 _par->var.green.offset = 16; in clgen_decode_var()
930 _par->var.blue.offset = 24; in clgen_decode_var()
932 _par->var.red.offset = 16; in clgen_decode_var()
933 _par->var.green.offset = 8; in clgen_decode_var()
934 _par->var.blue.offset = 0; in clgen_decode_var()
936 _par->var.red.length = 8; in clgen_decode_var()
937 _par->var.green.length = 8; in clgen_decode_var()
938 _par->var.blue.length = 8; in clgen_decode_var()
942 _par->line_length = _par->var.xres_virtual * 4; in clgen_decode_var()
943 _par->visual = FB_VISUAL_DIRECTCOLOR; in clgen_decode_var()
945 _par->var.red.offset = 8; in clgen_decode_var()
946 _par->var.green.offset = 16; in clgen_decode_var()
947 _par->var.blue.offset = 24; in clgen_decode_var()
949 _par->var.red.offset = 16; in clgen_decode_var()
950 _par->var.green.offset = 8; in clgen_decode_var()
951 _par->var.blue.offset = 0; in clgen_decode_var()
953 _par->var.red.length = 8; in clgen_decode_var()
954 _par->var.green.length = 8; in clgen_decode_var()
955 _par->var.blue.length = 8; in clgen_decode_var()
959 DPRINTK("Unsupported bpp size: %d\n", _par->var.bits_per_pixel); in clgen_decode_var()
965 _par->var.red.msb_right = in clgen_decode_var()
966 _par->var.green.msb_right = in clgen_decode_var()
967 _par->var.blue.msb_right = in clgen_decode_var()
968 _par->var.transp.offset = in clgen_decode_var()
969 _par->var.transp.length = in clgen_decode_var()
970 _par->var.transp.msb_right = 0; in clgen_decode_var()
972 _par->type = FB_TYPE_PACKED_PIXELS; in clgen_decode_var()
983 _par->multiplexing = 0; in clgen_decode_var()
991 _par->multiplexing = 1; in clgen_decode_var()
1006 if (_par->HorizRes <= 800) in clgen_decode_var()
1012 bestclock (freq, &_par->freq, &_par->nom, &_par->den, &_par->div, in clgen_decode_var()
1014 _par->mclk = clgen_get_mclk (freq, _par->var.bits_per_pixel, &_par->divMCLK); in clgen_decode_var()
1016 xres = _par->var.xres; in clgen_decode_var()
1017 hfront = _par->var.right_margin; in clgen_decode_var()
1018 hsync = _par->var.hsync_len; in clgen_decode_var()
1019 hback = _par->var.left_margin; in clgen_decode_var()
1021 yres = _par->var.yres; in clgen_decode_var()
1022 vfront = _par->var.lower_margin; in clgen_decode_var()
1023 vsync = _par->var.vsync_len; in clgen_decode_var()
1024 vback = _par->var.upper_margin; in clgen_decode_var()
1026 if (_par->var.vmode & FB_VMODE_DOUBLE) { in clgen_decode_var()
1031 } else if (_par->var.vmode & FB_VMODE_INTERLACED) { in clgen_decode_var()
1037 _par->HorizRes = xres; in clgen_decode_var()
1038 _par->HorizTotal = (xres + hfront + hsync + hback) / 8 - 5; in clgen_decode_var()
1039 _par->HorizDispEnd = xres / 8 - 1; in clgen_decode_var()
1040 _par->HorizBlankStart = xres / 8; in clgen_decode_var()
1041 _par->HorizBlankEnd = _par->HorizTotal + 5; /* does not count with "-5" */ in clgen_decode_var()
1042 _par->HorizSyncStart = (xres + hfront) / 8 + 1; in clgen_decode_var()
1043 _par->HorizSyncEnd = (xres + hfront + hsync) / 8 + 1; in clgen_decode_var()
1045 _par->VertRes = yres; in clgen_decode_var()
1046 _par->VertTotal = yres + vfront + vsync + vback - 2; in clgen_decode_var()
1047 _par->VertDispEnd = yres - 1; in clgen_decode_var()
1048 _par->VertBlankStart = yres; in clgen_decode_var()
1049 _par->VertBlankEnd = _par->VertTotal; in clgen_decode_var()
1050 _par->VertSyncStart = yres + vfront - 1; in clgen_decode_var()
1051 _par->VertSyncEnd = yres + vfront + vsync - 1; in clgen_decode_var()
1053 if (_par->VertRes >= 1024) { in clgen_decode_var()
1054 _par->VertTotal /= 2; in clgen_decode_var()
1055 _par->VertSyncStart /= 2; in clgen_decode_var()
1056 _par->VertSyncEnd /= 2; in clgen_decode_var()
1057 _par->VertDispEnd /= 2; in clgen_decode_var()
1059 if (_par->multiplexing) { in clgen_decode_var()
1060 _par->HorizTotal /= 2; in clgen_decode_var()
1061 _par->HorizSyncStart /= 2; in clgen_decode_var()
1062 _par->HorizSyncEnd /= 2; in clgen_decode_var()
1063 _par->HorizDispEnd /= 2; in clgen_decode_var()
1065 if (_par->VertRes >= 1280) { in clgen_decode_var()
1089 struct clgenfb_par *_par = (struct clgenfb_par *) par; in clgen_get_par() local
1094 *_par = _info->currentmode; in clgen_get_par()
1127 struct clgenfb_par *_par = (struct clgenfb_par *) par; in clgen_set_par() local
1133 _par->var.xres, _par->var.yres, _par->var.bits_per_pixel); in clgen_set_par()
1134 DPRINTK ("pixclock: %d\n", _par->var.pixclock); in clgen_set_par()
1143 DPRINTK ("CRT0: %ld\n", _par->HorizTotal); in clgen_set_par()
1144 vga_wcrt (fb_info->regs, VGA_CRTC_H_TOTAL, _par->HorizTotal); in clgen_set_par()
1146 DPRINTK ("CRT1: %ld\n", _par->HorizDispEnd); in clgen_set_par()
1147 vga_wcrt (fb_info->regs, VGA_CRTC_H_DISP, _par->HorizDispEnd); in clgen_set_par()
1149 DPRINTK ("CRT2: %ld\n", _par->HorizBlankStart); in clgen_set_par()
1150 vga_wcrt (fb_info->regs, VGA_CRTC_H_BLANK_START, _par->HorizBlankStart); in clgen_set_par()
1152 DPRINTK ("CRT3: 128+%ld\n", _par->HorizBlankEnd % 32); /* + 128: Compatible read */ in clgen_set_par()
1153 vga_wcrt (fb_info->regs, VGA_CRTC_H_BLANK_END, 128 + (_par->HorizBlankEnd % 32)); in clgen_set_par()
1155 DPRINTK ("CRT4: %ld\n", _par->HorizSyncStart); in clgen_set_par()
1156 vga_wcrt (fb_info->regs, VGA_CRTC_H_SYNC_START, _par->HorizSyncStart); in clgen_set_par()
1158 tmp = _par->HorizSyncEnd % 32; in clgen_set_par()
1159 if (_par->HorizBlankEnd & 32) in clgen_set_par()
1164 DPRINTK ("CRT6: %ld\n", _par->VertTotal & 0xff); in clgen_set_par()
1165 vga_wcrt (fb_info->regs, VGA_CRTC_V_TOTAL, (_par->VertTotal & 0xff)); in clgen_set_par()
1168 if (_par->VertTotal & 256) in clgen_set_par()
1170 if (_par->VertDispEnd & 256) in clgen_set_par()
1172 if (_par->VertSyncStart & 256) in clgen_set_par()
1174 if (_par->VertBlankStart & 256) in clgen_set_par()
1176 if (_par->VertTotal & 512) in clgen_set_par()
1178 if (_par->VertDispEnd & 512) in clgen_set_par()
1180 if (_par->VertSyncStart & 512) in clgen_set_par()
1186 if (_par->VertBlankStart & 512) in clgen_set_par()
1188 if (_par->var.vmode & FB_VMODE_DOUBLE) in clgen_set_par()
1193 DPRINTK ("CRT10: %ld\n", _par->VertSyncStart & 0xff); in clgen_set_par()
1194 vga_wcrt (fb_info->regs, VGA_CRTC_V_SYNC_START, (_par->VertSyncStart & 0xff)); in clgen_set_par()
1196 DPRINTK ("CRT11: 64+32+%ld\n", _par->VertSyncEnd % 16); in clgen_set_par()
1197 vga_wcrt (fb_info->regs, VGA_CRTC_V_SYNC_END, (_par->VertSyncEnd % 16 + 64 + 32)); in clgen_set_par()
1199 DPRINTK ("CRT12: %ld\n", _par->VertDispEnd & 0xff); in clgen_set_par()
1200 vga_wcrt (fb_info->regs, VGA_CRTC_V_DISP_END, (_par->VertDispEnd & 0xff)); in clgen_set_par()
1202 DPRINTK ("CRT15: %ld\n", _par->VertBlankStart & 0xff); in clgen_set_par()
1203 vga_wcrt (fb_info->regs, VGA_CRTC_V_BLANK_START, (_par->VertBlankStart & 0xff)); in clgen_set_par()
1205 DPRINTK ("CRT16: %ld\n", _par->VertBlankEnd & 0xff); in clgen_set_par()
1206 vga_wcrt (fb_info->regs, VGA_CRTC_V_BLANK_END, (_par->VertBlankEnd & 0xff)); in clgen_set_par()
1212 if (_par->var.vmode & FB_VMODE_INTERLACED) in clgen_set_par()
1214 if (_par->HorizBlankEnd & 64) in clgen_set_par()
1216 if (_par->HorizBlankEnd & 128) in clgen_set_par()
1218 if (_par->VertBlankEnd & 256) in clgen_set_par()
1220 if (_par->VertBlankEnd & 512) in clgen_set_par()
1231 vga_wseq (fb_info->regs, CL_SEQRB, _par->nom); in clgen_set_par()
1232 tmp = _par->den << 1; in clgen_set_par()
1233 if (_par->div != 0) in clgen_set_par()
1244 if (_par->VertRes >= 1024) in clgen_set_par()
1256 if (_par->var.vmode & FB_VMODE_INTERLACED) in clgen_set_par()
1257 vga_wcrt (fb_info->regs, VGA_CRTC_REGS, _par->HorizTotal / 2); in clgen_set_par()
1265 if (_par->var.sync & FB_SYNC_HOR_HIGH_ACT) in clgen_set_par()
1267 if (_par->var.sync & FB_SYNC_VERT_HIGH_ACT) in clgen_set_par()
1282 if (_par->var.bits_per_pixel == 1) { in clgen_set_par()
1297 _par->multiplexing ? in clgen_set_par()
1354 if (_par->multiplexing) in clgen_set_par()
1360 offset = _par->var.xres_virtual / 16; in clgen_set_par()
1369 else if (_par->var.bits_per_pixel == 8) { in clgen_set_par()
1381 _par->multiplexing ? in clgen_set_par()
1425 clgen_set_mclk (fb_info, _par->mclk, _par->divMCLK); in clgen_set_par()
1442 if (_par->multiplexing) in clgen_set_par()
1448 offset = _par->var.xres_virtual / 8; in clgen_set_par()
1457 else if (_par->var.bits_per_pixel == 16) { in clgen_set_par()
1496 if (_par->HorizRes >= 1024) in clgen_set_par()
1501 clgen_set_mclk (fb_info, _par->mclk, _par->divMCLK); in clgen_set_par()
1531 offset = _par->var.xres_virtual / 4; in clgen_set_par()
1540 else if (_par->var.bits_per_pixel == 32) { in clgen_set_par()
1574 clgen_set_mclk (fb_info, _par->mclk, _par->divMCLK); in clgen_set_par()
1599 offset = _par->var.xres_virtual / 4; in clgen_set_par()
1610 _par->var.bits_per_pixel); in clgen_set_par()
1668 fb_info->currentmode = *_par; in clgen_set_par()
1670 DPRINTK ("virtual offset: (%d,%d)\n", _par->var.xoffset, _par->var.yoffset); in clgen_set_par()
2192 struct clgenfb_par *_par = (struct clgenfb_par *) par; in clgen_set_disp() local
2198 assert (_par != NULL); in clgen_set_disp()
2201 accel_text = _par->var.accel_flags & FB_ACCELF_TEXT; in clgen_set_disp()
2205 switch (_par->var.bits_per_pixel) { in clgen_set_disp()