Lines Matching refs:var
90 int (*check)(struct clcd_fb *fb, struct fb_var_screeninfo *var);
145 struct fb_var_screeninfo *var = &fb->fb.var; in clcdfb_decode() local
151 val = ((var->xres / 16) - 1) << 2; in clcdfb_decode()
152 val |= (var->hsync_len - 1) << 8; in clcdfb_decode()
153 val |= (var->right_margin - 1) << 16; in clcdfb_decode()
154 val |= (var->left_margin - 1) << 24; in clcdfb_decode()
157 val = var->yres; in clcdfb_decode()
161 val |= (var->vsync_len - 1) << 10; in clcdfb_decode()
162 val |= var->lower_margin << 16; in clcdfb_decode()
163 val |= var->upper_margin << 24; in clcdfb_decode()
167 val |= var->sync & FB_SYNC_HOR_HIGH_ACT ? 0 : TIM2_IHS; in clcdfb_decode()
168 val |= var->sync & FB_SYNC_VERT_HIGH_ACT ? 0 : TIM2_IVS; in clcdfb_decode()
170 cpl = var->xres_virtual; in clcdfb_decode()
173 else if (!var->grayscale) /* STN color */ in clcdfb_decode()
185 if (var->grayscale) in clcdfb_decode()
188 if (fb->panel->caps && fb->board->caps && var->bits_per_pixel >= 16) { in clcdfb_decode()
198 if (var->red.offset == 0) in clcdfb_decode()
206 switch (var->bits_per_pixel) { in clcdfb_decode()
226 var->green.length == 5) in clcdfb_decode()
228 else if (var->green.length == 6) in clcdfb_decode()
239 regs->pixclock = var->pixclock; in clcdfb_decode()
242 static inline int clcdfb_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) in clcdfb_check() argument
244 var->xres_virtual = var->xres = (var->xres + 15) & ~15; in clcdfb_check()
245 var->yres_virtual = var->yres = (var->yres + 1) & ~1; in clcdfb_check()
247 #define CHECK(e,l,h) (var->e < l || var->e > h) in clcdfb_check()
251 var->xres > 4096 || in clcdfb_check()
252 var->lower_margin > 255 || /* back porch */ in clcdfb_check()
253 var->upper_margin > 255 || /* front porch */ in clcdfb_check()
254 var->vsync_len > 32 || in clcdfb_check()
255 var->yres > 1024) in clcdfb_check()
266 if (var->grayscale != fb->fb.var.grayscale || in clcdfb_check()
267 (var->vmode & FB_VMODE_MASK) != FB_VMODE_NONINTERLACED) in clcdfb_check()
270 #define CHECK(e) (var->e != fb->fb.var.e) in clcdfb_check()
286 var->nonstd = 0; in clcdfb_check()
287 var->accel_flags = 0; in clcdfb_check()