• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/video/

Lines Matching defs:var

451 static int tdfxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
456 if (var->bits_per_pixel != 8 && var->bits_per_pixel != 16 &&
457 var->bits_per_pixel != 24 && var->bits_per_pixel != 32) {
458 DPRINTK("depth not supported: %u\n", var->bits_per_pixel);
462 if (var->xres != var->xres_virtual)
463 var->xres_virtual = var->xres;
465 if (var->yres > var->yres_virtual)
466 var->yres_virtual = var->yres;
468 if (var->xoffset) {
472 var->yoffset = 0;
480 if (((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) &&
487 info->monspecs.dclkmax && fb_validate_mode(var, info) < 0) {
492 var->xres = (var->xres + 15) & ~15; /* could sometimes be 8 */
493 lpitch = var->xres * ((var->bits_per_pixel + 7) >> 3);
495 if (var->xres < 320 || var->xres > 2048) {
496 DPRINTK("width not supported: %u\n", var->xres);
500 if (var->yres < 200 || var->yres > 2048) {
501 DPRINTK("height not supported: %u\n", var->yres);
505 if (lpitch * var->yres_virtual > info->fix.smem_len) {
506 var->yres_virtual = info->fix.smem_len / lpitch;
507 if (var->yres_virtual < var->yres) {
509 var->xres, var->yres_virtual,
510 var->bits_per_pixel);
515 if (PICOS2KHZ(var->pixclock) > par->max_pixclock) {
517 PICOS2KHZ(var->pixclock));
521 var->transp.offset = 0;
522 var->transp.length = 0;
523 switch (var->bits_per_pixel) {
525 var->red.length = 8;
526 var->red.offset = 0;
527 var->green = var->red;
528 var->blue = var->red;
531 var->red.offset = 11;
532 var->red.length = 5;
533 var->green.offset = 5;
534 var->green.length = 6;
535 var->blue.offset = 0;
536 var->blue.length = 5;
539 var->transp.offset = 24;
540 var->transp.length = 8;
542 var->red.offset = 16;
543 var->green.offset = 8;
544 var->blue.offset = 0;
545 var->red.length = var->green.length = var->blue.length = 8;
548 var->width = -1;
549 var->height = -1;
551 var->accel_flags = FB_ACCELF_TEXT;
554 var->xres, var->yres, var->bits_per_pixel);
561 u32 hdispend = info->var.xres;
562 u32 hsyncsta = hdispend + info->var.right_margin;
563 u32 hsyncend = hsyncsta + info->var.hsync_len;
564 u32 htotal = hsyncend + info->var.left_margin;
570 u32 cpp = (info->var.bits_per_pixel + 7) >> 3;
580 freq = PICOS2KHZ(info->var.pixclock);
602 if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
603 vd = (info->var.yres << 1) - 1;
604 vs = vd + (info->var.lower_margin << 1);
605 ve = vs + (info->var.vsync_len << 1);
606 vt = ve + (info->var.upper_margin << 1) - 1;
607 reg.screensize = info->var.xres | (info->var.yres << 13);
611 vd = info->var.yres - 1;
612 vs = vd + info->var.lower_margin;
613 ve = vs + info->var.vsync_len;
614 vt = ve + info->var.upper_margin - 1;
615 reg.screensize = info->var.xres | (info->var.yres << 12);
623 (info->var.xres < 400 ? 0xa0 :
624 info->var.xres < 480 ? 0x60 :
625 info->var.xres < 768 ? 0xe0 : 0x20);
708 reg.stride = info->var.xres * cpp;
709 reg.startaddr = info->var.yoffset * reg.stride
710 + info->var.xoffset * cpp;
714 if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED)
719 switch (info->var.bits_per_pixel) {
739 info->fix.visual = (info->var.bits_per_pixel == 8)
743 info->var.xres, info->var.yres, info->var.bits_per_pixel);
761 if (info->var.grayscale) {
778 rgbcol = (CNVT_TOHW(red, info->var.red.length) <<
779 info->var.red.offset) |
780 (CNVT_TOHW(green, info->var.green.length) <<
781 info->var.green.offset) |
782 (CNVT_TOHW(blue, info->var.blue.length) <<
783 info->var.blue.offset) |
784 (CNVT_TOHW(transp, info->var.transp.length) <<
785 info->var.transp.offset);
791 DPRINTK("bad depth %u\n", info->var.bits_per_pixel);
834 * Set the starting position of the visible screen to var->yoffset
836 static int tdfxfb_pan_display(struct fb_var_screeninfo *var,
840 u32 addr = var->yoffset * info->fix.line_length;
842 if (nopan || var->xoffset)
859 u32 bpp = info->var.bits_per_pixel;
903 u32 bpp = info->var.bits_per_pixel;
962 u32 bpp = info->var.bits_per_pixel;
1099 int y = cursor->image.dy - info->var.yoffset;
1495 info->var.bits_per_pixel = 8;
1511 fb_videomode_to_var(&info->var, m);
1512 /* fill all other info->var's fields */
1513 if (tdfxfb_check_var(&info->var, info) < 0)
1514 info->var = tdfx_var;
1525 err = fb_find_mode(&info->var, info, mode_option,
1527 NULL, info->var.bits_per_pixel);
1529 info->var = tdfx_var;
1538 lpitch = info->var.xres_virtual * ((info->var.bits_per_pixel + 7) >> 3);
1539 info->var.yres_virtual = info->fix.smem_len / lpitch;
1540 if (info->var.yres_virtual < info->var.yres)