Lines Matching full:var

73 	saddr2 += info->fix.line_length * info->var.yres;  in s3c2410fb_set_lcdaddr()
113 * Get the video params out of 'var'. If a value doesn't fit, round it up,
117 static int s3c2410fb_check_var(struct fb_var_screeninfo *var, in s3c2410fb_check_var() argument
128 dprintk("check_var(var=%p, info=%p)\n", var, info); in s3c2410fb_check_var()
132 if (var->yres == default_display->yres && in s3c2410fb_check_var()
133 var->xres == default_display->xres && in s3c2410fb_check_var()
134 var->bits_per_pixel == default_display->bpp) in s3c2410fb_check_var()
139 var->yres == mach_info->displays[i].yres && in s3c2410fb_check_var()
140 var->xres == mach_info->displays[i].xres && in s3c2410fb_check_var()
141 var->bits_per_pixel == mach_info->displays[i].bpp) { in s3c2410fb_check_var()
148 var->xres, var->yres, var->bits_per_pixel); in s3c2410fb_check_var()
153 var->xres_virtual = display->xres; in s3c2410fb_check_var()
154 var->yres_virtual = display->yres; in s3c2410fb_check_var()
155 var->height = display->height; in s3c2410fb_check_var()
156 var->width = display->width; in s3c2410fb_check_var()
159 var->pixclock = display->pixclock; in s3c2410fb_check_var()
160 var->left_margin = display->left_margin; in s3c2410fb_check_var()
161 var->right_margin = display->right_margin; in s3c2410fb_check_var()
162 var->upper_margin = display->upper_margin; in s3c2410fb_check_var()
163 var->lower_margin = display->lower_margin; in s3c2410fb_check_var()
164 var->vsync_len = display->vsync_len; in s3c2410fb_check_var()
165 var->hsync_len = display->hsync_len; in s3c2410fb_check_var()
171 var->transp.offset = 0; in s3c2410fb_check_var()
172 var->transp.length = 0; in s3c2410fb_check_var()
174 switch (var->bits_per_pixel) { in s3c2410fb_check_var()
178 var->red.offset = 0; in s3c2410fb_check_var()
179 var->red.length = var->bits_per_pixel; in s3c2410fb_check_var()
180 var->green = var->red; in s3c2410fb_check_var()
181 var->blue = var->red; in s3c2410fb_check_var()
186 var->red.length = 3; in s3c2410fb_check_var()
187 var->red.offset = 5; in s3c2410fb_check_var()
188 var->green.length = 3; in s3c2410fb_check_var()
189 var->green.offset = 2; in s3c2410fb_check_var()
190 var->blue.length = 2; in s3c2410fb_check_var()
191 var->blue.offset = 0; in s3c2410fb_check_var()
193 var->red.offset = 0; in s3c2410fb_check_var()
194 var->red.length = 8; in s3c2410fb_check_var()
195 var->green = var->red; in s3c2410fb_check_var()
196 var->blue = var->red; in s3c2410fb_check_var()
201 var->red.length = 4; in s3c2410fb_check_var()
202 var->red.offset = 8; in s3c2410fb_check_var()
203 var->green.length = 4; in s3c2410fb_check_var()
204 var->green.offset = 4; in s3c2410fb_check_var()
205 var->blue.length = 4; in s3c2410fb_check_var()
206 var->blue.offset = 0; in s3c2410fb_check_var()
213 var->red.offset = 11; in s3c2410fb_check_var()
214 var->green.offset = 5; in s3c2410fb_check_var()
215 var->blue.offset = 0; in s3c2410fb_check_var()
216 var->red.length = 5; in s3c2410fb_check_var()
217 var->green.length = 6; in s3c2410fb_check_var()
218 var->blue.length = 5; in s3c2410fb_check_var()
221 var->red.offset = 11; in s3c2410fb_check_var()
222 var->green.offset = 6; in s3c2410fb_check_var()
223 var->blue.offset = 1; in s3c2410fb_check_var()
224 var->red.length = 5; in s3c2410fb_check_var()
225 var->green.length = 5; in s3c2410fb_check_var()
226 var->blue.length = 5; in s3c2410fb_check_var()
231 var->red.length = 8; in s3c2410fb_check_var()
232 var->red.offset = 16; in s3c2410fb_check_var()
233 var->green.length = 8; in s3c2410fb_check_var()
234 var->green.offset = 8; in s3c2410fb_check_var()
235 var->blue.length = 8; in s3c2410fb_check_var()
236 var->blue.offset = 0; in s3c2410fb_check_var()
244 * calculate register values from var settings
250 const struct fb_var_screeninfo *var = &info->var; in s3c2410fb_calculate_stn_lcd_regs() local
252 int hs = var->xres >> 2; in s3c2410fb_calculate_stn_lcd_regs()
253 unsigned wdly = (var->left_margin >> 4) - 1; in s3c2410fb_calculate_stn_lcd_regs()
254 unsigned wlh = (var->hsync_len >> 4) - 1; in s3c2410fb_calculate_stn_lcd_regs()
259 switch (var->bits_per_pixel) { in s3c2410fb_calculate_stn_lcd_regs()
281 var->bits_per_pixel); in s3c2410fb_calculate_stn_lcd_regs()
285 var->left_margin, var->right_margin, var->hsync_len); in s3c2410fb_calculate_stn_lcd_regs()
287 regs->lcdcon2 = S3C2410_LCDCON2_LINEVAL(var->yres - 1); in s3c2410fb_calculate_stn_lcd_regs()
296 S3C2410_LCDCON3_LINEBLANK(var->right_margin / 8) | in s3c2410fb_calculate_stn_lcd_regs()
304 * calculate register values from var settings
310 const struct fb_var_screeninfo *var = &info->var; in s3c2410fb_calculate_tft_lcd_regs() local
312 switch (var->bits_per_pixel) { in s3c2410fb_calculate_tft_lcd_regs()
342 var->bits_per_pixel); in s3c2410fb_calculate_tft_lcd_regs()
346 var->upper_margin, var->lower_margin, var->vsync_len); in s3c2410fb_calculate_tft_lcd_regs()
349 var->left_margin, var->right_margin, var->hsync_len); in s3c2410fb_calculate_tft_lcd_regs()
351 regs->lcdcon2 = S3C2410_LCDCON2_LINEVAL(var->yres - 1) | in s3c2410fb_calculate_tft_lcd_regs()
352 S3C2410_LCDCON2_VBPD(var->upper_margin - 1) | in s3c2410fb_calculate_tft_lcd_regs()
353 S3C2410_LCDCON2_VFPD(var->lower_margin - 1) | in s3c2410fb_calculate_tft_lcd_regs()
354 S3C2410_LCDCON2_VSPW(var->vsync_len - 1); in s3c2410fb_calculate_tft_lcd_regs()
356 regs->lcdcon3 = S3C2410_LCDCON3_HBPD(var->right_margin - 1) | in s3c2410fb_calculate_tft_lcd_regs()
357 S3C2410_LCDCON3_HFPD(var->left_margin - 1) | in s3c2410fb_calculate_tft_lcd_regs()
358 S3C2410_LCDCON3_HOZVAL(var->xres - 1); in s3c2410fb_calculate_tft_lcd_regs()
360 regs->lcdcon4 = S3C2410_LCDCON4_HSPW(var->hsync_len - 1); in s3c2410fb_calculate_tft_lcd_regs()
373 struct fb_var_screeninfo *var = &info->var; in s3c2410fb_activate_var() local
376 clkdiv = DIV_ROUND_UP(s3c2410fb_calc_pixclk(fbi, var->pixclock), 2); in s3c2410fb_activate_var()
378 dprintk("%s: var->xres = %d\n", __func__, var->xres); in s3c2410fb_activate_var()
379 dprintk("%s: var->yres = %d\n", __func__, var->yres); in s3c2410fb_activate_var()
380 dprintk("%s: var->bpp = %d\n", __func__, var->bits_per_pixel); in s3c2410fb_activate_var()
425 struct fb_var_screeninfo *var = &info->var; in s3c2410fb_set_par() local
427 switch (var->bits_per_pixel) { in s3c2410fb_set_par()
441 info->fix.line_length = (var->xres_virtual * var->bits_per_pixel) / 8; in s3c2410fb_set_par()
499 val = chan_to_field(red, &info->var.red); in s3c2410fb_setcolreg()
500 val |= chan_to_field(green, &info->var.green); in s3c2410fb_setcolreg()
501 val |= chan_to_field(blue, &info->var.blue); in s3c2410fb_setcolreg()
907 fbinfo->var.nonstd = 0; in s3c24xxfb_probe()
908 fbinfo->var.activate = FB_ACTIVATE_NOW; in s3c24xxfb_probe()
909 fbinfo->var.accel_flags = 0; in s3c24xxfb_probe()
910 fbinfo->var.vmode = FB_VMODE_NONINTERLACED; in s3c24xxfb_probe()
961 fbinfo->var.xres = display->xres; in s3c24xxfb_probe()
962 fbinfo->var.yres = display->yres; in s3c24xxfb_probe()
963 fbinfo->var.bits_per_pixel = display->bpp; in s3c24xxfb_probe()
967 s3c2410fb_check_var(&fbinfo->var, fbinfo); in s3c24xxfb_probe()