Lines Matching refs:info
227 static int atyfb_open(struct fb_info *info, int user);
228 static int atyfb_release(struct fb_info *info, int user);
230 struct fb_info *info);
231 static int atyfb_set_par(struct fb_info *info);
233 u_int transp, struct fb_info *info);
235 struct fb_info *info);
236 static int atyfb_blank(int blank, struct fb_info *info);
237 static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg);
239 static int atyfb_compat_ioctl(struct fb_info *info, u_int cmd, u_long arg)
241 return atyfb_ioctl(info, cmd, (u_long)compat_ptr(arg));
246 static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
248 static int atyfb_sync(struct fb_info *info);
254 static int aty_init(struct fb_info *info);
259 static int aty_var_to_crtc(const struct fb_info *info,
264 static void set_off_pitch(struct atyfb_par *par, const struct fb_info *info);
434 static void aty_fudge_framebuffer_len(struct fb_info *info)
436 struct atyfb_par *par = (struct atyfb_par *) info->par;
439 (info->fix.smem_len == 0x800000 ||
440 (par->bus_type == ISA && info->fix.smem_len == 0x400000)))
441 info->fix.smem_len -= GUI_RESERVE;
745 aty_init_engine(par, info);
804 static int aty_var_to_crtc(const struct fb_info *info,
808 struct atyfb_par *par = (struct atyfb_par *) info->par;
873 if (vyres * line_length > info->fix.smem_len)
1292 static int atyfb_set_par(struct fb_info *info)
1294 struct atyfb_par *par = (struct atyfb_par *) info->par;
1295 struct fb_var_screeninfo *var = &info->var;
1305 err = aty_var_to_crtc(info, var, &par->crtc);
1315 err = par->pll_ops->var_to_pll(info, pixclock,
1325 info->flags &= ~FBINFO_HWACCEL_DISABLED;
1328 info->flags |= FBINFO_HWACCEL_DISABLED;
1335 par->dac_ops->set_dac(info, &par->pll,
1337 par->pll_ops->set_pll(info, &par->pll);
1341 pixclock_in_ps = par->pll_ops->pll_to_var(info, &par->pll);
1444 info->fix.line_length = calc_line_length(par, var->xres_virtual,
1447 info->fix.visual = var->bits_per_pixel <= 8 ?
1452 aty_init_engine(par, info);
1455 btext_update_display(info->fix.smem_start,
1523 static int atyfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
1525 struct atyfb_par *par = (struct atyfb_par *) info->par;
1533 err = aty_var_to_crtc(info, var, &crtc);
1544 err = par->pll_ops->var_to_pll(info, pixclock,
1551 info->var.accel_flags = FB_ACCELF_TEXT;
1553 info->var.accel_flags = 0;
1556 var->pixclock = par->pll_ops->pll_to_var(info, &pll);
1560 static void set_off_pitch(struct atyfb_par *par, const struct fb_info *info)
1562 u32 xoffset = info->var.xoffset;
1563 u32 yoffset = info->var.yoffset;
1564 u32 line_length = info->fix.line_length;
1565 u32 bpp = info->var.bits_per_pixel;
1577 static int atyfb_open(struct fb_info *info, int user)
1579 struct atyfb_par *par = (struct atyfb_par *) info->par;
1670 static int atyfb_release(struct fb_info *info, int user)
1672 struct atyfb_par *par = (struct atyfb_par *) info->par;
1707 u32 videoram = (info->fix.smem_len - (PAGE_SIZE << 2));
1728 struct fb_info *info)
1730 struct atyfb_par *par = (struct atyfb_par *) info->par;
1742 info->var.xoffset = xoffset;
1743 info->var.yoffset = yoffset;
1747 set_off_pitch(par, info);
1814 static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
1816 struct atyfb_par *par = (struct atyfb_par *) info->par;
1827 fbtyp.fb_depth = info->var.bits_per_pixel;
1828 fbtyp.fb_cmsize = info->cmap.len;
1829 fbtyp.fb_size = info->fix.smem_len;
1892 /*aty_calc_pll_ct(info, &pll->ct);*/
1893 aty_set_pll_ct(info, pll);
1912 static int atyfb_sync(struct fb_info *info)
1914 struct atyfb_par *par = (struct atyfb_par *) info->par;
1922 static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
1924 struct atyfb_par *par = (struct atyfb_par *) info->par;
1941 if (((vma->vm_pgoff == 0) && (size == info->fix.smem_len)) ||
1942 ((off == info->fix.smem_len) && (size == PAGE_SIZE)))
2056 struct fb_info *info = pci_get_drvdata(pdev);
2057 struct atyfb_par *par = (struct atyfb_par *) info->par;
2064 fb_set_suspend(info, 1);
2071 atyfb_blank(FB_BLANK_POWERDOWN, info);
2087 atyfb_blank(FB_BLANK_UNBLANK, info);
2088 fb_set_suspend(info, 0);
2116 static void aty_resume_chip(struct fb_info *info)
2118 struct atyfb_par *par = info->par;
2123 par->pll_ops->resume_pll(info, &par->pll);
2133 struct fb_info *info = pci_get_drvdata(pdev);
2134 struct atyfb_par *par = (struct atyfb_par *) info->par;
2153 aty_resume_chip(info);
2158 atyfb_set_par(info);
2161 fb_set_suspend(info, 0);
2165 atyfb_blank(FB_BLANK_UNBLANK, info);
2193 struct fb_info *info = pci_get_drvdata(par->pdev);
2198 atylevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL;
2240 struct fb_info *info = pci_get_drvdata(par->pdev);
2249 snprintf(name, sizeof(name), "atybl%d", info->node);
2254 bd = backlight_device_register(name, info->dev, par, &aty_bl_data,
2257 info->bl_dev = NULL;
2262 info->bl_dev = bd;
2263 fb_bl_default_curve(info, 0,
2349 static int aty_init(struct fb_info *info)
2351 struct atyfb_par *par = (struct atyfb_par *) info->par;
2486 par->pll_ops->get_pll(info, &par->saved_pll);
2494 info->fix.smem_len = 0x80000;
2497 info->fix.smem_len = 0x100000;
2500 info->fix.smem_len = 0x200000;
2503 info->fix.smem_len = 0x400000;
2506 info->fix.smem_len = 0x600000;
2509 info->fix.smem_len = 0x800000;
2512 info->fix.smem_len = 0x80000;
2516 info->fix.smem_len = 0x80000;
2519 info->fix.smem_len = 0x100000;
2522 info->fix.smem_len = 0x200000;
2525 info->fix.smem_len = 0x400000;
2528 info->fix.smem_len = 0x600000;
2531 info->fix.smem_len = 0x800000;
2534 info->fix.smem_len = 0x80000;
2539 info->fix.smem_len += 0x400000;
2543 info->fix.smem_len = vram * 1024;
2545 if (info->fix.smem_len <= 0x80000)
2547 else if (info->fix.smem_len <= 0x100000)
2549 else if (info->fix.smem_len <= 0x200000)
2551 else if (info->fix.smem_len <= 0x400000)
2553 else if (info->fix.smem_len <= 0x600000)
2565 info->fix.mmio_len = 0x400;
2566 info->fix.accel = FB_ACCEL_ATI_MACH64GX;
2568 info->fix.mmio_len = 0x400;
2569 info->fix.accel = FB_ACCEL_ATI_MACH64CT;
2571 info->fix.mmio_start -= 0x400;
2572 info->fix.mmio_len = 0x800;
2573 info->fix.accel = FB_ACCEL_ATI_MACH64VT;
2575 info->fix.mmio_start -= 0x400;
2576 info->fix.mmio_len = 0x800;
2577 info->fix.accel = FB_ACCEL_ATI_MACH64GT;
2581 info->fix.smem_len == 0x80000 ? 512 : (info->fix.smem_len>>20),
2582 info->fix.smem_len == 0x80000 ? 'K' : 'M', ramname, xtal,
2610 par->pll_ops->init_pll(info, &par->pll);
2612 par->pll_ops->resume_pll(info, &par->pll);
2614 aty_fudge_framebuffer_len(info);
2633 info->fbops = &atyfb_ops;
2634 info->pseudo_palette = par->pseudo_palette;
2635 info->flags = FBINFO_DEFAULT |
2666 if (mac_find_mode(&var, info, mode, 8))
2702 if (mode && fb_find_mode(&var, info, mode, NULL, 0, &defmode, 8))
2721 u32 videoram = (info->fix.smem_len - (PAGE_SIZE << 2));
2727 ret = atyfb_check_var(&var, info);
2735 aty_init_cursor(info, &atyfb_ops);
2737 info->var = var;
2739 ret = fb_alloc_cmap(&info->cmap, 256, 0);
2743 ret = register_framebuffer(info);
2745 fb_dealloc_cmap(&info->cmap);
2749 fb_list = info;
2752 info->node, info->fix.id, par->bus_type == ISA ? "ISA" : "PCI");
2758 par->pll_ops->set_pll(info, &par->saved_pll);
2799 static int atyfb_blank(int blank, struct fb_info *info)
2801 struct atyfb_par *par = (struct atyfb_par *) info->par;
2865 u_int transp, struct fb_info *info)
2867 struct atyfb_par *par = (struct atyfb_par *) info->par;
2869 u32 *pal = info->pseudo_palette;
2871 depth = info->var.bits_per_pixel;
2873 depth = (info->var.green.length == 5) ? 15 : 16;
2939 static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info,
2942 struct atyfb_par *par = info->par;
2951 info->fix.mmio_start = addr + 0x7ffc00UL;
2956 info->screen_base = (char *) (addr + 0x800000UL);
2957 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) {
3518 if (info->screen_base) {
3519 iounmap(info->screen_base);
3520 info->screen_base = NULL;
3531 struct fb_info *info;
3557 info = framebuffer_alloc(sizeof(struct atyfb_par), &pdev->dev);
3558 if (!info)
3561 par = info->par;
3563 info->fix = atyfb_fix;
3564 info->device = &pdev->dev;
3571 /* Setup "info" structure */
3573 rc = atyfb_setup_sparc(pdev, info, addr);
3575 rc = atyfb_setup_generic(pdev, info, addr);
3580 pci_set_drvdata(pdev, info);
3583 rc = aty_init(info);
3592 par->mmap_map[0].poff = (unsigned long) info->screen_base & PAGE_MASK;
3593 par->mmap_map[0].size = info->fix.smem_len;
3596 par->mmap_map[1].voff = par->mmap_map[0].voff + info->fix.smem_len;
3605 reboot_info = info;
3616 if (info->screen_base)
3617 iounmap(info->screen_base);
3624 framebuffer_release(info);
3636 struct fb_info *info;
3649 info = framebuffer_alloc(sizeof(struct atyfb_par), NULL);
3650 if (!info)
3653 par = info->par;
3655 info->fix = atyfb_fix;
3663 info->screen_base = ioremap_wc(phys_vmembase[m64_num],
3665 info->fix.smem_start = (unsigned long)info->screen_base; /* Fake! */
3668 info->fix.mmio_start = (unsigned long)par->ati_regbase; /* Fake! */
3700 if (correct_chipset(par) || aty_init(info)) {
3701 iounmap(info->screen_base);
3703 framebuffer_release(info);
3716 static void atyfb_remove(struct fb_info *info)
3718 struct atyfb_par *par = (struct atyfb_par *) info->par;
3722 par->pll_ops->set_pll(info, &par->saved_pll);
3724 unregister_framebuffer(info);
3728 aty_bl_exit(info->bl_dev);
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);