Lines Matching +full:simple +full:- +full:framebuffer

2  * linux/drivers/video/skeletonfb.c -- Skeleton for a frame buffer device
17 * display will go away. The way the new framebuffer console code will
25 * for each framebuffer device when used as a tty/console device is allocated
27 * per framebuffer device. We already have all the data we need in struct
57 * This is just simple sample code.
60 * Even less warranty that it actually works :-)
101 * represented by a separate framebuffer device thus a separate
105 * every struct fb_info that represents a framebuffer on that card.
106 * This allows when one display changes it video resolution (info->var)
137 * xxxfb_open - Optional function. Called when the framebuffer is
141 * the framebuffer.
143 * This function is the first function called in the framebuffer api.
156 * xxxfb_release - Optional function. Called when the framebuffer
160 * the framebuffer.
162 * Thus function is called when we close /dev/fb or the framebuffer
175 * xxxfb_check_var - Optional function. Validates a var passed in.
192 * function must return -EINVAL.
197 * a copy of the currently working var (info->var). Better is to not
205 * contents of info->var must be left untouched at all times after
217 * xxxfb_set_par - Optional function. Alters the hardware state.
221 * this particular framebuffer. This function alters the par AND the
244 * *var = info->var;
257 struct xxx_par *par = info->par; in xxxfb_set_par()
263 * xxxfb_setcolreg - Optional function. Sets a color register.
289 return -EINVAL; in xxxfb_setcolreg()
295 if (info->var.grayscale) { in xxxfb_setcolreg()
301 * var->{color}.offset contains start of bitfield in xxxfb_setcolreg()
302 * var->{color}.length contains length of bitfield in xxxfb_setcolreg()
308 * color depth = SUM(var->{color}.length) in xxxfb_setcolreg()
311 * var->{color}.offset is 0 unless the palette index takes less than in xxxfb_setcolreg()
314 * var->{color}.length is set so that 1 << length is the number of in xxxfb_setcolreg()
318 * color depth = var->{color}.length in xxxfb_setcolreg()
321 * same as Pseudocolor, but the RAMDAC is not programmed (read-only) in xxxfb_setcolreg()
325 * var->{color}.offset is 0 in xxxfb_setcolreg()
326 * white = (1 << var->{color}.length) - 1, black = 0 in xxxfb_setcolreg()
333 * var->{color}.offset contains start of bitfield in xxxfb_setcolreg()
334 * var->{color}.length contains length of bitfield in xxxfb_setcolreg()
340 * color depth = SUM(var->{color}.length}) in xxxfb_setcolreg()
350 * to look at the fix->visual. in xxxfb_setcolreg()
355 * bitfields) and fix->visual as seen above. in xxxfb_setcolreg()
362 #define CNVT_TOHW(val,width) ((((val)<<(width))+0x7FFF-(val))>>16) in xxxfb_setcolreg()
363 red = CNVT_TOHW(red, info->var.red.length); in xxxfb_setcolreg()
364 green = CNVT_TOHW(green, info->var.green.length); in xxxfb_setcolreg()
365 blue = CNVT_TOHW(blue, info->var.blue.length); in xxxfb_setcolreg()
366 transp = CNVT_TOHW(transp, info->var.transp.length); in xxxfb_setcolreg()
376 if (info->fix.visual == FB_VISUAL_DIRECTCOLOR || in xxxfb_setcolreg()
377 info->fix.visual == FB_VISUAL_TRUECOLOR) in xxxfb_setcolreg()
381 * info->pseudo_palette. This structure is used _only_ by fbcon, thus in xxxfb_setcolreg()
388 * entry can be written directly to the framebuffer without any conversion. in xxxfb_setcolreg()
395 if (info->fix.visual == FB_VISUAL_TRUECOLOR || in xxxfb_setcolreg()
396 info->fix.visual == FB_VISUAL_DIRECTCOLOR) { in xxxfb_setcolreg()
400 return -EINVAL; in xxxfb_setcolreg()
402 v = (red << info->var.red.offset) | in xxxfb_setcolreg()
403 (green << info->var.green.offset) | in xxxfb_setcolreg()
404 (blue << info->var.blue.offset) | in xxxfb_setcolreg()
405 (transp << info->var.transp.offset); in xxxfb_setcolreg()
407 ((u32*)(info->pseudo_palette))[regno] = v; in xxxfb_setcolreg()
415 * xxxfb_pan_display - NOT a required function. Pans the display.
421 * If the values don't fit, return -EINVAL.
444 * xxxfb_blank - NOT a required function. Blanks the display.
449 * Return 0 if blanking succeeded, != 0 if un-/blanking failed due to
470 /* ------------ Accelerated Functions --------------------- */
481 * xxxfb_fillrect - REQUIRED function. Can use generic routines if
508 * xxxfb_copyarea - REQUIRED function. Can use generic routines if
513 * @area: Structure providing the data to copy the framebuffer contents
533 * xxxfb_imageblit - REQUIRED function. Can use generic routines if
563 * this by setting info->pixmap.scan_align = 2 or 4. See a more in xxxfb_imageblit()
569 * xxxfb_cursor - OPTIONAL. If your hardware lacks support
592 * NOTES ON FLAGS (cursor->set): in xxxfb_cursor()
594 * FB_CUR_SETIMAGE - the cursor image has changed (cursor->image.data) in xxxfb_cursor()
595 * FB_CUR_SETPOS - the cursor position has changed (cursor->image.dx|dy) in xxxfb_cursor()
596 * FB_CUR_SETHOT - the cursor hot spot has changed (cursor->hot.dx|dy) in xxxfb_cursor()
597 * FB_CUR_SETCMAP - the cursor colors has changed (cursor->fg_color|bg_color) in xxxfb_cursor()
598 * FB_CUR_SETSHAPE - the cursor bitmask has changed (cursor->mask) in xxxfb_cursor()
599 * FB_CUR_SETSIZE - the cursor size has changed (cursor->width|height) in xxxfb_cursor()
600 * FB_CUR_SETALL - everything has changed in xxxfb_cursor()
602 * NOTES ON ROPs (cursor->rop, Raster Operation) in xxxfb_cursor()
604 * ROP_XOR - cursor->image.data XOR cursor->mask in xxxfb_cursor()
605 * ROP_COPY - curosr->image.data AND cursor->mask in xxxfb_cursor()
609 * - fbcon only supports a 2-color cursor (cursor->image.depth = 1) in xxxfb_cursor()
610 * - The fb_cursor structure, @cursor, _will_ always contain valid in xxxfb_cursor()
611 * fields, whether any particular bitfields in cursor->set is set in xxxfb_cursor()
617 * xxxfb_rotate - NOT a required function. If your hardware
633 * xxxfb_sync - NOT a required function. Normally the accel engine
636 * its operation before we can write to the framebuffer
641 * If the driver has implemented its own hardware-based drawing function,
674 /* ------------------------------------------------------------------------- */
680 /* static int __init xxfb_probe (struct platform_device *pdev) -- for platform devs */
686 struct device *device = &dev->dev; /* or &pdev->dev */ in xxxfb_probe()
698 par = info->par; in xxxfb_probe()
702 * for the framebuffer. Usually we obtain the resource address in xxxfb_probe()
706 info->screen_base = framebuffer_virtual_memory; in xxxfb_probe()
707 info->fbops = &xxxfb_ops; in xxxfb_probe()
708 info->fix = xxxfb_fix; /* this will be the only time xxxfb_fix will be in xxxfb_probe()
711 info->pseudo_palette = pseudo_palette; /* The pseudopalette is an in xxxfb_probe()
712 * 16-member array in xxxfb_probe()
717 * is a module -- see FBINFO_* in include/linux/fb.h in xxxfb_probe()
720 * fbcon performance will improve if info->flags is set properly. in xxxfb_probe()
722 * FBINFO_HWACCEL_COPYAREA - hardware moves in xxxfb_probe()
723 * FBINFO_HWACCEL_FILLRECT - hardware fills in xxxfb_probe()
724 * FBINFO_HWACCEL_IMAGEBLIT - hardware mono->color expansion in xxxfb_probe()
725 * FBINFO_HWACCEL_YPAN - hardware can pan display in y-axis in xxxfb_probe()
726 * FBINFO_HWACCEL_YWRAP - hardware can wrap display in y-axis in xxxfb_probe()
727 * FBINFO_HWACCEL_DISABLED - supports hardware accels, but disabled in xxxfb_probe()
728 * FBINFO_READS_FAST - if set, prefer moves over mono->color expansion in xxxfb_probe()
729 * FBINFO_MISC_TILEBLITTING - hardware can do tile blits in xxxfb_probe()
733 info->flags = FBINFO_DEFAULT; in xxxfb_probe()
749 info->pixmap.addr = kmalloc(PIXMAP_SIZE, GFP_KERNEL); in xxxfb_probe()
750 if (!info->pixmap.addr) { in xxxfb_probe()
754 info->pixmap.size = PIXMAP_SIZE; in xxxfb_probe()
757 * FB_PIXMAP_SYSTEM - memory is in system ram in xxxfb_probe()
758 * FB_PIXMAP_IO - memory is iomapped in xxxfb_probe()
759 * FB_PIXMAP_SYNC - if set, will call fb_sync() per access to pixmap, in xxxfb_probe()
764 info->pixmap.flags = FB_PIXMAP_SYSTEM; in xxxfb_probe()
770 info->pixmap.scan_align = 4; in xxxfb_probe()
777 info->pixmap.buf_align = 4; in xxxfb_probe()
779 /* access_align is how many bits can be accessed from the framebuffer in xxxfb_probe()
780 * ie. some epson cards allow 16-bit access only. Most drivers will in xxxfb_probe()
785 info->pixmap.access_align = 32; in xxxfb_probe()
795 retval = fb_find_mode(&info->var, info, mode_option, NULL, 0, NULL, 8); in xxxfb_probe()
798 return -EINVAL; in xxxfb_probe()
801 if (fb_alloc_cmap(&info->cmap, cmap_len, 0)) in xxxfb_probe()
802 return -ENOMEM; in xxxfb_probe()
808 info->var = xxxfb_var; in xxxfb_probe()
813 xxxfb_check_var(&info->var, info); in xxxfb_probe()
827 fb_dealloc_cmap(&info->cmap); in xxxfb_probe()
828 return -EINVAL; in xxxfb_probe()
830 printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, in xxxfb_probe()
831 info->fix.id); in xxxfb_probe()
847 fb_dealloc_cmap(&info->cmap); in xxxfb_remove()
856 * xxxfb_suspend - Optional but recommended function. Suspend the device.
865 struct xxxfb_par *par = info->par; in xxxfb_suspend()
872 * xxxfb_resume - Optional but recommended function. Resume the device.
880 struct xxxfb_par *par = info->par; in xxxfb_resume()
918 return -ENODEV; in xxxfb_init()
935 * xxxfb_suspend - Optional but recommended function. Suspend the device.
944 struct xxxfb_par *par = info->par; in xxxfb_suspend()
951 * xxxfb_resume - Optional but recommended function. Resume the device.
959 struct xxxfb_par *par = info->par; in xxxfb_resume()
1006 return -ENODEV; in xxxfb_init()
1031 /* ------------------------------------------------------------------------- */