Lines Matching refs:var
991 if (sfb->fb->var.bits_per_pixel == 16) { in smtc_setcolreg()
994 val = chan_to_field(red, &sfb->fb->var.red); in smtc_setcolreg()
995 val |= chan_to_field(green, &sfb->fb->var.green); in smtc_setcolreg()
996 val |= chan_to_field(blue, &sfb->fb->var.blue); in smtc_setcolreg()
1001 val = chan_to_field(red, &sfb->fb->var.red); in smtc_setcolreg()
1002 val |= chan_to_field(green, &sfb->fb->var.green); in smtc_setcolreg()
1003 val |= chan_to_field(blue, &sfb->fb->var.blue); in smtc_setcolreg()
1164 sfb->width, sfb->height, sfb->fb->var.bits_per_pixel, sfb->hz); in sm7xx_set_timing()
1169 vgamode[j].bpp != sfb->fb->var.bits_per_pixel || in sm7xx_set_timing()
1242 m_nscreenstride = (sfb->width * sfb->fb->var.bits_per_pixel) / 64; in sm7xx_set_timing()
1243 switch (sfb->fb->var.bits_per_pixel) { in sm7xx_set_timing()
1274 switch (sfb->fb->var.bits_per_pixel) { in smtcfb_setmode()
1277 sfb->fb->fix.line_length = sfb->fb->var.xres * 4; in smtcfb_setmode()
1278 sfb->fb->var.red.length = 8; in smtcfb_setmode()
1279 sfb->fb->var.green.length = 8; in smtcfb_setmode()
1280 sfb->fb->var.blue.length = 8; in smtcfb_setmode()
1281 sfb->fb->var.red.offset = 16; in smtcfb_setmode()
1282 sfb->fb->var.green.offset = 8; in smtcfb_setmode()
1283 sfb->fb->var.blue.offset = 0; in smtcfb_setmode()
1287 sfb->fb->fix.line_length = sfb->fb->var.xres * 3; in smtcfb_setmode()
1288 sfb->fb->var.red.length = 8; in smtcfb_setmode()
1289 sfb->fb->var.green.length = 8; in smtcfb_setmode()
1290 sfb->fb->var.blue.length = 8; in smtcfb_setmode()
1291 sfb->fb->var.red.offset = 16; in smtcfb_setmode()
1292 sfb->fb->var.green.offset = 8; in smtcfb_setmode()
1293 sfb->fb->var.blue.offset = 0; in smtcfb_setmode()
1297 sfb->fb->fix.line_length = sfb->fb->var.xres; in smtcfb_setmode()
1298 sfb->fb->var.red.length = 3; in smtcfb_setmode()
1299 sfb->fb->var.green.length = 3; in smtcfb_setmode()
1300 sfb->fb->var.blue.length = 2; in smtcfb_setmode()
1301 sfb->fb->var.red.offset = 5; in smtcfb_setmode()
1302 sfb->fb->var.green.offset = 2; in smtcfb_setmode()
1303 sfb->fb->var.blue.offset = 0; in smtcfb_setmode()
1308 sfb->fb->fix.line_length = sfb->fb->var.xres * 2; in smtcfb_setmode()
1309 sfb->fb->var.red.length = 5; in smtcfb_setmode()
1310 sfb->fb->var.green.length = 6; in smtcfb_setmode()
1311 sfb->fb->var.blue.length = 5; in smtcfb_setmode()
1312 sfb->fb->var.red.offset = 11; in smtcfb_setmode()
1313 sfb->fb->var.green.offset = 5; in smtcfb_setmode()
1314 sfb->fb->var.blue.offset = 0; in smtcfb_setmode()
1318 sfb->width = sfb->fb->var.xres; in smtcfb_setmode()
1319 sfb->height = sfb->fb->var.yres; in smtcfb_setmode()
1324 static int smtc_check_var(struct fb_var_screeninfo *var, struct fb_info *info) in smtc_check_var() argument
1327 if (var->xres_virtual < var->xres) in smtc_check_var()
1328 var->xres_virtual = var->xres; in smtc_check_var()
1330 if (var->yres_virtual < var->yres) in smtc_check_var()
1331 var->yres_virtual = var->yres; in smtc_check_var()
1334 if ((var->bits_per_pixel != 8) && (var->bits_per_pixel != 16) && in smtc_check_var()
1335 (var->bits_per_pixel != 24) && (var->bits_per_pixel != 32)) in smtc_check_var()
1336 var->bits_per_pixel = 16; in smtc_check_var()
1385 if (sfb->fb->var.bits_per_pixel == 32) in smtc_map_smem()
1461 sfb->fb->var.xres = smtc_scr_info.lfb_width; in sm7xx_resolution_probe()
1462 sfb->fb->var.yres = smtc_scr_info.lfb_height; in sm7xx_resolution_probe()
1463 sfb->fb->var.bits_per_pixel = smtc_scr_info.lfb_depth; in sm7xx_resolution_probe()
1473 sfb->fb->var.xres = SCREEN_X_RES; in sm7xx_resolution_probe()
1474 sfb->fb->var.yres = SCREEN_Y_RES_PC; in sm7xx_resolution_probe()
1475 sfb->fb->var.bits_per_pixel = SCREEN_BPP; in sm7xx_resolution_probe()
1487 sfb->fb->var.yres = SCREEN_Y_RES_NETBOOK; in sm7xx_resolution_probe()
1491 big_pixel_depth(sfb->fb->var.bits_per_pixel, smtc_scr_info.lfb_depth); in sm7xx_resolution_probe()
1530 info->var = smtcfb_var; in smtcfb_pci_probe()
1564 if (sfb->fb->var.bits_per_pixel == 32) { in smtcfb_pci_probe()
1576 if (sfb->fb->var.bits_per_pixel == 32) in smtcfb_pci_probe()
1611 if (sfb->fb->var.bits_per_pixel == 15) in smtcfb_pci_probe()
1612 sfb->fb->var.bits_per_pixel = 16; in smtcfb_pci_probe()
1614 sfb->fb->var.xres_virtual = sfb->fb->var.xres; in smtcfb_pci_probe()
1615 sfb->fb->var.yres_virtual = sfb->fb->var.yres; in smtcfb_pci_probe()
1632 sfb->chip_id, sfb->chip_rev_id, sfb->fb->var.xres, in smtcfb_pci_probe()
1633 sfb->fb->var.yres, sfb->fb->var.bits_per_pixel); in smtcfb_pci_probe()
1718 if (sfb->fb->var.bits_per_pixel == 32) in smtcfb_pci_resume()