Lines Matching refs:info

114 static void vt8623fb_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor)  in vt8623fb_tilecursor()  argument
116 struct vt8623fb_info *par = info->par; in vt8623fb_tilecursor()
118 svga_tilecursor(par->state.vgabase, info, cursor); in vt8623fb_tilecursor()
141 static void vt8623fb_iplan_imageblit(struct fb_info *info, const struct fb_image *image) in vt8623fb_iplan_imageblit() argument
152 dst1 = info->screen_base + (image->dy * info->fix.line_length) in vt8623fb_iplan_imageblit()
164 dst1 += info->fix.line_length; in vt8623fb_iplan_imageblit()
169 static void vt8623fb_iplan_fillrect(struct fb_info *info, const struct fb_fillrect *rect) in vt8623fb_iplan_fillrect() argument
176 dst1 = info->screen_base + (rect->dy * info->fix.line_length) in vt8623fb_iplan_fillrect()
184 dst1 += info->fix.line_length; in vt8623fb_iplan_fillrect()
197 static void vt8623fb_cfb4_imageblit(struct fb_info *info, const struct fb_image *image) in vt8623fb_cfb4_imageblit() argument
208 dst1 = info->screen_base + (image->dy * info->fix.line_length) in vt8623fb_cfb4_imageblit()
220 dst1 += info->fix.line_length; in vt8623fb_cfb4_imageblit()
224 static void vt8623fb_imageblit(struct fb_info *info, const struct fb_image *image) in vt8623fb_imageblit() argument
226 if ((info->var.bits_per_pixel == 4) && (image->depth == 1) in vt8623fb_imageblit()
228 if (info->fix.type == FB_TYPE_INTERLEAVED_PLANES) in vt8623fb_imageblit()
229 vt8623fb_iplan_imageblit(info, image); in vt8623fb_imageblit()
231 vt8623fb_cfb4_imageblit(info, image); in vt8623fb_imageblit()
233 cfb_imageblit(info, image); in vt8623fb_imageblit()
236 static void vt8623fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) in vt8623fb_fillrect() argument
238 if ((info->var.bits_per_pixel == 4) in vt8623fb_fillrect()
240 && (info->fix.type == FB_TYPE_INTERLEAVED_PLANES)) in vt8623fb_fillrect()
241 vt8623fb_iplan_fillrect(info, rect); in vt8623fb_fillrect()
243 cfb_fillrect(info, rect); in vt8623fb_fillrect()
250 static void vt8623_set_pixclock(struct fb_info *info, u32 pixclock) in vt8623_set_pixclock() argument
252 struct vt8623fb_info *par = info->par; in vt8623_set_pixclock()
257 rv = svga_compute_pll(&vt8623_pll, 1000000000 / pixclock, &m, &n, &r, info->node); in vt8623_set_pixclock()
259 fb_err(info, "cannot set requested pixclock, keeping old value\n"); in vt8623_set_pixclock()
279 static int vt8623fb_open(struct fb_info *info, int user) in vt8623fb_open() argument
281 struct vt8623fb_info *par = info->par; in vt8623fb_open()
301 static int vt8623fb_release(struct fb_info *info, int user) in vt8623fb_release() argument
303 struct vt8623fb_info *par = info->par; in vt8623fb_release()
320 static int vt8623fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) in vt8623fb_check_var() argument
328 fb_err(info, "unsupported mode requested\n"); in vt8623fb_check_var()
345 if (mem > info->screen_size) in vt8623fb_check_var()
347 fb_err(info, "not enough framebuffer memory (%d kB requested, %d kB available)\n", in vt8623fb_check_var()
348 mem >> 10, (unsigned int) (info->screen_size >> 10)); in vt8623fb_check_var()
355 fb_err(info, "text framebuffer size too large (%d kB requested, 256 kB possible)\n", in vt8623fb_check_var()
360 rv = svga_check_timings (&vt8623_timing_regs, var, info->node); in vt8623fb_check_var()
363 fb_err(info, "invalid timings requested\n"); in vt8623fb_check_var()
375 static int vt8623fb_set_par(struct fb_info *info) in vt8623fb_set_par() argument
378 struct vt8623fb_info *par = info->par; in vt8623fb_set_par()
379 u32 bpp = info->var.bits_per_pixel; in vt8623fb_set_par()
382 info->fix.ypanstep = 1; in vt8623fb_set_par()
383 info->fix.line_length = (info->var.xres_virtual * bpp) / 8; in vt8623fb_set_par()
385 info->flags &= ~FBINFO_MISC_TILEBLITTING; in vt8623fb_set_par()
386 info->tileops = NULL; in vt8623fb_set_par()
389 info->pixmap.blit_x = (bpp == 4) ? (1 << (8 - 1)) : (~(u32)0); in vt8623fb_set_par()
390 info->pixmap.blit_y = ~(u32)0; in vt8623fb_set_par()
392 offset_value = (info->var.xres_virtual * bpp) / 64; in vt8623fb_set_par()
393 fetch_value = ((info->var.xres * bpp) / 128) + 4; in vt8623fb_set_par()
396 fetch_value = (info->var.xres / 8) + 8; /* + 0 is OK */ in vt8623fb_set_par()
398 screen_size = info->var.yres_virtual * info->fix.line_length; in vt8623fb_set_par()
400 info->fix.ypanstep = 16; in vt8623fb_set_par()
401 info->fix.line_length = 0; in vt8623fb_set_par()
403 info->flags |= FBINFO_MISC_TILEBLITTING; in vt8623fb_set_par()
404 info->tileops = &vt8623fb_tile_ops; in vt8623fb_set_par()
407 info->pixmap.blit_x = 1 << (8 - 1); in vt8623fb_set_par()
408 info->pixmap.blit_y = 1 << (16 - 1); in vt8623fb_set_par()
410 offset_value = info->var.xres_virtual / 16; in vt8623fb_set_par()
411 fetch_value = (info->var.xres / 8) + 8; in vt8623fb_set_par()
412 screen_size = (info->var.xres_virtual * info->var.yres_virtual) / 64; in vt8623fb_set_par()
415 info->var.xoffset = 0; in vt8623fb_set_par()
416 info->var.yoffset = 0; in vt8623fb_set_par()
417 info->var.activate = FB_ACTIVATE_NOW; in vt8623fb_set_par()
444 if (info->var.vmode & FB_VMODE_DOUBLE) in vt8623fb_set_par()
466 mode = svga_match_format(vt8623fb_formats, &(info->var), &(info->fix)); in vt8623fb_set_par()
469 fb_dbg(info, "text mode\n"); in vt8623fb_set_par()
475 fb_dbg(info, "4 bit pseudocolor\n"); in vt8623fb_set_par()
481 fb_dbg(info, "4 bit pseudocolor, planar\n"); in vt8623fb_set_par()
486 fb_dbg(info, "8 bit pseudocolor\n"); in vt8623fb_set_par()
490 fb_dbg(info, "5/6/5 truecolor\n"); in vt8623fb_set_par()
494 fb_dbg(info, "8/8/8 truecolor\n"); in vt8623fb_set_par()
502 vt8623_set_pixclock(info, info->var.pixclock); in vt8623fb_set_par()
503 svga_set_timings(par->state.vgabase, &vt8623_timing_regs, &(info->var), 1, 1, in vt8623fb_set_par()
504 (info->var.vmode & FB_VMODE_DOUBLE) ? 2 : 1, 1, in vt8623fb_set_par()
505 1, info->node); in vt8623fb_set_par()
507 memset_io(info->screen_base, 0x00, screen_size); in vt8623fb_set_par()
573 static int vt8623fb_blank(int blank_mode, struct fb_info *info) in vt8623fb_blank() argument
575 struct vt8623fb_info *par = info->par; in vt8623fb_blank()
579 fb_dbg(info, "unblank\n"); in vt8623fb_blank()
584 fb_dbg(info, "blank\n"); in vt8623fb_blank()
589 fb_dbg(info, "DPMS standby (hsync off)\n"); in vt8623fb_blank()
594 fb_dbg(info, "DPMS suspend (vsync off)\n"); in vt8623fb_blank()
599 fb_dbg(info, "DPMS off (no sync)\n"); in vt8623fb_blank()
609 static int vt8623fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) in vt8623fb_pan_display() argument
611 struct vt8623fb_info *par = info->par; in vt8623fb_pan_display()
615 if (info->var.bits_per_pixel == 0) { in vt8623fb_pan_display()
616 offset = (var->yoffset / 16) * info->var.xres_virtual in vt8623fb_pan_display()
620 offset = (var->yoffset * info->fix.line_length) + in vt8623fb_pan_display()
621 (var->xoffset * info->var.bits_per_pixel / 8); in vt8623fb_pan_display()
622 offset = offset >> ((info->var.bits_per_pixel == 4) ? 2 : 1); in vt8623fb_pan_display()
659 struct fb_info *info; in vt8623_pci_probe() local
671 info = framebuffer_alloc(sizeof(struct vt8623fb_info), &(dev->dev)); in vt8623_pci_probe()
672 if (! info) { in vt8623_pci_probe()
677 par = info->par; in vt8623_pci_probe()
680 info->flags = FBINFO_PARTIAL_PAN_OK | FBINFO_HWACCEL_YPAN; in vt8623_pci_probe()
681 info->fbops = &vt8623fb_ops; in vt8623_pci_probe()
687 dev_err(info->device, "cannot enable PCI device\n"); in vt8623_pci_probe()
693 dev_err(info->device, "cannot reserve framebuffer region\n"); in vt8623_pci_probe()
697 info->fix.smem_start = pci_resource_start(dev, 0); in vt8623_pci_probe()
698 info->fix.smem_len = pci_resource_len(dev, 0); in vt8623_pci_probe()
699 info->fix.mmio_start = pci_resource_start(dev, 1); in vt8623_pci_probe()
700 info->fix.mmio_len = pci_resource_len(dev, 1); in vt8623_pci_probe()
703 info->screen_base = pci_iomap_wc(dev, 0, 0); in vt8623_pci_probe()
704 if (! info->screen_base) { in vt8623_pci_probe()
706 dev_err(info->device, "iomap for framebuffer failed\n"); in vt8623_pci_probe()
713 dev_err(info->device, "iomap for MMIO failed\n"); in vt8623_pci_probe()
731 info->screen_size = memsize1 << 20; in vt8623_pci_probe()
733 …dev_err(info->device, "memory size detection failed (%x %x), suppose 16 MB\n", memsize1, memsize2); in vt8623_pci_probe()
734 info->screen_size = 16 << 20; in vt8623_pci_probe()
737 info->fix.smem_len = info->screen_size; in vt8623_pci_probe()
738 strcpy(info->fix.id, "VIA VT8623"); in vt8623_pci_probe()
739 info->fix.type = FB_TYPE_PACKED_PIXELS; in vt8623_pci_probe()
740 info->fix.visual = FB_VISUAL_PSEUDOCOLOR; in vt8623_pci_probe()
741 info->fix.ypanstep = 0; in vt8623_pci_probe()
742 info->fix.accel = FB_ACCEL_NONE; in vt8623_pci_probe()
743 info->pseudo_palette = (void*)par->pseudo_palette; in vt8623_pci_probe()
748 rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); in vt8623_pci_probe()
752 dev_err(info->device, "mode %s not found\n", mode_option); in vt8623_pci_probe()
756 rc = fb_alloc_cmap(&info->cmap, 256, 0); in vt8623_pci_probe()
758 dev_err(info->device, "cannot allocate colormap\n"); in vt8623_pci_probe()
762 rc = register_framebuffer(info); in vt8623_pci_probe()
764 dev_err(info->device, "cannot register framebuffer\n"); in vt8623_pci_probe()
768 fb_info(info, "%s on %s, %d MB RAM\n", in vt8623_pci_probe()
769 info->fix.id, pci_name(dev), info->fix.smem_len >> 20); in vt8623_pci_probe()
772 pci_set_drvdata(dev, info); in vt8623_pci_probe()
775 par->wc_cookie = arch_phys_wc_add(info->fix.smem_start, in vt8623_pci_probe()
776 info->fix.smem_len); in vt8623_pci_probe()
782 fb_dealloc_cmap(&info->cmap); in vt8623_pci_probe()
787 pci_iounmap(dev, info->screen_base); in vt8623_pci_probe()
793 framebuffer_release(info); in vt8623_pci_probe()
801 struct fb_info *info = pci_get_drvdata(dev); in vt8623_pci_remove() local
803 if (info) { in vt8623_pci_remove()
804 struct vt8623fb_info *par = info->par; in vt8623_pci_remove()
807 unregister_framebuffer(info); in vt8623_pci_remove()
808 fb_dealloc_cmap(&info->cmap); in vt8623_pci_remove()
810 pci_iounmap(dev, info->screen_base); in vt8623_pci_remove()
815 framebuffer_release(info); in vt8623_pci_remove()
825 struct fb_info *info = pci_get_drvdata(dev); in vt8623_pci_suspend() local
826 struct vt8623fb_info *par = info->par; in vt8623_pci_suspend()
828 dev_info(info->device, "suspend\n"); in vt8623_pci_suspend()
839 fb_set_suspend(info, 1); in vt8623_pci_suspend()
856 struct fb_info *info = pci_get_drvdata(dev); in vt8623_pci_resume() local
857 struct vt8623fb_info *par = info->par; in vt8623_pci_resume()
859 dev_info(info->device, "resume\n"); in vt8623_pci_resume()
875 vt8623fb_set_par(info); in vt8623_pci_resume()
876 fb_set_suspend(info, 0); in vt8623_pci_resume()