Lines Matching refs:par
1141 struct amifb_par *par);
1143 struct amifb_par *par);
1145 struct amifb_par *par);
1146 static void ami_get_par(struct amifb_par *par);
1149 static void ami_set_par(struct amifb_par *par);
1264 struct amifb_par par; in amifb_get_fix() local
1267 ami_get_par(&par); in amifb_get_fix()
1271 if ((err = ami_decode_var(&fb_display[con].var, &par))) in amifb_get_fix()
1274 return ami_encode_fix(fix, &par); in amifb_get_fix()
1287 struct amifb_par par; in amifb_get_var() local
1289 ami_get_par(&par); in amifb_get_var()
1290 err = ami_encode_var(var, &par); in amifb_get_var()
1305 struct amifb_par par; in amifb_set_var() local
1323 if ((err = ami_decode_var(var, &par))) in amifb_set_var()
1325 ami_encode_var(var, &par); in amifb_set_var()
1338 ami_encode_fix(&fix, &par); in amifb_set_var()
1516 struct amifb_par par; in amifb_ioctl() local
1520 ami_get_par(&par); in amifb_ioctl()
1521 copy_to_user((void *)arg, &par, sizeof(struct amifb_par)); in amifb_ioctl()
1526 struct amifb_par par; in amifb_ioctl() local
1530 copy_from_user(&par, (void *)arg, sizeof(struct amifb_par)); in amifb_ioctl()
1531 ami_set_par(&par); in amifb_ioctl()
1935 struct amifb_par *par) in ami_encode_fix() argument
1943 if (par->bpp == 1) { in ami_encode_fix()
1950 fix->type_aux = par->next_line; in ami_encode_fix()
1955 fix->line_length = div8(upx(16<<maxfmode, par->vxres)); in ami_encode_fix()
1958 if (par->vmode & FB_VMODE_YWRAP) { in ami_encode_fix()
1963 if (par->vmode &= FB_VMODE_SMOOTH_XPAN) in ami_encode_fix()
1979 struct amifb_par *par) in ami_decode_var() argument
1996 par->clk_shift = clk_shift; in ami_decode_var()
2002 if ((par->xres = var->xres) < 64) in ami_decode_var()
2003 par->xres = 64; in ami_decode_var()
2004 if ((par->yres = var->yres) < 64) in ami_decode_var()
2005 par->yres = 64; in ami_decode_var()
2006 if ((par->vxres = var->xres_virtual) < par->xres) in ami_decode_var()
2007 par->vxres = par->xres; in ami_decode_var()
2008 if ((par->vyres = var->yres_virtual) < par->yres) in ami_decode_var()
2009 par->vyres = par->yres; in ami_decode_var()
2011 par->bpp = var->bits_per_pixel; in ami_decode_var()
2013 if (par->bpp < 1) in ami_decode_var()
2014 par->bpp = 1; in ami_decode_var()
2015 if (par->bpp > maxdepth[clk_shift]) { in ami_decode_var()
2017 par->bpp = maxdepth[clk_shift]; in ami_decode_var()
2024 if (par->bpp < 6) in ami_decode_var()
2025 par->bpp = 6; in ami_decode_var()
2026 if (par->bpp != 6) { in ami_decode_var()
2027 if (par->bpp < 8) in ami_decode_var()
2028 par->bpp = 8; in ami_decode_var()
2029 if (par->bpp != 8 || !IS_AGA) { in ami_decode_var()
2044 par->vmode = var->vmode | FB_VMODE_SMOOTH_XPAN; in ami_decode_var()
2045 switch (par->vmode & FB_VMODE_MASK) { in ami_decode_var()
2064 par->line_shift = line_shift; in ami_decode_var()
2070 xres_n = par->xres<<clk_shift; in ami_decode_var()
2071 yres_n = par->yres<<line_shift; in ami_decode_var()
2072 par->htotal = down8((var->left_margin+par->xres+var->right_margin+var->hsync_len)<<clk_shift); in ami_decode_var()
2073 …par->vtotal = down2(((var->upper_margin+par->yres+var->lower_margin+var->vsync_len)<<line_shift)+1… in ami_decode_var()
2076 par->bplcon3 = sprpixmode[clk_shift]; in ami_decode_var()
2078 par->bplcon3 = 0; in ami_decode_var()
2080 par->diwstop_h = par->htotal-((var->right_margin-var->hsync_len)<<clk_shift); in ami_decode_var()
2082 par->diwstop_h += mod4(var->hsync_len); in ami_decode_var()
2084 par->diwstop_h = down4(par->diwstop_h); in ami_decode_var()
2086 par->diwstrt_h = par->diwstop_h - xres_n; in ami_decode_var()
2087 par->diwstop_v = par->vtotal-((var->lower_margin-var->vsync_len)<<line_shift); in ami_decode_var()
2088 par->diwstrt_v = par->diwstop_v - yres_n; in ami_decode_var()
2089 if (par->diwstop_h >= par->htotal+8) { in ami_decode_var()
2093 if (par->diwstop_v > par->vtotal) { in ami_decode_var()
2100 par->hsstrt = 160; in ami_decode_var()
2101 par->hsstop = 320; in ami_decode_var()
2102 par->vsstrt = 30; in ami_decode_var()
2103 par->vsstop = 34; in ami_decode_var()
2105 par->hsstrt = 0; in ami_decode_var()
2106 par->hsstop = 0; in ami_decode_var()
2107 par->vsstrt = 0; in ami_decode_var()
2108 par->vsstop = 0; in ami_decode_var()
2110 if (par->vtotal > (PAL_VTOTAL+NTSC_VTOTAL)/2) { in ami_decode_var()
2112 if (par->htotal != PAL_HTOTAL) { in ami_decode_var()
2116 if (par->diwstrt_h < PAL_DIWSTRT_H) { in ami_decode_var()
2120 if (par->diwstrt_v < PAL_DIWSTRT_V) { in ami_decode_var()
2127 par->beamcon0 = BMC0_PAL; in ami_decode_var()
2128 par->bplcon3 |= BPC3_BRDRBLNK; in ami_decode_var()
2131 par->beamcon0 = BMC0_PAL; in ami_decode_var()
2132 par->hsstop = 1; in ami_decode_var()
2142 if (par->htotal != NTSC_HTOTAL) { in ami_decode_var()
2146 if (par->diwstrt_h < NTSC_DIWSTRT_H) { in ami_decode_var()
2150 if (par->diwstrt_v < NTSC_DIWSTRT_V) { in ami_decode_var()
2157 par->beamcon0 = 0; in ami_decode_var()
2158 par->bplcon3 |= BPC3_BRDRBLNK; in ami_decode_var()
2161 par->beamcon0 = 0; in ami_decode_var()
2162 par->hsstop = 1; in ami_decode_var()
2169 if (par->diwstrt_h >= 1024 || par->diwstop_h < 1024 || in ami_decode_var()
2170 par->diwstrt_v >= 512 || par->diwstop_v < 256) { in ami_decode_var()
2177 par->hsstrt = var->right_margin<<clk_shift; in ami_decode_var()
2178 par->hsstop = (var->right_margin+var->hsync_len)<<clk_shift; in ami_decode_var()
2179 par->diwstop_h = par->htotal - mod8(par->hsstrt) + 8 - (1 << clk_shift); in ami_decode_var()
2181 par->diwstop_h = down4(par->diwstop_h) - 16; in ami_decode_var()
2182 par->diwstrt_h = par->diwstop_h - xres_n; in ami_decode_var()
2183 par->hbstop = par->diwstrt_h + 4; in ami_decode_var()
2184 par->hbstrt = par->diwstop_h + 4; in ami_decode_var()
2185 if (par->hbstrt >= par->htotal + 8) in ami_decode_var()
2186 par->hbstrt -= par->htotal; in ami_decode_var()
2187 par->hcenter = par->hsstrt + (par->htotal >> 1); in ami_decode_var()
2188 par->vsstrt = var->lower_margin<<line_shift; in ami_decode_var()
2189 par->vsstop = (var->lower_margin+var->vsync_len)<<line_shift; in ami_decode_var()
2190 par->diwstop_v = par->vtotal; in ami_decode_var()
2191 if ((par->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) in ami_decode_var()
2192 par->diwstop_v -= 2; in ami_decode_var()
2193 par->diwstrt_v = par->diwstop_v - yres_n; in ami_decode_var()
2194 par->vbstop = par->diwstrt_v - 2; in ami_decode_var()
2195 par->vbstrt = par->diwstop_v - 2; in ami_decode_var()
2196 if (par->vtotal > 2048) { in ami_decode_var()
2200 if (par->htotal > 2048) { in ami_decode_var()
2204 par->bplcon3 |= BPC3_EXTBLKEN; in ami_decode_var()
2205 par->beamcon0 = BMC0_HARDDIS | BMC0_VARVBEN | BMC0_LOLDIS | in ami_decode_var()
2209 par->beamcon0 |= BMC0_HSYTRUE; in ami_decode_var()
2211 par->beamcon0 |= BMC0_VSYTRUE; in ami_decode_var()
2213 par->beamcon0 |= BMC0_CSYTRUE; in ami_decode_var()
2214 htotal = par->htotal>>clk_shift; in ami_decode_var()
2215 vtotal = par->vtotal>>1; in ami_decode_var()
2234 fstrt = downx(fconst, par->diwstrt_h-4) - fsize; in ami_decode_var()
2244 fstrt = downx(fconst, par->diwstrt_h-fconst+(1<<clk_shift)-4) - fsize; in ami_decode_var()
2246 par->vmode &= ~FB_VMODE_SMOOTH_XPAN; in ami_decode_var()
2248 maxfetchstop = down16(par->htotal - 80); in ami_decode_var()
2250 fstrt = downx(fconst, par->diwstrt_h-4) - 64 - fconst; in ami_decode_var()
2251 fsize = upx(fconst, xres_n + modx(fconst, downx(1<<clk_shift, par->diwstrt_h-4))); in ami_decode_var()
2253 par->vmode &= ~FB_VMODE_SMOOTH_XPAN; in ami_decode_var()
2264 par->vmode &= ~FB_VMODE_SMOOTH_XPAN; in ami_decode_var()
2280 if (par->htotal-fsize-64 < par->bpp*64) in ami_decode_var()
2281 par->vmode &= ~FB_VMODE_YWRAP; in ami_decode_var()
2288 par->next_plane = div8(upx(16<<maxfmode, par->vxres)); in ami_decode_var()
2289 par->next_line = par->bpp*par->next_plane; in ami_decode_var()
2290 if (par->next_line * par->vyres > videomemorysize) { in ami_decode_var()
2295 par->next_line = div8(upx(16<<maxfmode, par->vxres)); in ami_decode_var()
2296 par->next_plane = par->vyres*par->next_line; in ami_decode_var()
2297 if (par->next_plane * par->bpp > videomemorysize) { in ami_decode_var()
2307 par->bplcon0 = BPC0_COLOR | bplpixmode[clk_shift]; in ami_decode_var()
2309 par->bplcon0 |= BPC0_ECSENA; in ami_decode_var()
2310 if (par->bpp == 8) in ami_decode_var()
2311 par->bplcon0 |= BPC0_BPU3; in ami_decode_var()
2313 par->bplcon0 |= par->bpp<<12; in ami_decode_var()
2315 par->bplcon0 |= BPC0_HAM; in ami_decode_var()
2317 par->bplcon0 |= BPC0_ERSY; in ami_decode_var()
2320 par->fmode = bplfetchmode[maxfmode]; in ami_decode_var()
2322 switch (par->vmode & FB_VMODE_MASK) { in ami_decode_var()
2324 par->bplcon0 |= BPC0_LACE; in ami_decode_var()
2328 par->fmode |= FMODE_SSCAN2 | FMODE_BSCAN2; in ami_decode_var()
2332 if (!((par->vmode ^ var->vmode) & FB_VMODE_YWRAP)) { in ami_decode_var()
2333 par->xoffset = var->xoffset; in ami_decode_var()
2334 par->yoffset = var->yoffset; in ami_decode_var()
2335 if (par->vmode & FB_VMODE_YWRAP) { in ami_decode_var()
2336 if (par->xoffset || par->yoffset < 0 || par->yoffset >= par->vyres) in ami_decode_var()
2337 par->xoffset = par->yoffset = 0; in ami_decode_var()
2339 if (par->xoffset < 0 || par->xoffset > upx(16<<maxfmode, par->vxres-par->xres) || in ami_decode_var()
2340 par->yoffset < 0 || par->yoffset > par->vyres-par->yres) in ami_decode_var()
2341 par->xoffset = par->yoffset = 0; in ami_decode_var()
2344 par->xoffset = par->yoffset = 0; in ami_decode_var()
2346 par->crsr.crsr_x = par->crsr.crsr_y = 0; in ami_decode_var()
2347 par->crsr.spot_x = par->crsr.spot_y = 0; in ami_decode_var()
2348 par->crsr.height = par->crsr.width = 0; in ami_decode_var()
2367 struct amifb_par *par) in ami_encode_var() argument
2373 clk_shift = par->clk_shift; in ami_encode_var()
2374 line_shift = par->line_shift; in ami_encode_var()
2376 var->xres = par->xres; in ami_encode_var()
2377 var->yres = par->yres; in ami_encode_var()
2378 var->xres_virtual = par->vxres; in ami_encode_var()
2379 var->yres_virtual = par->vyres; in ami_encode_var()
2380 var->xoffset = par->xoffset; in ami_encode_var()
2381 var->yoffset = par->yoffset; in ami_encode_var()
2383 var->bits_per_pixel = par->bpp; in ami_encode_var()
2406 if (par->bplcon0 & BPC0_HAM) in ami_encode_var()
2417 if (IS_AGA && par->fmode & FMODE_BSCAN2) in ami_encode_var()
2419 else if (par->bplcon0 & BPC0_LACE) in ami_encode_var()
2424 if (!IS_OCS && par->beamcon0 & BMC0_VARBEAMEN) { in ami_encode_var()
2425 var->hsync_len = (par->hsstop-par->hsstrt)>>clk_shift; in ami_encode_var()
2426 var->right_margin = par->hsstrt>>clk_shift; in ami_encode_var()
2427 var->left_margin = (par->htotal>>clk_shift) - var->xres - var->right_margin - var->hsync_len; in ami_encode_var()
2428 var->vsync_len = (par->vsstop-par->vsstrt)>>line_shift; in ami_encode_var()
2429 var->lower_margin = par->vsstrt>>line_shift; in ami_encode_var()
2430 var->upper_margin = (par->vtotal>>line_shift) - var->yres - var->lower_margin - var->vsync_len; in ami_encode_var()
2432 if (par->beamcon0 & BMC0_HSYTRUE) in ami_encode_var()
2434 if (par->beamcon0 & BMC0_VSYTRUE) in ami_encode_var()
2436 if (par->beamcon0 & BMC0_CSYTRUE) in ami_encode_var()
2440 var->hsync_len = (152>>clk_shift) + mod4(par->diwstop_h); in ami_encode_var()
2441 var->right_margin = ((par->htotal - down4(par->diwstop_h))>>clk_shift) + var->hsync_len; in ami_encode_var()
2442 var->left_margin = (par->htotal>>clk_shift) - var->xres - var->right_margin - var->hsync_len; in ami_encode_var()
2444 var->lower_margin = ((par->vtotal - par->diwstop_v)>>line_shift) + var->vsync_len; in ami_encode_var()
2445 var->upper_margin = (((par->vtotal - 2)>>line_shift) + 1) - var->yres - in ami_encode_var()
2449 if (par->bplcon0 & BPC0_ERSY) in ami_encode_var()
2451 if (par->vmode & FB_VMODE_YWRAP) in ami_encode_var()
2461 static void ami_get_par(struct amifb_par *par) in ami_get_par() argument
2463 *par = currentpar; in ami_get_par()
2480 static void ami_set_par(struct amifb_par *par) in ami_set_par() argument
2484 currentpar = *par; in ami_set_par()
2499 struct amifb_par *par = ¤tpar; in ami_pan_var() local
2501 par->xoffset = var->xoffset; in ami_pan_var()
2502 par->yoffset = var->yoffset; in ami_pan_var()
2504 par->vmode |= FB_VMODE_YWRAP; in ami_pan_var()
2506 par->vmode &= ~FB_VMODE_YWRAP; in ami_pan_var()
2519 struct amifb_par *par = ¤tpar; in ami_update_par() local
2522 clk_shift = par->clk_shift; in ami_update_par()
2524 if (!(par->vmode & FB_VMODE_SMOOTH_XPAN)) in ami_update_par()
2525 par->xoffset = upx(16<<maxfmode, par->xoffset); in ami_update_par()
2528 vshift = modx(16<<maxfmode, par->xoffset); in ami_update_par()
2529 fstrt = par->diwstrt_h - (vshift<<clk_shift) - 4; in ami_update_par()
2530 fsize = (par->xres+vshift)<<clk_shift; in ami_update_par()
2532 move = downx(2<<maxfmode, div8(par->xoffset)); in ami_update_par()
2548 mod = par->next_line - div8(fsize>>clk_shift); in ami_update_par()
2549 par->ddfstrt = fstrt; in ami_update_par()
2550 par->ddfstop = fstop; in ami_update_par()
2551 par->bplcon1 = hscroll2hw(shift); in ami_update_par()
2552 par->bpl2mod = mod; in ami_update_par()
2553 if (par->bplcon0 & BPC0_LACE) in ami_update_par()
2554 par->bpl2mod += par->next_line; in ami_update_par()
2555 if (IS_AGA && (par->fmode & FMODE_BSCAN2)) in ami_update_par()
2556 par->bpl1mod = -div8(fsize>>clk_shift); in ami_update_par()
2558 par->bpl1mod = par->bpl2mod; in ami_update_par()
2560 if (par->yoffset) { in ami_update_par()
2561 par->bplpt0 = videomemory_phys + par->next_line*par->yoffset + move; in ami_update_par()
2562 if (par->vmode & FB_VMODE_YWRAP) { in ami_update_par()
2563 if (par->yoffset > par->vyres-par->yres) { in ami_update_par()
2564 par->bplpt0wrap = videomemory_phys + move; in ami_update_par()
2565 if (par->bplcon0 & BPC0_LACE && mod2(par->diwstrt_v+par->vyres-par->yoffset)) in ami_update_par()
2566 par->bplpt0wrap += par->next_line; in ami_update_par()
2570 par->bplpt0 = videomemory_phys + move; in ami_update_par()
2572 if (par->bplcon0 & BPC0_LACE && mod2(par->diwstrt_v)) in ami_update_par()
2573 par->bplpt0 += par->next_line; in ami_update_par()
2689 struct amifb_par *par = ¤tpar; in ami_update_display() local
2691 custom.bplcon1 = par->bplcon1; in ami_update_display()
2692 custom.bpl1mod = par->bpl1mod; in ami_update_display()
2693 custom.bpl2mod = par->bpl2mod; in ami_update_display()
2694 custom.ddfstrt = ddfstrt2hw(par->ddfstrt); in ami_update_display()
2695 custom.ddfstop = ddfstop2hw(par->ddfstop); in ami_update_display()
2704 struct amifb_par *par = ¤tpar; in ami_init_display() local
2706 custom.bplcon0 = par->bplcon0 & ~BPC0_LACE; in ami_init_display()
2709 custom.bplcon3 = par->bplcon3; in ami_init_display()
2712 if (par->beamcon0 & BMC0_VARBEAMEN) { in ami_init_display()
2713 custom.htotal = htotal2hw(par->htotal); in ami_init_display()
2714 custom.hbstrt = hbstrt2hw(par->hbstrt); in ami_init_display()
2715 custom.hbstop = hbstop2hw(par->hbstop); in ami_init_display()
2716 custom.hsstrt = hsstrt2hw(par->hsstrt); in ami_init_display()
2717 custom.hsstop = hsstop2hw(par->hsstop); in ami_init_display()
2718 custom.hcenter = hcenter2hw(par->hcenter); in ami_init_display()
2719 custom.vtotal = vtotal2hw(par->vtotal); in ami_init_display()
2720 custom.vbstrt = vbstrt2hw(par->vbstrt); in ami_init_display()
2721 custom.vbstop = vbstop2hw(par->vbstop); in ami_init_display()
2722 custom.vsstrt = vsstrt2hw(par->vsstrt); in ami_init_display()
2723 custom.vsstop = vsstop2hw(par->vsstop); in ami_init_display()
2726 if (!IS_OCS || par->hsstop) in ami_init_display()
2727 custom.beamcon0 = par->beamcon0; in ami_init_display()
2729 custom.fmode = par->fmode; in ami_init_display()
2735 amiga_audio_min_period = div16(par->htotal); in ami_init_display()
2737 is_lace = par->bplcon0 & BPC0_LACE ? 1 : 0; in ami_init_display()
2760 struct amifb_par *par = ¤tpar; in ami_do_blank() local
2762 u_short bplcon3 = par->bplcon3; in ami_do_blank()
2772 custom.hsstrt = hsstrt2hw(par->hsstrt); in ami_do_blank()
2773 custom.hsstop = hsstop2hw(par->hsstop); in ami_do_blank()
2774 custom.vsstrt = vsstrt2hw(par->vtotal+4); in ami_do_blank()
2775 custom.vsstop = vsstop2hw(par->vtotal+4); in ami_do_blank()
2778 custom.hsstrt = hsstrt2hw(par->htotal+16); in ami_do_blank()
2779 custom.hsstop = hsstop2hw(par->htotal+16); in ami_do_blank()
2780 custom.vsstrt = vsstrt2hw(par->vsstrt); in ami_do_blank()
2781 custom.vsstop = vsstrt2hw(par->vsstop); in ami_do_blank()
2784 custom.hsstrt = hsstrt2hw(par->htotal+16); in ami_do_blank()
2785 custom.hsstop = hsstop2hw(par->htotal+16); in ami_do_blank()
2786 custom.vsstrt = vsstrt2hw(par->vtotal+4); in ami_do_blank()
2787 custom.vsstop = vsstop2hw(par->vtotal+4); in ami_do_blank()
2790 if (!(par->beamcon0 & BMC0_VARBEAMEN)) { in ami_do_blank()
2791 custom.htotal = htotal2hw(par->htotal); in ami_do_blank()
2792 custom.vtotal = vtotal2hw(par->vtotal); in ami_do_blank()
2803 custom.hsstrt = hsstrt2hw(par->hsstrt); in ami_do_blank()
2804 custom.hsstop = hsstop2hw(par->hsstop); in ami_do_blank()
2805 custom.vsstrt = vsstrt2hw(par->vsstrt); in ami_do_blank()
2806 custom.vsstop = vsstop2hw(par->vsstop); in ami_do_blank()
2807 custom.beamcon0 = par->beamcon0; in ami_do_blank()
2820 if (par->bplcon0 & BPC0_SHRES) { in ami_do_blank()
2843 struct amifb_par *par = ¤tpar; in ami_get_fix_cursorinfo() local
2845 fix->crsr_width = fix->crsr_xsize = par->crsr.width; in ami_get_fix_cursorinfo()
2846 fix->crsr_height = fix->crsr_ysize = par->crsr.height; in ami_get_fix_cursorinfo()
2854 struct amifb_par *par = ¤tpar; in ami_get_var_cursorinfo() local
2866 size = par->crsr.height*par->crsr.width; in ami_get_var_cursorinfo()
2868 var->height = par->crsr.height; in ami_get_var_cursorinfo()
2869 var->width = par->crsr.width; in ami_get_var_cursorinfo()
2870 var->xspot = par->crsr.spot_x; in ami_get_var_cursorinfo()
2871 var->yspot = par->crsr.spot_y; in ami_get_var_cursorinfo()
2876 delta = 1<<par->crsr.fmode; in ami_get_var_cursorinfo()
2878 if (par->bplcon0 & BPC0_LACE) in ami_get_var_cursorinfo()
2929 struct amifb_par *par = ¤tpar; in ami_set_var_cursorinfo() local
2960 if (par->bplcon0 & BPC0_LACE) { in ami_set_var_cursorinfo()
3033 par->crsr.height = var->height; in ami_set_var_cursorinfo()
3034 par->crsr.width = var->width; in ami_set_var_cursorinfo()
3035 par->crsr.spot_x = var->xspot; in ami_set_var_cursorinfo()
3036 par->crsr.spot_y = var->yspot; in ami_set_var_cursorinfo()
3037 par->crsr.fmode = fmode; in ami_set_var_cursorinfo()
3039 par->fmode &= ~(FMODE_SPAGEM | FMODE_SPR32); in ami_set_var_cursorinfo()
3040 par->fmode |= sprfetchmode[fmode]; in ami_set_var_cursorinfo()
3041 custom.fmode = par->fmode; in ami_set_var_cursorinfo()
3048 struct amifb_par *par = ¤tpar; in ami_get_cursorstate() local
3050 state->xoffset = par->crsr.crsr_x; in ami_get_cursorstate()
3051 state->yoffset = par->crsr.crsr_y; in ami_get_cursorstate()
3058 struct amifb_par *par = ¤tpar; in ami_set_cursorstate() local
3060 par->crsr.crsr_x = state->xoffset; in ami_set_cursorstate()
3061 par->crsr.crsr_y = state->yoffset; in ami_set_cursorstate()
3070 struct amifb_par *par = ¤tpar; in ami_set_sprite() local
3079 mx = par->crsr.crsr_x-par->crsr.spot_x; in ami_set_sprite()
3080 my = par->crsr.crsr_y-par->crsr.spot_y; in ami_set_sprite()
3081 if (!(par->vmode & FB_VMODE_YWRAP)) { in ami_set_sprite()
3082 mx -= par->xoffset; in ami_set_sprite()
3083 my -= par->yoffset; in ami_set_sprite()
3085 if (!is_blanked && cursorstate > 0 && par->crsr.height > 0 && in ami_set_sprite()
3086 mx > -(short)par->crsr.width && mx < par->xres && in ami_set_sprite()
3087 my > -(short)par->crsr.height && my < par->yres) { in ami_set_sprite()
3089 hs = par->diwstrt_h + (mx<<par->clk_shift) - 4; in ami_set_sprite()
3090 vs = par->diwstrt_v + (my<<par->line_shift); in ami_set_sprite()
3091 ve = vs + (par->crsr.height<<par->line_shift); in ami_set_sprite()
3092 if (par->bplcon0 & BPC0_LACE) { in ami_set_sprite()
3097 lofsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs, hs, ve); in ami_set_sprite()
3098 shfsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs+1, hs, ve+1); in ami_set_sprite()
3101 lofsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs, hs, ve+1); in ami_set_sprite()
3102 shfsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs+1, hs, ve); in ami_set_sprite()
3105 lofsprite[0] = spr2hw_pos(vs, hs) | (IS_AGA && (par->fmode & FMODE_BSCAN2) ? 0x80 : 0); in ami_set_sprite()
3106 lofsprite[1<<par->crsr.fmode] = spr2hw_ctl(vs, hs, ve); in ami_set_sprite()
3111 if (par->bplcon0 & BPC0_LACE) { in ami_set_sprite()
3153 struct amifb_par *par = ¤tpar; in ami_reinit_copper() local
3155 …copdisplay.init[cip_bplcon0].w[1] = ~(BPC0_BPU3 | BPC0_BPU2 | BPC0_BPU1 | BPC0_BPU0) & par->bplcon… in ami_reinit_copper()
3156 copdisplay.wait->l = CWAIT(32, par->diwstrt_v-4); in ami_reinit_copper()
3165 struct amifb_par *par = ¤tpar; in ami_build_copper() local
3174 (copl++)->l = CMOVE(par->bplcon0, bplcon0); in ami_build_copper()
3178 if (par->bplcon0 & BPC0_LACE) { in ami_build_copper()
3182 (cops++)->l = CMOVE(par->bplcon0, bplcon0); in ami_build_copper()
3186 (copl++)->l = CMOVE(diwstrt2hw(par->diwstrt_h, par->diwstrt_v+1), diwstrt); in ami_build_copper()
3187 (copl++)->l = CMOVE(diwstop2hw(par->diwstop_h, par->diwstop_v+1), diwstop); in ami_build_copper()
3188 (cops++)->l = CMOVE(diwstrt2hw(par->diwstrt_h, par->diwstrt_v), diwstrt); in ami_build_copper()
3189 (cops++)->l = CMOVE(diwstop2hw(par->diwstop_h, par->diwstop_v), diwstop); in ami_build_copper()
3191 (copl++)->l = CMOVE(diwhigh2hw(par->diwstrt_h, par->diwstrt_v+1, in ami_build_copper()
3192 par->diwstop_h, par->diwstop_v+1), diwhigh); in ami_build_copper()
3193 (cops++)->l = CMOVE(diwhigh2hw(par->diwstrt_h, par->diwstrt_v, in ami_build_copper()
3194 par->diwstop_h, par->diwstop_v), diwhigh); in ami_build_copper()
3196 if (par->beamcon0 & BMC0_VARBEAMEN) { in ami_build_copper()
3197 (copl++)->l = CMOVE(vtotal2hw(par->vtotal), vtotal); in ami_build_copper()
3198 (copl++)->l = CMOVE(vbstrt2hw(par->vbstrt+1), vbstrt); in ami_build_copper()
3199 (copl++)->l = CMOVE(vbstop2hw(par->vbstop+1), vbstop); in ami_build_copper()
3200 (cops++)->l = CMOVE(vtotal2hw(par->vtotal), vtotal); in ami_build_copper()
3201 (cops++)->l = CMOVE(vbstrt2hw(par->vbstrt), vbstrt); in ami_build_copper()
3202 (cops++)->l = CMOVE(vbstop2hw(par->vbstop), vbstop); in ami_build_copper()
3214 (copl++)->l = CMOVE(diwstrt2hw(par->diwstrt_h, par->diwstrt_v), diwstrt); in ami_build_copper()
3215 (copl++)->l = CMOVE(diwstop2hw(par->diwstop_h, par->diwstop_v), diwstop); in ami_build_copper()
3217 (copl++)->l = CMOVE(diwhigh2hw(par->diwstrt_h, par->diwstrt_v, in ami_build_copper()
3218 par->diwstop_h, par->diwstop_v), diwhigh); in ami_build_copper()
3220 if (par->beamcon0 & BMC0_VARBEAMEN) { in ami_build_copper()
3221 (copl++)->l = CMOVE(vtotal2hw(par->vtotal), vtotal); in ami_build_copper()
3222 (copl++)->l = CMOVE(vbstrt2hw(par->vbstrt), vbstrt); in ami_build_copper()
3223 (copl++)->l = CMOVE(vbstop2hw(par->vbstop), vbstop); in ami_build_copper()
3242 struct amifb_par *par = ¤tpar; in ami_rebuild_copper() local
3248 if (IS_AGA && maxfmode + par->clk_shift == 0) in ami_rebuild_copper()
3249 h_end1 = par->diwstrt_h-64; in ami_rebuild_copper()
3251 h_end1 = par->htotal-32; in ami_rebuild_copper()
3252 h_end2 = par->ddfstop+64; in ami_rebuild_copper()
3257 p = par->bplpt0; in ami_rebuild_copper()
3258 if (par->vmode & FB_VMODE_YWRAP) { in ami_rebuild_copper()
3259 if ((par->vyres-par->yoffset) != 1 || !mod2(par->diwstrt_v)) { in ami_rebuild_copper()
3260 if (par->yoffset > par->vyres-par->yres) { in ami_rebuild_copper()
3261 for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) { in ami_rebuild_copper()
3265 line = par->diwstrt_v + ((par->vyres-par->yoffset)<<par->line_shift) - 1; in ami_rebuild_copper()
3270 if (line >= 510 && IS_AGA && maxfmode + par->clk_shift == 0) in ami_rebuild_copper()
3274 p = par->bplpt0wrap; in ami_rebuild_copper()
3276 } else p = par->bplpt0wrap; in ami_rebuild_copper()
3278 for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) { in ami_rebuild_copper()
3284 if (par->bplcon0 & BPC0_LACE) { in ami_rebuild_copper()
3286 p = par->bplpt0; in ami_rebuild_copper()
3287 if (mod2(par->diwstrt_v)) in ami_rebuild_copper()
3288 p -= par->next_line; in ami_rebuild_copper()
3290 p += par->next_line; in ami_rebuild_copper()
3291 if (par->vmode & FB_VMODE_YWRAP) { in ami_rebuild_copper()
3292 if ((par->vyres-par->yoffset) != 1 || mod2(par->diwstrt_v)) { in ami_rebuild_copper()
3293 if (par->yoffset > par->vyres-par->yres+1) { in ami_rebuild_copper()
3294 for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) { in ami_rebuild_copper()
3298 line = par->diwstrt_v + ((par->vyres-par->yoffset)<<par->line_shift) - 2; in ami_rebuild_copper()
3303 if (line > 510 && IS_AGA && maxfmode + par->clk_shift == 0) in ami_rebuild_copper()
3307 p = par->bplpt0wrap; in ami_rebuild_copper()
3308 if (mod2(par->diwstrt_v+par->vyres-par->yoffset)) in ami_rebuild_copper()
3309 p -= par->next_line; in ami_rebuild_copper()
3311 p += par->next_line; in ami_rebuild_copper()
3313 } else p = par->bplpt0wrap - par->next_line; in ami_rebuild_copper()
3315 for (i = 0; i < (short)par->bpp; i++, p += par->next_plane) { in ami_rebuild_copper()