Lines Matching +full:panel +full:- +full:width +full:- +full:mm

2  * linux/include/asm-arm/hardware/amba_clcd.h -- Integrator LCD panel.
13 #include <linux/amba/clcd-regs.h>
45 signed short width; /* width in mm */ member
46 signed short height; /* height in mm */
58 * and the panel we need to know this and not try to
76 * the board-type specific routines
93 * Compulsory. Decode fb->fb.var into regs->*. In the case of
94 * fixed timing, set regs->* to the register values required.
132 struct clcd_panel *panel; member
145 struct fb_var_screeninfo *var = &fb->fb.var; in clcdfb_decode()
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()
155 regs->tim0 = val; in clcdfb_decode()
157 val = var->yres; in clcdfb_decode()
158 if (fb->panel->cntl & CNTL_LCDDUAL) in clcdfb_decode()
160 val -= 1; 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()
164 regs->tim1 = val; in clcdfb_decode()
166 val = fb->panel->tim2; 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()
171 if (fb->panel->cntl & CNTL_LCDTFT) /* TFT */ in clcdfb_decode()
173 else if (!var->grayscale) /* STN color */ in clcdfb_decode()
175 else if (fb->panel->cntl & CNTL_LCDMONO8) /* STN monochrome, 8bit */ in clcdfb_decode()
180 regs->tim2 = val | ((cpl - 1) << 16); in clcdfb_decode()
182 regs->tim3 = fb->panel->tim3; in clcdfb_decode()
184 val = fb->panel->cntl; 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()
190 * if board and panel supply capabilities, we can support in clcdfb_decode()
198 if (var->red.offset == 0) in clcdfb_decode()
202 if (fb->panel->bgr_connection) in clcdfb_decode()
206 switch (var->bits_per_pixel) { in clcdfb_decode()
225 if (amba_part(fb->dev) == 0x110 || in clcdfb_decode()
226 var->green.length == 5) in clcdfb_decode()
228 else if (var->green.length == 6) in clcdfb_decode()
238 regs->cntl = val; in clcdfb_decode()
239 regs->pixclock = var->pixclock; in clcdfb_decode()
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()
256 return -EINVAL; in clcdfb_check()
259 /* single panel mode: PCD = max(PCD, 1) */ in clcdfb_check()
260 /* dual panel mode: PCD = max(PCD, 5) */ in clcdfb_check()
264 * we can only do non-interlaced video. 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()
268 return -EINVAL; in clcdfb_check()
270 #define CHECK(e) (var->e != fb->fb.var.e) in clcdfb_check()
271 if (fb->panel->fixedtimings && in clcdfb_check()
283 return -EINVAL; in clcdfb_check()
286 var->nonstd = 0; in clcdfb_check()
287 var->accel_flags = 0; in clcdfb_check()