Lines Matching refs:info
124 static void vt8623fb_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor) in vt8623fb_tilecursor() argument
126 struct vt8623fb_info *par = info->par; in vt8623fb_tilecursor()
128 svga_tilecursor(par->state.vgabase, info, cursor); in vt8623fb_tilecursor()
151 static void vt8623fb_iplan_imageblit(struct fb_info *info, const struct fb_image *image) in vt8623fb_iplan_imageblit() argument
162 dst1 = info->screen_base + (image->dy * info->fix.line_length) in vt8623fb_iplan_imageblit()
174 dst1 += info->fix.line_length; in vt8623fb_iplan_imageblit()
179 static void vt8623fb_iplan_fillrect(struct fb_info *info, const struct fb_fillrect *rect) in vt8623fb_iplan_fillrect() argument
186 dst1 = info->screen_base + (rect->dy * info->fix.line_length) in vt8623fb_iplan_fillrect()
194 dst1 += info->fix.line_length; in vt8623fb_iplan_fillrect()
207 static void vt8623fb_cfb4_imageblit(struct fb_info *info, const struct fb_image *image) in vt8623fb_cfb4_imageblit() argument
218 dst1 = info->screen_base + (image->dy * info->fix.line_length) in vt8623fb_cfb4_imageblit()
230 dst1 += info->fix.line_length; in vt8623fb_cfb4_imageblit()
234 static void vt8623fb_imageblit(struct fb_info *info, const struct fb_image *image) in vt8623fb_imageblit() argument
236 if ((info->var.bits_per_pixel == 4) && (image->depth == 1) in vt8623fb_imageblit()
238 if (info->fix.type == FB_TYPE_INTERLEAVED_PLANES) in vt8623fb_imageblit()
239 vt8623fb_iplan_imageblit(info, image); in vt8623fb_imageblit()
241 vt8623fb_cfb4_imageblit(info, image); in vt8623fb_imageblit()
243 cfb_imageblit(info, image); in vt8623fb_imageblit()
246 static void vt8623fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) in vt8623fb_fillrect() argument
248 if ((info->var.bits_per_pixel == 4) in vt8623fb_fillrect()
250 && (info->fix.type == FB_TYPE_INTERLEAVED_PLANES)) in vt8623fb_fillrect()
251 vt8623fb_iplan_fillrect(info, rect); in vt8623fb_fillrect()
253 cfb_fillrect(info, rect); in vt8623fb_fillrect()
260 static void vt8623_set_pixclock(struct fb_info *info, u32 pixclock) in vt8623_set_pixclock() argument
262 struct vt8623fb_info *par = info->par; in vt8623_set_pixclock()
267 rv = svga_compute_pll(&vt8623_pll, 1000000000 / pixclock, &m, &n, &r, info->node); in vt8623_set_pixclock()
269 fb_err(info, "cannot set requested pixclock, keeping old value\n"); in vt8623_set_pixclock()
289 static int vt8623fb_open(struct fb_info *info, int user) in vt8623fb_open() argument
291 struct vt8623fb_info *par = info->par; in vt8623fb_open()
311 static int vt8623fb_release(struct fb_info *info, int user) in vt8623fb_release() argument
313 struct vt8623fb_info *par = info->par; in vt8623fb_release()
330 static int vt8623fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) in vt8623fb_check_var() argument
338 fb_err(info, "unsupported mode requested\n"); in vt8623fb_check_var()
355 if (mem > info->screen_size) in vt8623fb_check_var()
357 fb_err(info, "not enough framebuffer memory (%d kB requested, %d kB available)\n", in vt8623fb_check_var()
358 mem >> 10, (unsigned int) (info->screen_size >> 10)); in vt8623fb_check_var()
365 fb_err(info, "text framebuffer size too large (%d kB requested, 256 kB possible)\n", in vt8623fb_check_var()
370 rv = svga_check_timings (&vt8623_timing_regs, var, info->node); in vt8623fb_check_var()
373 fb_err(info, "invalid timings requested\n"); in vt8623fb_check_var()
385 static int vt8623fb_set_par(struct fb_info *info) in vt8623fb_set_par() argument
388 struct vt8623fb_info *par = info->par; in vt8623fb_set_par()
389 u32 bpp = info->var.bits_per_pixel; in vt8623fb_set_par()
392 info->fix.ypanstep = 1; in vt8623fb_set_par()
393 info->fix.line_length = (info->var.xres_virtual * bpp) / 8; in vt8623fb_set_par()
395 info->flags &= ~FBINFO_MISC_TILEBLITTING; in vt8623fb_set_par()
396 info->tileops = NULL; in vt8623fb_set_par()
399 info->pixmap.blit_x = (bpp == 4) ? (1 << (8 - 1)) : (~(u32)0); in vt8623fb_set_par()
400 info->pixmap.blit_y = ~(u32)0; in vt8623fb_set_par()
402 offset_value = (info->var.xres_virtual * bpp) / 64; in vt8623fb_set_par()
403 fetch_value = ((info->var.xres * bpp) / 128) + 4; in vt8623fb_set_par()
406 fetch_value = (info->var.xres / 8) + 8; /* + 0 is OK */ in vt8623fb_set_par()
408 screen_size = info->var.yres_virtual * info->fix.line_length; in vt8623fb_set_par()
410 info->fix.ypanstep = 16; in vt8623fb_set_par()
411 info->fix.line_length = 0; in vt8623fb_set_par()
413 info->flags |= FBINFO_MISC_TILEBLITTING; in vt8623fb_set_par()
414 info->tileops = &vt8623fb_tile_ops; in vt8623fb_set_par()
417 info->pixmap.blit_x = 1 << (8 - 1); in vt8623fb_set_par()
418 info->pixmap.blit_y = 1 << (16 - 1); in vt8623fb_set_par()
420 offset_value = info->var.xres_virtual / 16; in vt8623fb_set_par()
421 fetch_value = (info->var.xres / 8) + 8; in vt8623fb_set_par()
422 screen_size = (info->var.xres_virtual * info->var.yres_virtual) / 64; in vt8623fb_set_par()
425 info->var.xoffset = 0; in vt8623fb_set_par()
426 info->var.yoffset = 0; in vt8623fb_set_par()
427 info->var.activate = FB_ACTIVATE_NOW; in vt8623fb_set_par()
454 if (info->var.vmode & FB_VMODE_DOUBLE) in vt8623fb_set_par()
476 mode = svga_match_format(vt8623fb_formats, &(info->var), &(info->fix)); in vt8623fb_set_par()
479 fb_dbg(info, "text mode\n"); in vt8623fb_set_par()
485 fb_dbg(info, "4 bit pseudocolor\n"); in vt8623fb_set_par()
491 fb_dbg(info, "4 bit pseudocolor, planar\n"); in vt8623fb_set_par()
496 fb_dbg(info, "8 bit pseudocolor\n"); in vt8623fb_set_par()
500 fb_dbg(info, "5/6/5 truecolor\n"); in vt8623fb_set_par()
504 fb_dbg(info, "8/8/8 truecolor\n"); in vt8623fb_set_par()
512 vt8623_set_pixclock(info, info->var.pixclock); in vt8623fb_set_par()
513 svga_set_timings(par->state.vgabase, &vt8623_timing_regs, &(info->var), 1, 1, in vt8623fb_set_par()
514 (info->var.vmode & FB_VMODE_DOUBLE) ? 2 : 1, 1, in vt8623fb_set_par()
515 1, info->node); in vt8623fb_set_par()
517 memset_io(info->screen_base, 0x00, screen_size); in vt8623fb_set_par()
583 static int vt8623fb_blank(int blank_mode, struct fb_info *info) in vt8623fb_blank() argument
585 struct vt8623fb_info *par = info->par; in vt8623fb_blank()
589 fb_dbg(info, "unblank\n"); in vt8623fb_blank()
594 fb_dbg(info, "blank\n"); in vt8623fb_blank()
599 fb_dbg(info, "DPMS standby (hsync off)\n"); in vt8623fb_blank()
604 fb_dbg(info, "DPMS suspend (vsync off)\n"); in vt8623fb_blank()
609 fb_dbg(info, "DPMS off (no sync)\n"); in vt8623fb_blank()
619 static int vt8623fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) in vt8623fb_pan_display() argument
621 struct vt8623fb_info *par = info->par; in vt8623fb_pan_display()
625 if (info->var.bits_per_pixel == 0) { in vt8623fb_pan_display()
626 offset = (var->yoffset / 16) * info->var.xres_virtual in vt8623fb_pan_display()
630 offset = (var->yoffset * info->fix.line_length) + in vt8623fb_pan_display()
631 (var->xoffset * info->var.bits_per_pixel / 8); in vt8623fb_pan_display()
632 offset = offset >> ((info->var.bits_per_pixel == 4) ? 2 : 1); in vt8623fb_pan_display()
669 struct fb_info *info; in vt8623_pci_probe() local
681 info = framebuffer_alloc(sizeof(struct vt8623fb_info), &(dev->dev)); in vt8623_pci_probe()
682 if (! info) { in vt8623_pci_probe()
687 par = info->par; in vt8623_pci_probe()
690 info->flags = FBINFO_PARTIAL_PAN_OK | FBINFO_HWACCEL_YPAN; in vt8623_pci_probe()
691 info->fbops = &vt8623fb_ops; in vt8623_pci_probe()
697 dev_err(info->device, "cannot enable PCI device\n"); in vt8623_pci_probe()
703 dev_err(info->device, "cannot reserve framebuffer region\n"); in vt8623_pci_probe()
707 info->fix.smem_start = pci_resource_start(dev, 0); in vt8623_pci_probe()
708 info->fix.smem_len = pci_resource_len(dev, 0); in vt8623_pci_probe()
709 info->fix.mmio_start = pci_resource_start(dev, 1); in vt8623_pci_probe()
710 info->fix.mmio_len = pci_resource_len(dev, 1); in vt8623_pci_probe()
713 info->screen_base = pci_iomap(dev, 0, 0); in vt8623_pci_probe()
714 if (! info->screen_base) { in vt8623_pci_probe()
716 dev_err(info->device, "iomap for framebuffer failed\n"); in vt8623_pci_probe()
723 dev_err(info->device, "iomap for MMIO failed\n"); in vt8623_pci_probe()
741 info->screen_size = memsize1 << 20; in vt8623_pci_probe()
743 …dev_err(info->device, "memory size detection failed (%x %x), suppose 16 MB\n", memsize1, memsize2); in vt8623_pci_probe()
744 info->screen_size = 16 << 20; in vt8623_pci_probe()
747 info->fix.smem_len = info->screen_size; in vt8623_pci_probe()
748 strcpy(info->fix.id, "VIA VT8623"); in vt8623_pci_probe()
749 info->fix.type = FB_TYPE_PACKED_PIXELS; in vt8623_pci_probe()
750 info->fix.visual = FB_VISUAL_PSEUDOCOLOR; in vt8623_pci_probe()
751 info->fix.ypanstep = 0; in vt8623_pci_probe()
752 info->fix.accel = FB_ACCEL_NONE; in vt8623_pci_probe()
753 info->pseudo_palette = (void*)par->pseudo_palette; in vt8623_pci_probe()
758 rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); in vt8623_pci_probe()
762 dev_err(info->device, "mode %s not found\n", mode_option); in vt8623_pci_probe()
766 rc = fb_alloc_cmap(&info->cmap, 256, 0); in vt8623_pci_probe()
768 dev_err(info->device, "cannot allocate colormap\n"); in vt8623_pci_probe()
772 rc = register_framebuffer(info); in vt8623_pci_probe()
774 dev_err(info->device, "cannot register framebuffer\n"); in vt8623_pci_probe()
778 fb_info(info, "%s on %s, %d MB RAM\n", in vt8623_pci_probe()
779 info->fix.id, pci_name(dev), info->fix.smem_len >> 20); in vt8623_pci_probe()
782 pci_set_drvdata(dev, info); in vt8623_pci_probe()
787 par->mtrr_reg = mtrr_add(info->fix.smem_start, info->fix.smem_len, MTRR_TYPE_WRCOMB, 1); in vt8623_pci_probe()
795 fb_dealloc_cmap(&info->cmap); in vt8623_pci_probe()
800 pci_iounmap(dev, info->screen_base); in vt8623_pci_probe()
806 framebuffer_release(info); in vt8623_pci_probe()
814 struct fb_info *info = pci_get_drvdata(dev); in vt8623_pci_remove() local
816 if (info) { in vt8623_pci_remove()
817 struct vt8623fb_info *par = info->par; in vt8623_pci_remove()
826 unregister_framebuffer(info); in vt8623_pci_remove()
827 fb_dealloc_cmap(&info->cmap); in vt8623_pci_remove()
829 pci_iounmap(dev, info->screen_base); in vt8623_pci_remove()
834 framebuffer_release(info); in vt8623_pci_remove()
844 struct fb_info *info = pci_get_drvdata(dev); in vt8623_pci_suspend() local
845 struct vt8623fb_info *par = info->par; in vt8623_pci_suspend()
847 dev_info(info->device, "suspend\n"); in vt8623_pci_suspend()
858 fb_set_suspend(info, 1); in vt8623_pci_suspend()
875 struct fb_info *info = pci_get_drvdata(dev); in vt8623_pci_resume() local
876 struct vt8623fb_info *par = info->par; in vt8623_pci_resume()
878 dev_info(info->device, "resume\n"); in vt8623_pci_resume()
894 vt8623fb_set_par(info); in vt8623_pci_resume()
895 fb_set_suspend(info, 0); in vt8623_pci_resume()