Lines Matching refs:var
78 saddr2 += info->fix.line_length * info->var.yres; in s3c2410fb_set_lcdaddr()
122 static int s3c2410fb_check_var(struct fb_var_screeninfo *var, in s3c2410fb_check_var() argument
133 dprintk("check_var(var=%p, info=%p)\n", var, info); in s3c2410fb_check_var()
137 if (var->yres == default_display->yres && in s3c2410fb_check_var()
138 var->xres == default_display->xres && in s3c2410fb_check_var()
139 var->bits_per_pixel == default_display->bpp) in s3c2410fb_check_var()
144 var->yres == mach_info->displays[i].yres && in s3c2410fb_check_var()
145 var->xres == mach_info->displays[i].xres && in s3c2410fb_check_var()
146 var->bits_per_pixel == mach_info->displays[i].bpp) { in s3c2410fb_check_var()
153 var->xres, var->yres, var->bits_per_pixel); in s3c2410fb_check_var()
158 var->xres_virtual = display->xres; in s3c2410fb_check_var()
159 var->yres_virtual = display->yres; in s3c2410fb_check_var()
160 var->height = display->height; in s3c2410fb_check_var()
161 var->width = display->width; in s3c2410fb_check_var()
164 var->pixclock = display->pixclock; in s3c2410fb_check_var()
165 var->left_margin = display->left_margin; in s3c2410fb_check_var()
166 var->right_margin = display->right_margin; in s3c2410fb_check_var()
167 var->upper_margin = display->upper_margin; in s3c2410fb_check_var()
168 var->lower_margin = display->lower_margin; in s3c2410fb_check_var()
169 var->vsync_len = display->vsync_len; in s3c2410fb_check_var()
170 var->hsync_len = display->hsync_len; in s3c2410fb_check_var()
176 var->transp.offset = 0; in s3c2410fb_check_var()
177 var->transp.length = 0; in s3c2410fb_check_var()
179 switch (var->bits_per_pixel) { in s3c2410fb_check_var()
183 var->red.offset = 0; in s3c2410fb_check_var()
184 var->red.length = var->bits_per_pixel; in s3c2410fb_check_var()
185 var->green = var->red; in s3c2410fb_check_var()
186 var->blue = var->red; in s3c2410fb_check_var()
191 var->red.length = 3; in s3c2410fb_check_var()
192 var->red.offset = 5; in s3c2410fb_check_var()
193 var->green.length = 3; in s3c2410fb_check_var()
194 var->green.offset = 2; in s3c2410fb_check_var()
195 var->blue.length = 2; in s3c2410fb_check_var()
196 var->blue.offset = 0; in s3c2410fb_check_var()
198 var->red.offset = 0; in s3c2410fb_check_var()
199 var->red.length = 8; in s3c2410fb_check_var()
200 var->green = var->red; in s3c2410fb_check_var()
201 var->blue = var->red; in s3c2410fb_check_var()
206 var->red.length = 4; in s3c2410fb_check_var()
207 var->red.offset = 8; in s3c2410fb_check_var()
208 var->green.length = 4; in s3c2410fb_check_var()
209 var->green.offset = 4; in s3c2410fb_check_var()
210 var->blue.length = 4; in s3c2410fb_check_var()
211 var->blue.offset = 0; in s3c2410fb_check_var()
218 var->red.offset = 11; in s3c2410fb_check_var()
219 var->green.offset = 5; in s3c2410fb_check_var()
220 var->blue.offset = 0; in s3c2410fb_check_var()
221 var->red.length = 5; in s3c2410fb_check_var()
222 var->green.length = 6; in s3c2410fb_check_var()
223 var->blue.length = 5; in s3c2410fb_check_var()
226 var->red.offset = 11; in s3c2410fb_check_var()
227 var->green.offset = 6; in s3c2410fb_check_var()
228 var->blue.offset = 1; in s3c2410fb_check_var()
229 var->red.length = 5; in s3c2410fb_check_var()
230 var->green.length = 5; in s3c2410fb_check_var()
231 var->blue.length = 5; in s3c2410fb_check_var()
236 var->red.length = 8; in s3c2410fb_check_var()
237 var->red.offset = 16; in s3c2410fb_check_var()
238 var->green.length = 8; in s3c2410fb_check_var()
239 var->green.offset = 8; in s3c2410fb_check_var()
240 var->blue.length = 8; in s3c2410fb_check_var()
241 var->blue.offset = 0; in s3c2410fb_check_var()
255 const struct fb_var_screeninfo *var = &info->var; in s3c2410fb_calculate_stn_lcd_regs() local
257 int hs = var->xres >> 2; in s3c2410fb_calculate_stn_lcd_regs()
258 unsigned wdly = (var->left_margin >> 4) - 1; in s3c2410fb_calculate_stn_lcd_regs()
259 unsigned wlh = (var->hsync_len >> 4) - 1; in s3c2410fb_calculate_stn_lcd_regs()
264 switch (var->bits_per_pixel) { in s3c2410fb_calculate_stn_lcd_regs()
286 var->bits_per_pixel); in s3c2410fb_calculate_stn_lcd_regs()
290 var->left_margin, var->right_margin, var->hsync_len); in s3c2410fb_calculate_stn_lcd_regs()
292 regs->lcdcon2 = S3C2410_LCDCON2_LINEVAL(var->yres - 1); in s3c2410fb_calculate_stn_lcd_regs()
301 S3C2410_LCDCON3_LINEBLANK(var->right_margin / 8) | in s3c2410fb_calculate_stn_lcd_regs()
315 const struct fb_var_screeninfo *var = &info->var; in s3c2410fb_calculate_tft_lcd_regs() local
317 switch (var->bits_per_pixel) { in s3c2410fb_calculate_tft_lcd_regs()
347 var->bits_per_pixel); in s3c2410fb_calculate_tft_lcd_regs()
351 var->upper_margin, var->lower_margin, var->vsync_len); in s3c2410fb_calculate_tft_lcd_regs()
354 var->left_margin, var->right_margin, var->hsync_len); in s3c2410fb_calculate_tft_lcd_regs()
356 regs->lcdcon2 = S3C2410_LCDCON2_LINEVAL(var->yres - 1) | in s3c2410fb_calculate_tft_lcd_regs()
357 S3C2410_LCDCON2_VBPD(var->upper_margin - 1) | in s3c2410fb_calculate_tft_lcd_regs()
358 S3C2410_LCDCON2_VFPD(var->lower_margin - 1) | in s3c2410fb_calculate_tft_lcd_regs()
359 S3C2410_LCDCON2_VSPW(var->vsync_len - 1); in s3c2410fb_calculate_tft_lcd_regs()
361 regs->lcdcon3 = S3C2410_LCDCON3_HBPD(var->right_margin - 1) | in s3c2410fb_calculate_tft_lcd_regs()
362 S3C2410_LCDCON3_HFPD(var->left_margin - 1) | in s3c2410fb_calculate_tft_lcd_regs()
363 S3C2410_LCDCON3_HOZVAL(var->xres - 1); in s3c2410fb_calculate_tft_lcd_regs()
365 regs->lcdcon4 = S3C2410_LCDCON4_HSPW(var->hsync_len - 1); in s3c2410fb_calculate_tft_lcd_regs()
378 struct fb_var_screeninfo *var = &info->var; in s3c2410fb_activate_var() local
381 clkdiv = DIV_ROUND_UP(s3c2410fb_calc_pixclk(fbi, var->pixclock), 2); in s3c2410fb_activate_var()
383 dprintk("%s: var->xres = %d\n", __func__, var->xres); in s3c2410fb_activate_var()
384 dprintk("%s: var->yres = %d\n", __func__, var->yres); in s3c2410fb_activate_var()
385 dprintk("%s: var->bpp = %d\n", __func__, var->bits_per_pixel); in s3c2410fb_activate_var()
430 struct fb_var_screeninfo *var = &info->var; in s3c2410fb_set_par() local
432 switch (var->bits_per_pixel) { in s3c2410fb_set_par()
446 info->fix.line_length = (var->xres_virtual * var->bits_per_pixel) / 8; in s3c2410fb_set_par()
504 val = chan_to_field(red, &info->var.red); in s3c2410fb_setcolreg()
505 val |= chan_to_field(green, &info->var.green); in s3c2410fb_setcolreg()
506 val |= chan_to_field(blue, &info->var.blue); in s3c2410fb_setcolreg()
909 fbinfo->var.nonstd = 0; in s3c24xxfb_probe()
910 fbinfo->var.activate = FB_ACTIVATE_NOW; in s3c24xxfb_probe()
911 fbinfo->var.accel_flags = 0; in s3c24xxfb_probe()
912 fbinfo->var.vmode = FB_VMODE_NONINTERLACED; in s3c24xxfb_probe()
963 fbinfo->var.xres = display->xres; in s3c24xxfb_probe()
964 fbinfo->var.yres = display->yres; in s3c24xxfb_probe()
965 fbinfo->var.bits_per_pixel = display->bpp; in s3c24xxfb_probe()
969 s3c2410fb_check_var(&fbinfo->var, fbinfo); in s3c24xxfb_probe()