Lines Matching refs:var
106 struct fb_var_screeninfo *var = &fbdev->info.var; in ocfb_setupfb() local
125 ocfb_writereg(fbdev, OCFB_HTIM, (var->hsync_len - 1) << 24 | in ocfb_setupfb()
126 (var->left_margin - 1) << 16 | (var->xres - 1)); in ocfb_setupfb()
129 ocfb_writereg(fbdev, OCFB_VTIM, (var->vsync_len - 1) << 24 | in ocfb_setupfb()
130 (var->upper_margin - 1) << 16 | (var->yres - 1)); in ocfb_setupfb()
133 hlen = var->left_margin + var->right_margin + var->hsync_len + in ocfb_setupfb()
134 var->xres; in ocfb_setupfb()
136 vlen = var->upper_margin + var->lower_margin + var->vsync_len + in ocfb_setupfb()
137 var->yres; in ocfb_setupfb()
142 switch (var->bits_per_pixel) { in ocfb_setupfb()
144 if (!var->grayscale) in ocfb_setupfb()
186 if (info->var.grayscale) { in ocfb_setcolreg()
191 red >>= (16 - info->var.red.length); in ocfb_setcolreg()
192 green >>= (16 - info->var.green.length); in ocfb_setcolreg()
193 blue >>= (16 - info->var.blue.length); in ocfb_setcolreg()
194 transp >>= (16 - info->var.transp.length); in ocfb_setcolreg()
196 if (info->var.bits_per_pixel == 8 && !info->var.grayscale) { in ocfb_setcolreg()
202 (red << info->var.red.offset) | in ocfb_setcolreg()
203 (green << info->var.green.offset) | in ocfb_setcolreg()
204 (blue << info->var.blue.offset) | in ocfb_setcolreg()
205 (transp << info->var.transp.offset); in ocfb_setcolreg()
213 struct fb_var_screeninfo *var = &fbdev->info.var; in ocfb_init_fix() local
218 fix->line_length = var->xres * var->bits_per_pixel/8; in ocfb_init_fix()
219 fix->smem_len = fix->line_length * var->yres; in ocfb_init_fix()
222 if (var->bits_per_pixel == 8 && !var->grayscale) in ocfb_init_fix()
232 struct fb_var_screeninfo *var = &fbdev->info.var; in ocfb_init_var() local
234 var->accel_flags = FB_ACCEL_NONE; in ocfb_init_var()
235 var->activate = FB_ACTIVATE_NOW; in ocfb_init_var()
236 var->xres_virtual = var->xres; in ocfb_init_var()
237 var->yres_virtual = var->yres; in ocfb_init_var()
239 switch (var->bits_per_pixel) { in ocfb_init_var()
241 var->transp.offset = 0; in ocfb_init_var()
242 var->transp.length = 0; in ocfb_init_var()
243 var->red.offset = 0; in ocfb_init_var()
244 var->red.length = 8; in ocfb_init_var()
245 var->green.offset = 0; in ocfb_init_var()
246 var->green.length = 8; in ocfb_init_var()
247 var->blue.offset = 0; in ocfb_init_var()
248 var->blue.length = 8; in ocfb_init_var()
252 var->transp.offset = 0; in ocfb_init_var()
253 var->transp.length = 0; in ocfb_init_var()
254 var->red.offset = 11; in ocfb_init_var()
255 var->red.length = 5; in ocfb_init_var()
256 var->green.offset = 5; in ocfb_init_var()
257 var->green.length = 6; in ocfb_init_var()
258 var->blue.offset = 0; in ocfb_init_var()
259 var->blue.length = 5; in ocfb_init_var()
263 var->transp.offset = 0; in ocfb_init_var()
264 var->transp.length = 0; in ocfb_init_var()
265 var->red.offset = 16; in ocfb_init_var()
266 var->red.length = 8; in ocfb_init_var()
267 var->green.offset = 8; in ocfb_init_var()
268 var->green.length = 8; in ocfb_init_var()
269 var->blue.offset = 0; in ocfb_init_var()
270 var->blue.length = 8; in ocfb_init_var()
274 var->transp.offset = 24; in ocfb_init_var()
275 var->transp.length = 8; in ocfb_init_var()
276 var->red.offset = 16; in ocfb_init_var()
277 var->red.length = 8; in ocfb_init_var()
278 var->green.offset = 8; in ocfb_init_var()
279 var->green.length = 8; in ocfb_init_var()
280 var->blue.offset = 0; in ocfb_init_var()
281 var->blue.length = 8; in ocfb_init_var()
311 if (!fb_find_mode(&fbdev->info.var, &fbdev->info, mode_option, in ocfb_probe()