Lines Matching refs:var
90 int (*check)(struct clcd_fb *fb, struct fb_var_screeninfo *var);
172 struct fb_var_screeninfo *var = &fb->fb.var; in clcdfb_decode() local
178 val = ((var->xres / 16) - 1) << 2; in clcdfb_decode()
179 val |= (var->hsync_len - 1) << 8; in clcdfb_decode()
180 val |= (var->right_margin - 1) << 16; in clcdfb_decode()
181 val |= (var->left_margin - 1) << 24; in clcdfb_decode()
184 val = var->yres; in clcdfb_decode()
188 val |= (var->vsync_len - 1) << 10; in clcdfb_decode()
189 val |= var->lower_margin << 16; in clcdfb_decode()
190 val |= var->upper_margin << 24; in clcdfb_decode()
194 val |= var->sync & FB_SYNC_HOR_HIGH_ACT ? 0 : TIM2_IHS; in clcdfb_decode()
195 val |= var->sync & FB_SYNC_VERT_HIGH_ACT ? 0 : TIM2_IVS; in clcdfb_decode()
197 cpl = var->xres_virtual; in clcdfb_decode()
200 else if (!var->grayscale) /* STN color */ in clcdfb_decode()
212 if (var->grayscale) in clcdfb_decode()
215 if (fb->panel->caps && fb->board->caps && var->bits_per_pixel >= 16) { in clcdfb_decode()
225 if (var->red.offset == 0) in clcdfb_decode()
233 switch (var->bits_per_pixel) { in clcdfb_decode()
253 var->green.length == 5) in clcdfb_decode()
255 else if (var->green.length == 6) in clcdfb_decode()
270 regs->pixclock = var->pixclock; in clcdfb_decode()
273 static inline int clcdfb_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) in clcdfb_check() argument
275 var->xres_virtual = var->xres = (var->xres + 15) & ~15; in clcdfb_check()
276 var->yres_virtual = var->yres = (var->yres + 1) & ~1; in clcdfb_check()
278 #define CHECK(e,l,h) (var->e < l || var->e > h) in clcdfb_check()
282 var->xres > 4096 || in clcdfb_check()
283 var->lower_margin > 255 || /* back porch */ in clcdfb_check()
284 var->upper_margin > 255 || /* front porch */ in clcdfb_check()
285 var->vsync_len > 32 || in clcdfb_check()
286 var->yres > 1024) in clcdfb_check()
297 if (var->grayscale != fb->fb.var.grayscale || in clcdfb_check()
298 (var->vmode & FB_VMODE_MASK) != FB_VMODE_NONINTERLACED) in clcdfb_check()
301 #define CHECK(e) (var->e != fb->fb.var.e) in clcdfb_check()
317 var->nonstd = 0; in clcdfb_check()
318 var->accel_flags = 0; in clcdfb_check()