Lines Matching refs:info

59  *				configuration info now)
260 static int banshee_wait_idle(struct fb_info *info)
262 struct tdfx_par *par = info->par;
337 static void do_write_regs(struct fb_info *info, struct banshee_reg *reg)
339 struct tdfx_par *par = info->par;
342 banshee_wait_idle(info);
399 banshee_wait_idle(info);
435 static int tdfxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
437 struct tdfx_par *par = info->par;
470 if (info->monspecs.hfmax && info->monspecs.vfmax &&
471 info->monspecs.dclkmax && fb_validate_mode(var, info) < 0) {
489 if (lpitch * var->yres_virtual > info->fix.smem_len) {
490 var->yres_virtual = info->fix.smem_len / lpitch;
543 static int tdfxfb_set_par(struct fb_info *info)
545 struct tdfx_par *par = info->par;
546 u32 hdispend = info->var.xres;
547 u32 hsyncsta = hdispend + info->var.right_margin;
548 u32 hsyncend = hsyncsta + info->var.hsync_len;
549 u32 htotal = hsyncend + info->var.left_margin;
555 u32 cpp = (info->var.bits_per_pixel + 7) >> 3;
565 freq = PICOS2KHZ(info->var.pixclock);
587 if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
588 vd = (info->var.yres << 1) - 1;
589 vs = vd + (info->var.lower_margin << 1);
590 ve = vs + (info->var.vsync_len << 1);
591 vt = ve + (info->var.upper_margin << 1) - 1;
592 reg.screensize = info->var.xres | (info->var.yres << 13);
596 vd = info->var.yres - 1;
597 vs = vd + info->var.lower_margin;
598 ve = vs + info->var.vsync_len;
599 vt = ve + info->var.upper_margin - 1;
600 reg.screensize = info->var.xres | (info->var.yres << 12);
608 (info->var.xres < 400 ? 0xa0 :
609 info->var.xres < 480 ? 0x60 :
610 info->var.xres < 768 ? 0xe0 : 0x20);
686 reg.curspataddr = info->fix.smem_len;
693 reg.stride = info->var.xres * cpp;
694 reg.startaddr = info->var.yoffset * reg.stride
695 + info->var.xoffset * cpp;
703 if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED)
708 switch (info->var.bits_per_pixel) {
724 do_write_regs(info, &reg);
727 info->fix.line_length = reg.stride;
728 info->fix.visual = (info->var.bits_per_pixel == 8)
732 info->var.xres, info->var.yres, info->var.bits_per_pixel);
741 struct fb_info *info)
743 struct tdfx_par *par = info->par;
746 if (regno >= info->cmap.len || regno > 255)
750 if (info->var.grayscale) {
757 switch (info->fix.visual) {
767 rgbcol = (CNVT_TOHW(red, info->var.red.length) <<
768 info->var.red.offset) |
769 (CNVT_TOHW(green, info->var.green.length) <<
770 info->var.green.offset) |
771 (CNVT_TOHW(blue, info->var.blue.length) <<
772 info->var.blue.offset) |
773 (CNVT_TOHW(transp, info->var.transp.length) <<
774 info->var.transp.offset);
780 DPRINTK("bad depth %u\n", info->var.bits_per_pixel);
788 static int tdfxfb_blank(int blank, struct fb_info *info)
790 struct tdfx_par *par = info->par;
826 struct fb_info *info)
828 struct tdfx_par *par = info->par;
829 u32 addr = var->yoffset * info->fix.line_length;
844 static void tdfxfb_fillrect(struct fb_info *info,
847 struct tdfx_par *par = info->par;
848 u32 bpp = info->var.bits_per_pixel;
849 u32 stride = info->fix.line_length;
873 if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR) {
887 static void tdfxfb_copyarea(struct fb_info *info,
890 struct tdfx_par *par = info->par;
892 u32 bpp = info->var.bits_per_pixel;
893 u32 stride = info->fix.line_length;
945 static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image)
947 struct tdfx_par *par = info->par;
950 int i, stride = info->fix.line_length;
951 u32 bpp = info->var.bits_per_pixel;
965 cfb_imageblit(info, image);
970 switch (info->fix.visual) {
1040 static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1042 struct tdfx_par *par = info->par;
1070 struct fb_cmap cmap = info->cmap;
1088 int y = cursor->image.dy - info->var.yoffset;
1114 u8 __iomem *cursorbase = info->screen_base + info->fix.smem_len;
1320 static void tdfxfb_create_i2c_busses(struct fb_info *info)
1322 struct tdfx_par *par = info->par;
1330 tdfxfb_setup_ddc_bus(&par->chan[0], "Voodoo3-DDC", info->device);
1331 tdfxfb_setup_i2c_bus(&par->chan[1], "Voodoo3-I2C", info->device);
1375 struct fb_info *info;
1390 info = framebuffer_alloc(sizeof(struct tdfx_par), &pdev->dev);
1392 if (!info)
1395 default_par = info->par;
1396 info->fix = tdfx_fix;
1401 strcpy(info->fix.id, "3Dfx Banshee");
1405 strcpy(info->fix.id, "3Dfx Voodoo3");
1409 strcpy(info->fix.id, "3Dfx Voodoo5");
1414 info->fix.mmio_start = pci_resource_start(pdev, 0);
1415 info->fix.mmio_len = pci_resource_len(pdev, 0);
1416 if (!request_mem_region(info->fix.mmio_start, info->fix.mmio_len,
1423 ioremap(info->fix.mmio_start, info->fix.mmio_len);
1426 info->fix.id);
1430 info->fix.smem_start = pci_resource_start(pdev, 1);
1431 info->fix.smem_len = do_lfb_size(default_par, pdev->device);
1432 if (!info->fix.smem_len) {
1433 printk(KERN_ERR "fb: Can't count %s memory.\n", info->fix.id);
1437 if (!request_mem_region(info->fix.smem_start,
1443 info->screen_base = ioremap_wc(info->fix.smem_start,
1444 info->fix.smem_len);
1445 if (!info->screen_base) {
1447 info->fix.id);
1459 printk(KERN_INFO "fb: %s memory = %dK\n", info->fix.id,
1460 info->fix.smem_len >> 10);
1463 default_par->wc_cookie= arch_phys_wc_add(info->fix.smem_start,
1464 info->fix.smem_len);
1466 info->fix.ypanstep = nopan ? 0 : 1;
1467 info->fix.ywrapstep = nowrap ? 0 : 1;
1469 info->fbops = &tdfxfb_ops;
1470 info->pseudo_palette = default_par->palette;
1471 info->flags = FBINFO_HWACCEL_YPAN;
1473 info->flags |= FBINFO_HWACCEL_FILLRECT |
1481 info->fix.smem_len = (info->fix.smem_len - 1024) &
1483 specs = &info->monspecs;
1485 info->var.bits_per_pixel = 8;
1487 tdfxfb_create_i2c_busses(info);
1498 &info->modelist);
1499 m = fb_find_best_display(specs, &info->modelist);
1501 fb_videomode_to_var(&info->var, m);
1502 /* fill all other info->var's fields */
1503 if (tdfxfb_check_var(&info->var, info) < 0)
1504 info->var = tdfx_var;
1515 err = fb_find_mode(&info->var, info, mode_option,
1517 NULL, info->var.bits_per_pixel);
1519 info->var = tdfx_var;
1528 lpitch = info->var.xres_virtual * ((info->var.bits_per_pixel + 7) >> 3);
1529 info->var.yres_virtual = info->fix.smem_len / lpitch;
1530 if (info->var.yres_virtual < info->var.yres)
1533 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) {
1538 if (register_framebuffer(info) < 0) {
1540 fb_dealloc_cmap(&info->cmap);
1546 pci_set_drvdata(pdev, info);
1557 if (info->screen_base)
1558 iounmap(info->screen_base);
1559 release_mem_region(info->fix.smem_start, pci_resource_len(pdev, 1));
1566 release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
1568 framebuffer_release(info);
1609 struct fb_info *info = pci_get_drvdata(pdev);
1610 struct tdfx_par *par = info->par;
1612 unregister_framebuffer(info);
1618 iounmap(info->screen_base);
1627 fb_dealloc_cmap(&info->cmap);
1628 framebuffer_release(info);