Lines Matching refs:info

237 static int atyfb_open(struct fb_info *info, int user);
238 static int atyfb_release(struct fb_info *info, int user);
240 struct fb_info *info);
241 static int atyfb_set_par(struct fb_info *info);
243 u_int transp, struct fb_info *info);
245 struct fb_info *info);
246 static int atyfb_blank(int blank, struct fb_info *info);
247 static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg);
249 static int atyfb_compat_ioctl(struct fb_info *info, u_int cmd, u_long arg)
251 return atyfb_ioctl(info, cmd, (u_long)compat_ptr(arg));
256 static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
258 static int atyfb_sync(struct fb_info *info);
264 static int aty_init(struct fb_info *info);
269 static int aty_var_to_crtc(const struct fb_info *info,
274 static void set_off_pitch(struct atyfb_par *par, const struct fb_info *info);
444 static void aty_fudge_framebuffer_len(struct fb_info *info)
446 struct atyfb_par *par = (struct atyfb_par *) info->par;
449 (info->fix.smem_len == 0x800000 ||
450 (par->bus_type == ISA && info->fix.smem_len == 0x400000)))
451 info->fix.smem_len -= GUI_RESERVE;
755 aty_init_engine(par, info);
814 static int aty_var_to_crtc(const struct fb_info *info,
818 struct atyfb_par *par = (struct atyfb_par *) info->par;
883 if (vyres * line_length > info->fix.smem_len)
1302 static int atyfb_set_par(struct fb_info *info)
1304 struct atyfb_par *par = (struct atyfb_par *) info->par;
1305 struct fb_var_screeninfo *var = &info->var;
1315 err = aty_var_to_crtc(info, var, &par->crtc);
1325 err = par->pll_ops->var_to_pll(info, pixclock,
1335 info->flags &= ~FBINFO_HWACCEL_DISABLED;
1338 info->flags |= FBINFO_HWACCEL_DISABLED;
1345 par->dac_ops->set_dac(info, &par->pll,
1347 par->pll_ops->set_pll(info, &par->pll);
1351 pixclock_in_ps = par->pll_ops->pll_to_var(info, &par->pll);
1454 info->fix.line_length = calc_line_length(par, var->xres_virtual,
1457 info->fix.visual = var->bits_per_pixel <= 8 ?
1462 aty_init_engine(par, info);
1465 btext_update_display(info->fix.smem_start,
1533 static int atyfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
1535 struct atyfb_par *par = (struct atyfb_par *) info->par;
1543 err = aty_var_to_crtc(info, var, &crtc);
1554 err = par->pll_ops->var_to_pll(info, pixclock,
1561 info->var.accel_flags = FB_ACCELF_TEXT;
1563 info->var.accel_flags = 0;
1566 var->pixclock = par->pll_ops->pll_to_var(info, &pll);
1570 static void set_off_pitch(struct atyfb_par *par, const struct fb_info *info)
1572 u32 xoffset = info->var.xoffset;
1573 u32 yoffset = info->var.yoffset;
1574 u32 line_length = info->fix.line_length;
1575 u32 bpp = info->var.bits_per_pixel;
1587 static int atyfb_open(struct fb_info *info, int user)
1589 struct atyfb_par *par = (struct atyfb_par *) info->par;
1680 static int atyfb_release(struct fb_info *info, int user)
1682 struct atyfb_par *par = (struct atyfb_par *) info->par;
1717 u32 videoram = (info->fix.smem_len - (PAGE_SIZE << 2));
1738 struct fb_info *info)
1740 struct atyfb_par *par = (struct atyfb_par *) info->par;
1752 info->var.xoffset = xoffset;
1753 info->var.yoffset = yoffset;
1757 set_off_pitch(par, info);
1824 static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
1826 struct atyfb_par *par = (struct atyfb_par *) info->par;
1837 fbtyp.fb_depth = info->var.bits_per_pixel;
1838 fbtyp.fb_cmsize = info->cmap.len;
1839 fbtyp.fb_size = info->fix.smem_len;
1902 /*aty_calc_pll_ct(info, &pll->ct);*/
1903 aty_set_pll_ct(info, pll);
1922 static int atyfb_sync(struct fb_info *info)
1924 struct atyfb_par *par = (struct atyfb_par *) info->par;
1932 static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
1934 struct atyfb_par *par = (struct atyfb_par *) info->par;
1951 if (((vma->vm_pgoff == 0) && (size == info->fix.smem_len)) ||
1952 ((off == info->fix.smem_len) && (size == PAGE_SIZE)))
2066 struct fb_info *info = pci_get_drvdata(pdev);
2067 struct atyfb_par *par = (struct atyfb_par *) info->par;
2074 fb_set_suspend(info, 1);
2081 atyfb_blank(FB_BLANK_POWERDOWN, info);
2097 atyfb_blank(FB_BLANK_UNBLANK, info);
2098 fb_set_suspend(info, 0);
2126 static void aty_resume_chip(struct fb_info *info)
2128 struct atyfb_par *par = info->par;
2133 par->pll_ops->resume_pll(info, &par->pll);
2143 struct fb_info *info = pci_get_drvdata(pdev);
2144 struct atyfb_par *par = (struct atyfb_par *) info->par;
2163 aty_resume_chip(info);
2168 atyfb_set_par(info);
2171 fb_set_suspend(info, 0);
2175 atyfb_blank(FB_BLANK_UNBLANK, info);
2203 struct fb_info *info = pci_get_drvdata(par->pdev);
2208 atylevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL;
2244 struct fb_info *info = pci_get_drvdata(par->pdev);
2253 snprintf(name, sizeof(name), "atybl%d", info->node);
2258 bd = backlight_device_register(name, info->device, par, &aty_bl_data,
2261 info->bl_dev = NULL;
2266 info->bl_dev = bd;
2267 fb_bl_default_curve(info, 0,
2353 static int aty_init(struct fb_info *info)
2355 struct atyfb_par *par = (struct atyfb_par *) info->par;
2491 par->pll_ops->get_pll(info, &par->saved_pll);
2499 info->fix.smem_len = 0x80000;
2502 info->fix.smem_len = 0x100000;
2505 info->fix.smem_len = 0x200000;
2508 info->fix.smem_len = 0x400000;
2511 info->fix.smem_len = 0x600000;
2514 info->fix.smem_len = 0x800000;
2517 info->fix.smem_len = 0x80000;
2521 info->fix.smem_len = 0x80000;
2524 info->fix.smem_len = 0x100000;
2527 info->fix.smem_len = 0x200000;
2530 info->fix.smem_len = 0x400000;
2533 info->fix.smem_len = 0x600000;
2536 info->fix.smem_len = 0x800000;
2539 info->fix.smem_len = 0x80000;
2544 info->fix.smem_len += 0x400000;
2548 info->fix.smem_len = vram * 1024;
2550 if (info->fix.smem_len <= 0x80000)
2552 else if (info->fix.smem_len <= 0x100000)
2554 else if (info->fix.smem_len <= 0x200000)
2556 else if (info->fix.smem_len <= 0x400000)
2558 else if (info->fix.smem_len <= 0x600000)
2570 info->fix.mmio_len = 0x400;
2571 info->fix.accel = FB_ACCEL_ATI_MACH64GX;
2573 info->fix.mmio_len = 0x400;
2574 info->fix.accel = FB_ACCEL_ATI_MACH64CT;
2576 info->fix.mmio_start -= 0x400;
2577 info->fix.mmio_len = 0x800;
2578 info->fix.accel = FB_ACCEL_ATI_MACH64VT;
2580 info->fix.mmio_start -= 0x400;
2581 info->fix.mmio_len = 0x800;
2582 info->fix.accel = FB_ACCEL_ATI_MACH64GT;
2586 info->fix.smem_len == 0x80000 ? 512 : (info->fix.smem_len>>20),
2587 info->fix.smem_len == 0x80000 ? 'K' : 'M', ramname, xtal,
2615 par->pll_ops->init_pll(info, &par->pll);
2617 par->pll_ops->resume_pll(info, &par->pll);
2619 aty_fudge_framebuffer_len(info);
2638 info->fbops = &atyfb_ops;
2639 info->pseudo_palette = par->pseudo_palette;
2640 info->flags = FBINFO_HWACCEL_IMAGEBLIT |
2665 if (mac_find_mode(&var, info, mode, 8))
2701 if (mode && fb_find_mode(&var, info, mode, NULL, 0, &defmode, 8))
2720 u32 videoram = (info->fix.smem_len - (PAGE_SIZE << 2));
2726 ret = atyfb_check_var(&var, info);
2734 aty_init_cursor(info, &atyfb_ops);
2736 info->var = var;
2738 ret = fb_alloc_cmap(&info->cmap, 256, 0);
2742 ret = register_framebuffer(info);
2744 fb_dealloc_cmap(&info->cmap);
2754 fb_list = info;
2757 info->node, info->fix.id, par->bus_type == ISA ? "ISA" : "PCI");
2763 par->pll_ops->set_pll(info, &par->saved_pll);
2804 static int atyfb_blank(int blank, struct fb_info *info)
2806 struct atyfb_par *par = (struct atyfb_par *) info->par;
2870 u_int transp, struct fb_info *info)
2872 struct atyfb_par *par = (struct atyfb_par *) info->par;
2874 u32 *pal = info->pseudo_palette;
2876 depth = info->var.bits_per_pixel;
2878 depth = (info->var.green.length == 5) ? 15 : 16;
2944 static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info,
2947 struct atyfb_par *par = info->par;
2956 info->fix.mmio_start = addr + 0x7ffc00UL;
2961 info->screen_base = (char *) (addr + 0x800000UL);
2962 info->fix.smem_start = addr + 0x800000UL;
3423 static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info,
3426 struct atyfb_par *par = info->par;
3442 info->fix.mmio_start = raddr;
3448 par->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000);
3450 par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000);
3455 info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00;
3473 info->fix.smem_start = addr;
3486 info->fix.smem_len = 0x800000;
3488 aty_fudge_framebuffer_len(info);
3490 info->screen_base = ioremap_wc(info->fix.smem_start,
3491 info->fix.smem_len);
3492 if (info->screen_base == NULL) {
3513 if (info->screen_base) {
3514 iounmap(info->screen_base);
3515 info->screen_base = NULL;
3526 struct fb_info *info;
3556 info = framebuffer_alloc(sizeof(struct atyfb_par), &pdev->dev);
3557 if (!info)
3560 par = info->par;
3562 info->fix = atyfb_fix;
3563 info->device = &pdev->dev;
3570 /* Setup "info" structure */
3572 rc = atyfb_setup_sparc(pdev, info, addr);
3574 rc = atyfb_setup_generic(pdev, info, addr);
3579 pci_set_drvdata(pdev, info);
3582 rc = aty_init(info);
3591 par->mmap_map[0].poff = (unsigned long) info->screen_base & PAGE_MASK;
3592 par->mmap_map[0].size = info->fix.smem_len;
3595 par->mmap_map[1].voff = par->mmap_map[0].voff + info->fix.smem_len;
3604 reboot_info = info;
3615 if (info->screen_base)
3616 iounmap(info->screen_base);
3623 framebuffer_release(info);
3635 struct fb_info *info;
3648 info = framebuffer_alloc(sizeof(struct atyfb_par), NULL);
3649 if (!info)
3652 par = info->par;
3654 info->fix = atyfb_fix;
3662 info->screen_base = ioremap_wc(phys_vmembase[m64_num],
3664 info->fix.smem_start = (unsigned long)info->screen_base; /* Fake! */
3667 info->fix.mmio_start = (unsigned long)par->ati_regbase; /* Fake! */
3699 if (correct_chipset(par) || aty_init(info)) {
3700 iounmap(info->screen_base);
3702 framebuffer_release(info);
3715 static void atyfb_remove(struct fb_info *info)
3717 struct atyfb_par *par = (struct atyfb_par *) info->par;
3721 par->pll_ops->set_pll(info, &par->saved_pll);
3725 aty_bl_exit(info->bl_dev);
3728 unregister_framebuffer(info);
3735 if (info->screen_base)
3736 iounmap(info->screen_base);
3738 if (info->sprite.addr)
3739 iounmap(info->sprite.addr);
3751 framebuffer_release(info);
3757 struct fb_info *info = pci_get_drvdata(pdev);
3760 if (reboot_info == info)
3764 atyfb_remove(info);