Lines Matching refs:par

239                              struct pvr2fb_par *par);
241 struct pvr2fb_par *par);
243 struct pvr2fb_par *par);
244 static void pvr2_get_par(struct pvr2fb_par *par);
309 struct pvr2fb_par par; in pvr2fb_get_fix() local
312 pvr2_get_par(&par); in pvr2fb_get_fix()
316 if ((err = pvr2_decode_var(&fb_display[con].var, &par))) in pvr2fb_get_fix()
319 return pvr2_encode_fix(fix, &par); in pvr2fb_get_fix()
330 struct pvr2fb_par par; in pvr2fb_get_var() local
332 pvr2_get_par(&par); in pvr2fb_get_var()
333 err = pvr2_encode_var(var, &par); in pvr2fb_get_var()
347 struct pvr2fb_par par; in pvr2fb_set_var() local
365 if ((err = pvr2_decode_var(var, &par))) in pvr2fb_set_var()
367 pvr2_encode_var(var, &par); in pvr2fb_set_var()
383 pvr2_encode_fix(&fix, &par); in pvr2fb_set_var()
620 struct pvr2fb_par *par) in pvr2_encode_fix() argument
630 if (par->vmode & FB_VMODE_YWRAP) { in pvr2_encode_fix()
638 fix->line_length = par->next_line; in pvr2_encode_fix()
649 struct pvr2fb_par *par) in pvr2_decode_var() argument
658 par->pixclock = var->pixclock; in pvr2_decode_var()
660 if ((par->xres = var->xres) < 320) in pvr2_decode_var()
661 par->xres = 320; in pvr2_decode_var()
662 if ((par->yres = var->yres) < 240) in pvr2_decode_var()
663 par->yres = 240; in pvr2_decode_var()
664 if ((par->vxres = var->xres_virtual) < par->xres) in pvr2_decode_var()
665 par->vxres = par->xres; in pvr2_decode_var()
666 if ((par->vyres = var->yres_virtual) < par->yres) in pvr2_decode_var()
667 par->vyres = par->yres; in pvr2_decode_var()
669 if ((par->bpp = var->bits_per_pixel) <= 16) in pvr2_decode_var()
670 par->bpp = 16; in pvr2_decode_var()
671 else if ((par->bpp = var->bits_per_pixel) <= 24) in pvr2_decode_var()
672 par->bpp = 24; in pvr2_decode_var()
673 else if ((par->bpp = var->bits_per_pixel) <= 32) in pvr2_decode_var()
674 par->bpp = 32; in pvr2_decode_var()
676 currbpp = par->bpp; in pvr2_decode_var()
689 par->vmode = var->vmode & FB_VMODE_MASK; in pvr2_decode_var()
690 if (par->vmode & FB_VMODE_INTERLACED && video_output != VO_VGA) in pvr2_decode_var()
691 par->is_interlaced = 1; in pvr2_decode_var()
696 par->is_doublescan = (par->yres < 480 && video_output == VO_VGA); in pvr2_decode_var()
698 par->hsync_total = var->left_margin + var->xres + var->right_margin + in pvr2_decode_var()
700 par->vsync_total = var->upper_margin + var->yres + var->lower_margin + in pvr2_decode_var()
704 vtotal = par->vsync_total; in pvr2_decode_var()
705 if (par->is_interlaced) in pvr2_decode_var()
710 if (par->hsync_total != PAL_HTOTAL) { in pvr2_decode_var()
716 par->borderstart_h = 116; in pvr2_decode_var()
717 par->borderstart_v = 44; in pvr2_decode_var()
720 if (par->hsync_total != NTSC_HTOTAL) { in pvr2_decode_var()
724 par->borderstart_h = 126; in pvr2_decode_var()
725 par->borderstart_v = 18; in pvr2_decode_var()
734 par->borderstart_h = 126; in pvr2_decode_var()
735 par->borderstart_v = 40; in pvr2_decode_var()
739 par->borderstop_h = par->borderstart_h + par->hsync_total - in pvr2_decode_var()
741 par->borderstop_v = par->borderstart_v + par->vsync_total - in pvr2_decode_var()
743 par->diwstart_h = par->borderstart_h + var->left_margin; in pvr2_decode_var()
744 par->diwstart_v = par->borderstart_v + var->upper_margin; in pvr2_decode_var()
745 if (!par->is_interlaced) in pvr2_decode_var()
746 par->borderstop_v /= 2; in pvr2_decode_var()
748 if (par->xres < 640) in pvr2_decode_var()
749 par->is_lowres = 1; in pvr2_decode_var()
752 if (!((par->vmode ^ var->vmode) & FB_VMODE_YWRAP)) { in pvr2_decode_var()
753 par->xoffset = var->xoffset; in pvr2_decode_var()
754 par->yoffset = var->yoffset; in pvr2_decode_var()
755 if (par->vmode & FB_VMODE_YWRAP) { in pvr2_decode_var()
756 if (par->xoffset || par->yoffset < 0 || par->yoffset >= in pvr2_decode_var()
757 par->vyres) in pvr2_decode_var()
758 par->xoffset = par->yoffset = 0; in pvr2_decode_var()
760 if (par->xoffset < 0 || par->xoffset > par->vxres-par->xres || in pvr2_decode_var()
761 par->yoffset < 0 || par->yoffset > par->vyres-par->yres) in pvr2_decode_var()
762 par->xoffset = par->yoffset = 0; in pvr2_decode_var()
765 par->xoffset = par->yoffset = 0; in pvr2_decode_var()
771 par->disp_start = videomemory + (get_line_length(par->vxres, par->bpp) * in pvr2_decode_var()
772 par->yoffset) * get_line_length(par->xoffset, par->bpp); in pvr2_decode_var()
773 par->next_line = line_length; in pvr2_decode_var()
779 struct pvr2fb_par *par) in pvr2_encode_var() argument
783 var->xres = par->xres; in pvr2_encode_var()
784 var->yres = par->yres; in pvr2_encode_var()
785 var->xres_virtual = par->vxres; in pvr2_encode_var()
786 var->yres_virtual = par->vyres; in pvr2_encode_var()
787 var->xoffset = par->xoffset; in pvr2_encode_var()
788 var->yoffset = par->yoffset; in pvr2_encode_var()
790 var->bits_per_pixel = par->bpp; in pvr2_encode_var()
797 var->pixclock = par->pixclock; in pvr2_encode_var()
799 if (par->is_doublescan) in pvr2_encode_var()
802 if (par->is_interlaced) in pvr2_encode_var()
807 var->right_margin = par->borderstop_h - (par->diwstart_h + par->xres); in pvr2_encode_var()
808 var->left_margin = par->diwstart_h - par->borderstart_h; in pvr2_encode_var()
809 var->hsync_len = par->borderstart_h + (par->hsync_total - par->borderstop_h); in pvr2_encode_var()
810 var->upper_margin = par->diwstart_v - par->borderstart_v; in pvr2_encode_var()
811 var->lower_margin = par->borderstop_v - (par->diwstart_v + par->yres); in pvr2_encode_var()
812 var->vsync_len = par->borderstart_v + (par->vsync_total - par->borderstop_v); in pvr2_encode_var()
816 if (par->vmode & FB_VMODE_YWRAP) in pvr2_encode_var()
822 static void pvr2_get_par(struct pvr2fb_par *par) in pvr2_get_par() argument
824 *par = currentpar; in pvr2_get_par()
844 struct pvr2fb_par *par = &currentpar; in pvr2_pan_var() local
846 par->xoffset = var->xoffset; in pvr2_pan_var()
847 par->yoffset = var->yoffset; in pvr2_pan_var()
849 par->vmode |= FB_VMODE_YWRAP; in pvr2_pan_var()
851 par->vmode &= ~FB_VMODE_YWRAP; in pvr2_pan_var()
860 struct pvr2fb_par *par = &currentpar; in pvr2_update_par() local
863 move = get_line_length(par->xoffset, par->bpp); in pvr2_update_par()
864 if (par->yoffset) { in pvr2_update_par()
865 par->disp_start += (par->next_line * par->yoffset) + move; in pvr2_update_par()
867 par->disp_start += move; in pvr2_update_par()
874 struct pvr2fb_par *par = &currentpar; in pvr2_update_display() local
877 ctrl_outl(par->disp_start, DISP_DIWADDRL); in pvr2_update_display()
878 ctrl_outl(par->disp_start + in pvr2_update_display()
879 get_line_length(par->xoffset + par->xres, par->bpp), in pvr2_update_display()
891 struct pvr2fb_par *par = &currentpar; in pvr2_init_display() local
893 u_short bytesperpixel = par->bpp / 8; in pvr2_init_display()
896 ctrl_outl((par->vsync_total << 16) | par->hsync_total, DISP_SYNCSIZE); in pvr2_init_display()
901 if (video_output != VO_VGA && par->is_interlaced) in pvr2_init_display()
902 diw_modulo += par->next_line / 4; in pvr2_init_display()
903 diw_height = (par->is_interlaced ? par->yres / 2 : par->yres); in pvr2_init_display()
904 diw_width = get_line_length(par->xres, par->bpp) / 4; in pvr2_init_display()
909 ctrl_outl(par->disp_start, DISP_DIWADDRL); in pvr2_init_display()
910 ctrl_outl(par->disp_start + in pvr2_init_display()
911 get_line_length(par->xoffset + par->xres, par->bpp), in pvr2_init_display()
915 ctrl_outl((par->borderstart_h << 16) | par->borderstop_h, DISP_BRDRHORZ); in pvr2_init_display()
916 ctrl_outl((par->borderstart_v << 16) | par->borderstop_v, DISP_BRDRVERT); in pvr2_init_display()
920 ctrl_outl(par->diwstart_h, DISP_DIWHSTRT); in pvr2_init_display()
921 ctrl_outl((par->diwstart_v << 16) | par->diwstart_v, DISP_DIWVSTRT); in pvr2_init_display()
924 ctrl_outl((0x16 << 16) | par->is_lowres, DISP_DIWCONF); in pvr2_init_display()
928 (par->is_doublescan << 1) | 1, DISP_DIWMODE); in pvr2_init_display()
935 ctrl_outl(0x100 | ((par->is_interlaced /*|4*/) << 4), DISP_SYNCCONF); in pvr2_init_display()