Lines Matching full:var
78 static int grvga_check_var(struct fb_var_screeninfo *var, in grvga_check_var() argument
84 if (!var->xres) in grvga_check_var()
85 var->xres = 1; in grvga_check_var()
86 if (!var->yres) in grvga_check_var()
87 var->yres = 1; in grvga_check_var()
88 if (var->bits_per_pixel <= 8) in grvga_check_var()
89 var->bits_per_pixel = 8; in grvga_check_var()
90 else if (var->bits_per_pixel <= 16) in grvga_check_var()
91 var->bits_per_pixel = 16; in grvga_check_var()
92 else if (var->bits_per_pixel <= 24) in grvga_check_var()
93 var->bits_per_pixel = 24; in grvga_check_var()
94 else if (var->bits_per_pixel <= 32) in grvga_check_var()
95 var->bits_per_pixel = 32; in grvga_check_var()
99 var->xres_virtual = var->xres; in grvga_check_var()
100 var->yres_virtual = 2*var->yres; in grvga_check_var()
103 if ((var->yres_virtual*var->xres_virtual*var->bits_per_pixel/8) > info->fix.smem_len) in grvga_check_var()
109 if (var->pixclock == par->regs->clk_vector[i]) in grvga_check_var()
117 switch (info->var.bits_per_pixel) { in grvga_check_var()
119 var->red = (struct fb_bitfield) {0, 8, 0}; /* offset, length, msb-right */ in grvga_check_var()
120 var->green = (struct fb_bitfield) {0, 8, 0}; in grvga_check_var()
121 var->blue = (struct fb_bitfield) {0, 8, 0}; in grvga_check_var()
122 var->transp = (struct fb_bitfield) {0, 0, 0}; in grvga_check_var()
125 var->red = (struct fb_bitfield) {11, 5, 0}; in grvga_check_var()
126 var->green = (struct fb_bitfield) {5, 6, 0}; in grvga_check_var()
127 var->blue = (struct fb_bitfield) {0, 5, 0}; in grvga_check_var()
128 var->transp = (struct fb_bitfield) {0, 0, 0}; in grvga_check_var()
132 var->red = (struct fb_bitfield) {16, 8, 0}; in grvga_check_var()
133 var->green = (struct fb_bitfield) {8, 8, 0}; in grvga_check_var()
134 var->blue = (struct fb_bitfield) {0, 8, 0}; in grvga_check_var()
135 var->transp = (struct fb_bitfield) {24, 8, 0}; in grvga_check_var()
150 __raw_writel(((info->var.yres - 1) << 16) | (info->var.xres - 1), in grvga_set_par()
153 __raw_writel((info->var.lower_margin << 16) | (info->var.right_margin), in grvga_set_par()
156 __raw_writel((info->var.vsync_len << 16) | (info->var.hsync_len), in grvga_set_par()
159 …__raw_writel(((info->var.yres + info->var.lower_margin + info->var.upper_margin + info->var.vsync_… in grvga_set_par()
160 (info->var.xres + info->var.right_margin + info->var.left_margin + info->var.hsync_len - 1), in grvga_set_par()
163 switch (info->var.bits_per_pixel) { in grvga_set_par()
184 info->fix.line_length = (info->var.xres_virtual*info->var.bits_per_pixel)/8; in grvga_set_par()
196 if (info->var.grayscale) { in grvga_setcolreg()
205 red = CNVT_TOHW(red, info->var.red.length); in grvga_setcolreg()
206 green = CNVT_TOHW(green, info->var.green.length); in grvga_setcolreg()
207 blue = CNVT_TOHW(blue, info->var.blue.length); in grvga_setcolreg()
208 transp = CNVT_TOHW(transp, info->var.transp.length); in grvga_setcolreg()
224 v = (red << info->var.red.offset) | in grvga_setcolreg()
225 (green << info->var.green.offset) | in grvga_setcolreg()
226 (blue << info->var.blue.offset) | in grvga_setcolreg()
227 (transp << info->var.transp.offset); in grvga_setcolreg()
234 static int grvga_pan_display(struct fb_var_screeninfo *var, in grvga_pan_display() argument
241 if (var->xoffset != 0) in grvga_pan_display()
244 base_addr = fix->smem_start + (var->yoffset * fix->line_length); in grvga_pan_display()
363 if (grvga_parse_custom(this_opt, &info->var) < 0) { in grvga_probe()
408 retval = fb_find_mode(&info->var, info, mode_opt, in grvga_probe()
417 grvga_mem_size = info->var.xres_virtual * info->var.yres_virtual * info->var.bits_per_pixel/8; in grvga_probe()
476 info->node, info->var.xres, info->var.yres, info->var.bits_per_pixel, in grvga_probe()