Lines Matching defs:par

321  *                   struct atafb_par *par)
323 * values in the 'par' structure.
327 * struct atafb_par *par)
335 * struct atafb_par *par);
336 * Fill the 'var' structure based on the values in 'par' and maybe
339 * void (*get_par)(struct atafb_par *par)
340 * Fill the hardware's 'par' structure.
343 * void (*set_par)(struct atafb_par *par)
344 * Set the hardware according to 'par'.
362 struct atafb_par *par);
364 struct atafb_par *par);
366 struct atafb_par *par);
367 void (*get_par)(struct atafb_par *par);
368 void (*set_par)(struct atafb_par *par);
566 static int tt_encode_fix(struct fb_fix_screeninfo *fix, struct atafb_par *par)
576 mode = par->hw.tt.mode & TT_SHIFTER_MODEMASK;
586 fix->line_length = par->next_line;
591 static int tt_decode_var(struct fb_var_screeninfo *var, struct atafb_par *par)
602 par->hw.tt.mode = TT_SHIFTER_TTHIGH;
612 par->hw.tt.mode = TT_SHIFTER_TTLOW;
620 par->hw.tt.mode = TT_SHIFTER_TTMID;
625 par->hw.tt.mode = TT_SHIFTER_STLOW;
633 par->hw.tt.mode = TT_SHIFTER_STMID;
640 par->hw.tt.mode = TT_SHIFTER_STHIGH;
651 par->hw.tt.sync = 0;
653 par->hw.tt.sync = 1;
661 par->yres_virtual = yres_virtual;
662 par->screen_base = screen_base + var->yoffset * linelen;
663 par->next_line = linelen;
667 static int tt_encode_var(struct fb_var_screeninfo *var, struct atafb_par *par)
687 if (par->hw.tt.sync & 1)
692 switch (par->hw.tt.mode & TT_SHIFTER_MODEMASK) {
739 if (par->yres_virtual)
740 var->yres_virtual = par->yres_virtual;
752 var->yoffset = (par->screen_base - screen_base) / linelen;
761 static void tt_get_par(struct atafb_par *par)
764 par->hw.tt.mode = shifter_tt.tt_shiftmode;
765 par->hw.tt.sync = shifter_st.syncmode;
769 par->screen_base = atari_stram_to_virt(addr);
772 static void tt_set_par(struct atafb_par *par)
774 shifter_tt.tt_shiftmode = par->hw.tt.mode;
775 shifter_st.syncmode = par->hw.tt.sync;
777 if (current_par.screen_base != par->screen_base)
778 fbhw->set_screen_base(par->screen_base);
799 struct atafb_par par;
815 tt_get_par(&par);
816 tt_encode_var(&atafb_predefined[0], &par);
864 struct atafb_par *par)
875 if (par->hw.falcon.mono) {
880 } else if (par->hw.falcon.f_shift & 0x100) {
887 fix->line_length = par->next_line;
893 struct atafb_par *par)
944 par->hw.falcon.f_shift = 0x400;
945 par->hw.falcon.st_shift = 0x200;
948 par->hw.falcon.f_shift = 0x000;
949 par->hw.falcon.st_shift = 0x100;
952 par->hw.falcon.f_shift = 0x000;
953 par->hw.falcon.st_shift = 0x000;
956 par->hw.falcon.f_shift = 0x010;
959 par->hw.falcon.f_shift = 0x100; /* hicolor, no overlay */
962 par->hw.falcon.bpp = bpp;
972 fbhw->get_par(par); /* Current par will be new par */
989 par->hw.falcon.ste_mode = bpp == 2;
990 par->hw.falcon.mono = bpp == 1;
1000 if (par->hw.falcon.ste_mode)
1027 par->hw.falcon.line_width = bpp * xres / 16;
1028 par->hw.falcon.line_offset = bpp * (xres_virtual - xres) / 16;
1040 par->hw.falcon.ste_mode = 1;
1041 par->hw.falcon.f_shift = 0x000;
1042 par->hw.falcon.st_shift = 0x200;
1177 par->hw.falcon.vid_control = mon_type | f030_bus_width;
1179 par->hw.falcon.vid_control |= VCO_SHORTOFFS; /* base_offset 64 */
1181 par->hw.falcon.vid_control |= VCO_HSYPOS;
1183 par->hw.falcon.vid_control |= VCO_VSYPOS;
1185 par->hw.falcon.vid_control |= pclock->control_mask;
1187 par->hw.falcon.sync = pclock->sync_mask | 0x2;
1189 par->hw.falcon.vid_mode = (2 / plen) << 2;
1191 par->hw.falcon.vid_mode |= VMO_DOUBLE;
1193 par->hw.falcon.vid_mode |= VMO_INTER;
1217 prescale = hxx_prescale(&par->hw.falcon);
1218 base_off = par->hw.falcon.vid_control & VCO_SHORTOFFS ? 64 : 128;
1224 if (par->hw.falcon.f_shift & 0x100) {
1231 if (par->hw.falcon.ste_mode)
1242 par->HHT = plen * (left_margin + xres + right_margin) /
1244 /* par->HHT = (gend2 + plen * right_margin / prescale) / 2 - 2;*/
1246 par->HDB = gstart - hdb_off / prescale;
1247 par->HBE = gstart;
1248 if (par->HDB < 0)
1249 par->HDB += par->HHT + 2 + 0x200;
1250 par->HDE = gend1 - par->HHT - 2 - hde_off / prescale;
1251 par->HBB = gend2 - par->HHT - 2;
1254 if ((par->HDB & 0x200) && (par->HDB & ~0x200) - par->HDE <= 5) {
1259 par->HBB++; /* compensate for non matching hde and hbb */
1260 par->HSS = par->HHT + 2 - plen * hsync_len / prescale;
1261 if (par->HSS < par->HBB)
1262 par->HSS = par->HBB;
1266 hfreq = pclock->f / ((par->HHT + 2) * prescale * 2);
1284 par->VBE = (upper_margin * 2 + 1); /* must begin on odd halfline */
1285 par->VDB = par->VBE;
1286 par->VDE = yres;
1288 par->VDE <<= 1;
1290 par->VDE <<= 1; /* VDE now half lines per (half-)frame */
1291 par->VDE += par->VDB;
1292 par->VBB = par->VDE;
1293 par->VFT = par->VBB + (lower_margin * 2 - 1) - 1;
1294 par->VSS = par->VFT + 1 - (vsync_len * 2 - 1);
1297 par->VBB++;
1298 par->VSS++;
1299 par->VFT++;
1304 vfreq = (hfreq * 2) / (par->VFT + 1);
1318 (hfreq * 2) / (par->VFT + 1 + 4 * lines - 2 * yres) >
1329 (hfreq * 2) / (par->VFT + 1 + 4 * lines) >
1340 (hfreq * 2) / (par->VFT + 1 + 4 * lines) >
1359 par->yres_virtual = yres_virtual;
1360 par->screen_base = screen_base + var->yoffset * linelen;
1361 par->hw.falcon.xoffset = 0;
1363 par->next_line = linelen;
1369 struct atafb_par *par)
1375 struct falcon_hw *hw = &par->hw.falcon;
1459 if (par->yres_virtual)
1460 var->yres_virtual = par->yres_virtual;
1522 var->yoffset = (par->screen_base - screen_base) / linelen;
1534 static void falcon_get_par(struct atafb_par *par)
1537 struct falcon_hw *hw = &par->hw.falcon;
1563 par->screen_base = atari_stram_to_virt(addr);
1571 static void falcon_set_par(struct atafb_par *par)
1576 if (current_par.screen_base != par->screen_base)
1577 fbhw->set_screen_base(par->screen_base);
1589 f_new_mode = par->hw.falcon;
1654 struct atafb_par *par = (struct atafb_par *)info->par;
1662 par->hw.falcon.xoffset = var->xoffset & 15;
1664 par->hw.falcon.xoffset = 0;
1667 par->hw.falcon.line_offset = bpp *
1669 if (par->hw.falcon.xoffset)
1670 par->hw.falcon.line_offset -= bpp;
1671 xoffset = var->xoffset - par->hw.falcon.xoffset;
1673 par->screen_base = screen_base +
1676 fbhw->set_screen_base(par->screen_base);
1744 struct atafb_par par;
1774 falcon_get_par(&par);
1775 falcon_encode_var(&atafb_predefined[0], &par);
1788 struct atafb_par *par)
1798 mode = par->hw.st.mode & 3;
1812 fix->line_length = par->next_line;
1818 struct atafb_par *par)
1829 par->hw.st.mode = ST_HIGH;
1839 par->hw.st.mode = ST_LOW;
1846 par->hw.st.mode = ST_MID;
1858 par->hw.st.sync = (par->hw.st.sync & ~1) | 1;
1860 par->hw.st.sync = (par->hw.st.sync & ~1);
1868 par->yres_virtual = yres_virtual;
1869 par->screen_base = screen_base + var->yoffset * linelen;
1870 par->next_line = linelen;
1875 struct atafb_par *par)
1895 if (!(par->hw.st.sync & 1))
1900 switch (par->hw.st.mode & 3) {
1928 if (par->yres_virtual)
1929 var->yres_virtual = par->yres_virtual;
1941 var->yoffset = (par->screen_base - screen_base) / linelen;
1950 static void stste_get_par(struct atafb_par *par)
1953 par->hw.st.mode = shifter_tt.st_shiftmode;
1954 par->hw.st.sync = shifter_st.syncmode;
1959 par->screen_base = atari_stram_to_virt(addr);
1962 static void stste_set_par(struct atafb_par *par)
1964 shifter_tt.st_shiftmode = par->hw.st.mode;
1965 shifter_st.syncmode = par->hw.st.sync;
1967 if (current_par.screen_base != par->screen_base)
1968 fbhw->set_screen_base(par->screen_base);
1995 struct atafb_par par;
2007 stste_get_par(&par);
2008 stste_encode_var(&atafb_predefined[0], &par);
2089 static int ext_encode_fix(struct fb_fix_screeninfo *fix, struct atafb_par *par)
2130 fix->line_length = par->next_line;
2134 static int ext_decode_var(struct fb_var_screeninfo *var, struct atafb_par *par)
2146 par->next_line = external_xres_virtual * external_depth / 8;
2150 static int ext_encode_var(struct fb_var_screeninfo *var, struct atafb_par *par)
2190 static void ext_get_par(struct atafb_par *par)
2192 par->screen_base = external_screen_base;
2195 static void ext_set_par(struct atafb_par *par)
2274 struct atafb_par *par = (struct atafb_par *)info->par;
2280 par->screen_base = screen_base +
2283 fbhw->set_screen_base(par->screen_base);
2340 static void ata_get_par(struct atafb_par *par)
2343 *par = current_par;
2345 fbhw->get_par(par);
2348 static void ata_set_par(struct atafb_par *par)
2350 fbhw->set_par(par);
2351 current_par = *par;
2365 struct atafb_par par;
2367 err = fbhw->decode_var(var, &par);
2372 ata_set_par(&par);
2373 fbhw->encode_var(var, &par);
2383 struct atafb_par par;
2386 err = fbhw->decode_var(&info->var, &par);
2390 err = fbhw->encode_fix(fix, &par);
2396 struct atafb_par par;
2398 ata_get_par(&par);
2399 fbhw->encode_var(var, &par);
2478 struct atafb_par *par = (struct atafb_par *)info->par;
2504 atafb_mfb_fillrect(info, par->next_line, rect->color,
2507 atafb_iplan2p2_fillrect(info, par->next_line, rect->color,
2510 atafb_iplan2p4_fillrect(info, par->next_line, rect->color,
2513 atafb_iplan2p8_fillrect(info, par->next_line, rect->color,
2521 struct atafb_par *par = (struct atafb_par *)info->par;
2562 atafb_mfb_copyarea(info, par->next_line, sy, sx, dy, dx, height, width);
2564 atafb_iplan2p2_copyarea(info, par->next_line, sy, sx, dy, dx, height, width);
2566 atafb_iplan2p4_copyarea(info, par->next_line, sy, sx, dy, dx, height, width);
2568 atafb_iplan2p8_copyarea(info, par->next_line, sy, sx, dy, dx, height, width);
2575 struct atafb_par *par = (struct atafb_par *)info->par;
2608 dst_idx += dy * par->next_line * 8 + dx;
2614 atafb_mfb_linefill(info, par->next_line,
2618 atafb_iplan2p2_linefill(info, par->next_line,
2622 atafb_iplan2p4_linefill(info, par->next_line,
2626 atafb_iplan2p8_linefill(info, par->next_line,
2634 height, par->next_line, image->width,
2696 /* check var by decoding var into hw par, rounding if necessary,
2697 * then encoding hw par back into new, validated var */
2701 struct atafb_par par;
2704 // if ((err = ata_decode_var(var, &par)))
2705 err = fbhw->decode_var(var, &par);
2710 fbhw->encode_var(var, &par);
2714 /* actually set hw par by decoding var, then setting hardware from
2715 * hw par just decoded */
2718 struct atafb_par *par = (struct atafb_par *)info->par;
2721 fbhw->decode_var(&info->var, par);
2723 fbhw->encode_fix(&info->fix, par);
2727 ata_set_par(par);
3173 // reads hw state into current par, which may not be sane yet
3175 fb_info.par = &current_par;