Lines Matching refs:var

87 static int mc68x328fb_check_var(struct fb_var_screeninfo *var,
92 static int mc68x328fb_pan_display(struct fb_var_screeninfo *var,
130 static int mc68x328fb_check_var(struct fb_var_screeninfo *var, in mc68x328fb_check_var() argument
140 if (var->vmode & FB_VMODE_CONUPDATE) { in mc68x328fb_check_var()
141 var->vmode |= FB_VMODE_YWRAP; in mc68x328fb_check_var()
142 var->xoffset = info->var.xoffset; in mc68x328fb_check_var()
143 var->yoffset = info->var.yoffset; in mc68x328fb_check_var()
149 if (!var->xres) in mc68x328fb_check_var()
150 var->xres = 1; in mc68x328fb_check_var()
151 if (!var->yres) in mc68x328fb_check_var()
152 var->yres = 1; in mc68x328fb_check_var()
153 if (var->xres > var->xres_virtual) in mc68x328fb_check_var()
154 var->xres_virtual = var->xres; in mc68x328fb_check_var()
155 if (var->yres > var->yres_virtual) in mc68x328fb_check_var()
156 var->yres_virtual = var->yres; in mc68x328fb_check_var()
157 if (var->bits_per_pixel <= 1) in mc68x328fb_check_var()
158 var->bits_per_pixel = 1; in mc68x328fb_check_var()
159 else if (var->bits_per_pixel <= 8) in mc68x328fb_check_var()
160 var->bits_per_pixel = 8; in mc68x328fb_check_var()
161 else if (var->bits_per_pixel <= 16) in mc68x328fb_check_var()
162 var->bits_per_pixel = 16; in mc68x328fb_check_var()
163 else if (var->bits_per_pixel <= 24) in mc68x328fb_check_var()
164 var->bits_per_pixel = 24; in mc68x328fb_check_var()
165 else if (var->bits_per_pixel <= 32) in mc68x328fb_check_var()
166 var->bits_per_pixel = 32; in mc68x328fb_check_var()
170 if (var->xres_virtual < var->xoffset + var->xres) in mc68x328fb_check_var()
171 var->xres_virtual = var->xoffset + var->xres; in mc68x328fb_check_var()
172 if (var->yres_virtual < var->yoffset + var->yres) in mc68x328fb_check_var()
173 var->yres_virtual = var->yoffset + var->yres; in mc68x328fb_check_var()
179 get_line_length(var->xres_virtual, var->bits_per_pixel); in mc68x328fb_check_var()
180 if (line_length * var->yres_virtual > videomemorysize) in mc68x328fb_check_var()
188 switch (var->bits_per_pixel) { in mc68x328fb_check_var()
190 var->red.offset = 0; in mc68x328fb_check_var()
191 var->red.length = 1; in mc68x328fb_check_var()
192 var->green.offset = 0; in mc68x328fb_check_var()
193 var->green.length = 1; in mc68x328fb_check_var()
194 var->blue.offset = 0; in mc68x328fb_check_var()
195 var->blue.length = 1; in mc68x328fb_check_var()
196 var->transp.offset = 0; in mc68x328fb_check_var()
197 var->transp.length = 0; in mc68x328fb_check_var()
200 var->red.offset = 0; in mc68x328fb_check_var()
201 var->red.length = 8; in mc68x328fb_check_var()
202 var->green.offset = 0; in mc68x328fb_check_var()
203 var->green.length = 8; in mc68x328fb_check_var()
204 var->blue.offset = 0; in mc68x328fb_check_var()
205 var->blue.length = 8; in mc68x328fb_check_var()
206 var->transp.offset = 0; in mc68x328fb_check_var()
207 var->transp.length = 0; in mc68x328fb_check_var()
210 if (var->transp.length) { in mc68x328fb_check_var()
211 var->red.offset = 0; in mc68x328fb_check_var()
212 var->red.length = 5; in mc68x328fb_check_var()
213 var->green.offset = 5; in mc68x328fb_check_var()
214 var->green.length = 5; in mc68x328fb_check_var()
215 var->blue.offset = 10; in mc68x328fb_check_var()
216 var->blue.length = 5; in mc68x328fb_check_var()
217 var->transp.offset = 15; in mc68x328fb_check_var()
218 var->transp.length = 1; in mc68x328fb_check_var()
220 var->red.offset = 0; in mc68x328fb_check_var()
221 var->red.length = 5; in mc68x328fb_check_var()
222 var->green.offset = 5; in mc68x328fb_check_var()
223 var->green.length = 6; in mc68x328fb_check_var()
224 var->blue.offset = 11; in mc68x328fb_check_var()
225 var->blue.length = 5; in mc68x328fb_check_var()
226 var->transp.offset = 0; in mc68x328fb_check_var()
227 var->transp.length = 0; in mc68x328fb_check_var()
231 var->red.offset = 0; in mc68x328fb_check_var()
232 var->red.length = 8; in mc68x328fb_check_var()
233 var->green.offset = 8; in mc68x328fb_check_var()
234 var->green.length = 8; in mc68x328fb_check_var()
235 var->blue.offset = 16; in mc68x328fb_check_var()
236 var->blue.length = 8; in mc68x328fb_check_var()
237 var->transp.offset = 0; in mc68x328fb_check_var()
238 var->transp.length = 0; in mc68x328fb_check_var()
241 var->red.offset = 0; in mc68x328fb_check_var()
242 var->red.length = 8; in mc68x328fb_check_var()
243 var->green.offset = 8; in mc68x328fb_check_var()
244 var->green.length = 8; in mc68x328fb_check_var()
245 var->blue.offset = 16; in mc68x328fb_check_var()
246 var->blue.length = 8; in mc68x328fb_check_var()
247 var->transp.offset = 24; in mc68x328fb_check_var()
248 var->transp.length = 8; in mc68x328fb_check_var()
251 var->red.msb_right = 0; in mc68x328fb_check_var()
252 var->green.msb_right = 0; in mc68x328fb_check_var()
253 var->blue.msb_right = 0; in mc68x328fb_check_var()
254 var->transp.msb_right = 0; in mc68x328fb_check_var()
265 info->fix.line_length = get_line_length(info->var.xres_virtual, in mc68x328fb_set_par()
266 info->var.bits_per_pixel); in mc68x328fb_set_par()
286 if (info->var.grayscale) { in mc68x328fb_setcolreg()
317 red = CNVT_TOHW(red, info->var.red.length); in mc68x328fb_setcolreg()
318 green = CNVT_TOHW(green, info->var.green.length); in mc68x328fb_setcolreg()
319 blue = CNVT_TOHW(blue, info->var.blue.length); in mc68x328fb_setcolreg()
320 transp = CNVT_TOHW(transp, info->var.transp.length); in mc68x328fb_setcolreg()
338 v = (red << info->var.red.offset) | in mc68x328fb_setcolreg()
339 (green << info->var.green.offset) | in mc68x328fb_setcolreg()
340 (blue << info->var.blue.offset) | in mc68x328fb_setcolreg()
341 (transp << info->var.transp.offset); in mc68x328fb_setcolreg()
342 switch (info->var.bits_per_pixel) { in mc68x328fb_setcolreg()
364 static int mc68x328fb_pan_display(struct fb_var_screeninfo *var, in mc68x328fb_pan_display() argument
367 if (var->vmode & FB_VMODE_YWRAP) { in mc68x328fb_pan_display()
368 if (var->yoffset < 0 in mc68x328fb_pan_display()
369 || var->yoffset >= info->var.yres_virtual in mc68x328fb_pan_display()
370 || var->xoffset) in mc68x328fb_pan_display()
373 if (var->xoffset + info->var.xres > info->var.xres_virtual || in mc68x328fb_pan_display()
374 var->yoffset + info->var.yres > info->var.yres_virtual) in mc68x328fb_pan_display()
377 info->var.xoffset = var->xoffset; in mc68x328fb_pan_display()
378 info->var.yoffset = var->yoffset; in mc68x328fb_pan_display()
379 if (var->vmode & FB_VMODE_YWRAP) in mc68x328fb_pan_display()
380 info->var.vmode |= FB_VMODE_YWRAP; in mc68x328fb_pan_display()
382 info->var.vmode &= ~FB_VMODE_YWRAP; in mc68x328fb_pan_display()
438 fb_info.var = mc68x328fb_default; in mc68x328fb_init()
446 if (fb_info.var.bits_per_pixel == 1) { in mc68x328fb_init()
447 fb_info.var.red.length = fb_info.var.green.length = fb_info.var.blue.length = 1; in mc68x328fb_init()
448 fb_info.var.red.offset = fb_info.var.green.offset = fb_info.var.blue.offset = 0; in mc68x328fb_init()