Lines Matching refs:info

59  *				configuration info now)
261 static int banshee_wait_idle(struct fb_info *info)
263 struct tdfx_par *par = info->par;
338 static void do_write_regs(struct fb_info *info, struct banshee_reg *reg)
340 struct tdfx_par *par = info->par;
343 banshee_wait_idle(info);
400 banshee_wait_idle(info);
436 static int tdfxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
438 struct tdfx_par *par = info->par;
471 if (info->monspecs.hfmax && info->monspecs.vfmax &&
472 info->monspecs.dclkmax && fb_validate_mode(var, info) < 0) {
490 if (lpitch * var->yres_virtual > info->fix.smem_len) {
491 var->yres_virtual = info->fix.smem_len / lpitch;
544 static int tdfxfb_set_par(struct fb_info *info)
546 struct tdfx_par *par = info->par;
547 u32 hdispend = info->var.xres;
548 u32 hsyncsta = hdispend + info->var.right_margin;
549 u32 hsyncend = hsyncsta + info->var.hsync_len;
550 u32 htotal = hsyncend + info->var.left_margin;
556 u32 cpp = (info->var.bits_per_pixel + 7) >> 3;
566 freq = PICOS2KHZ(info->var.pixclock);
588 if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
589 vd = (info->var.yres << 1) - 1;
590 vs = vd + (info->var.lower_margin << 1);
591 ve = vs + (info->var.vsync_len << 1);
592 vt = ve + (info->var.upper_margin << 1) - 1;
593 reg.screensize = info->var.xres | (info->var.yres << 13);
597 vd = info->var.yres - 1;
598 vs = vd + info->var.lower_margin;
599 ve = vs + info->var.vsync_len;
600 vt = ve + info->var.upper_margin - 1;
601 reg.screensize = info->var.xres | (info->var.yres << 12);
609 (info->var.xres < 400 ? 0xa0 :
610 info->var.xres < 480 ? 0x60 :
611 info->var.xres < 768 ? 0xe0 : 0x20);
687 reg.curspataddr = info->fix.smem_len;
694 reg.stride = info->var.xres * cpp;
695 reg.startaddr = info->var.yoffset * reg.stride
696 + info->var.xoffset * cpp;
704 if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED)
709 switch (info->var.bits_per_pixel) {
725 do_write_regs(info, &reg);
728 info->fix.line_length = reg.stride;
729 info->fix.visual = (info->var.bits_per_pixel == 8)
733 info->var.xres, info->var.yres, info->var.bits_per_pixel);
742 struct fb_info *info)
744 struct tdfx_par *par = info->par;
747 if (regno >= info->cmap.len || regno > 255)
751 if (info->var.grayscale) {
758 switch (info->fix.visual) {
768 rgbcol = (CNVT_TOHW(red, info->var.red.length) <<
769 info->var.red.offset) |
770 (CNVT_TOHW(green, info->var.green.length) <<
771 info->var.green.offset) |
772 (CNVT_TOHW(blue, info->var.blue.length) <<
773 info->var.blue.offset) |
774 (CNVT_TOHW(transp, info->var.transp.length) <<
775 info->var.transp.offset);
781 DPRINTK("bad depth %u\n", info->var.bits_per_pixel);
789 static int tdfxfb_blank(int blank, struct fb_info *info)
791 struct tdfx_par *par = info->par;
827 struct fb_info *info)
829 struct tdfx_par *par = info->par;
830 u32 addr = var->yoffset * info->fix.line_length;
845 static void tdfxfb_fillrect(struct fb_info *info,
848 struct tdfx_par *par = info->par;
849 u32 bpp = info->var.bits_per_pixel;
850 u32 stride = info->fix.line_length;
874 if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR) {
888 static void tdfxfb_copyarea(struct fb_info *info,
891 struct tdfx_par *par = info->par;
893 u32 bpp = info->var.bits_per_pixel;
894 u32 stride = info->fix.line_length;
946 static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image)
948 struct tdfx_par *par = info->par;
951 int i, stride = info->fix.line_length;
952 u32 bpp = info->var.bits_per_pixel;
966 cfb_imageblit(info, image);
971 switch (info->fix.visual) {
1041 static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1043 struct tdfx_par *par = info->par;
1071 struct fb_cmap cmap = info->cmap;
1089 int y = cursor->image.dy - info->var.yoffset;
1115 u8 __iomem *cursorbase = info->screen_base + info->fix.smem_len;
1321 static void tdfxfb_create_i2c_busses(struct fb_info *info)
1323 struct tdfx_par *par = info->par;
1331 tdfxfb_setup_ddc_bus(&par->chan[0], "Voodoo3-DDC", info->dev);
1332 tdfxfb_setup_i2c_bus(&par->chan[1], "Voodoo3-I2C", info->dev);
1376 struct fb_info *info;
1387 info = framebuffer_alloc(sizeof(struct tdfx_par), &pdev->dev);
1389 if (!info)
1392 default_par = info->par;
1393 info->fix = tdfx_fix;
1398 strcpy(info->fix.id, "3Dfx Banshee");
1402 strcpy(info->fix.id, "3Dfx Voodoo3");
1406 strcpy(info->fix.id, "3Dfx Voodoo5");
1411 info->fix.mmio_start = pci_resource_start(pdev, 0);
1412 info->fix.mmio_len = pci_resource_len(pdev, 0);
1413 if (!request_mem_region(info->fix.mmio_start, info->fix.mmio_len,
1420 ioremap(info->fix.mmio_start, info->fix.mmio_len);
1423 info->fix.id);
1427 info->fix.smem_start = pci_resource_start(pdev, 1);
1428 info->fix.smem_len = do_lfb_size(default_par, pdev->device);
1429 if (!info->fix.smem_len) {
1430 printk(KERN_ERR "fb: Can't count %s memory.\n", info->fix.id);
1434 if (!request_mem_region(info->fix.smem_start,
1440 info->screen_base = ioremap_wc(info->fix.smem_start,
1441 info->fix.smem_len);
1442 if (!info->screen_base) {
1444 info->fix.id);
1456 printk(KERN_INFO "fb: %s memory = %dK\n", info->fix.id,
1457 info->fix.smem_len >> 10);
1460 default_par->wc_cookie= arch_phys_wc_add(info->fix.smem_start,
1461 info->fix.smem_len);
1463 info->fix.ypanstep = nopan ? 0 : 1;
1464 info->fix.ywrapstep = nowrap ? 0 : 1;
1466 info->fbops = &tdfxfb_ops;
1467 info->pseudo_palette = default_par->palette;
1468 info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
1470 info->flags |= FBINFO_HWACCEL_FILLRECT |
1478 info->fix.smem_len = (info->fix.smem_len - 1024) &
1480 specs = &info->monspecs;
1482 info->var.bits_per_pixel = 8;
1484 tdfxfb_create_i2c_busses(info);
1495 &info->modelist);
1496 m = fb_find_best_display(specs, &info->modelist);
1498 fb_videomode_to_var(&info->var, m);
1499 /* fill all other info->var's fields */
1500 if (tdfxfb_check_var(&info->var, info) < 0)
1501 info->var = tdfx_var;
1512 err = fb_find_mode(&info->var, info, mode_option,
1514 NULL, info->var.bits_per_pixel);
1516 info->var = tdfx_var;
1525 lpitch = info->var.xres_virtual * ((info->var.bits_per_pixel + 7) >> 3);
1526 info->var.yres_virtual = info->fix.smem_len / lpitch;
1527 if (info->var.yres_virtual < info->var.yres)
1530 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) {
1535 if (register_framebuffer(info) < 0) {
1537 fb_dealloc_cmap(&info->cmap);
1543 pci_set_drvdata(pdev, info);
1554 if (info->screen_base)
1555 iounmap(info->screen_base);
1556 release_mem_region(info->fix.smem_start, pci_resource_len(pdev, 1));
1563 release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
1565 framebuffer_release(info);
1606 struct fb_info *info = pci_get_drvdata(pdev);
1607 struct tdfx_par *par = info->par;
1609 unregister_framebuffer(info);
1615 iounmap(info->screen_base);
1624 fb_dealloc_cmap(&info->cmap);
1625 framebuffer_release(info);