Lines Matching +full:display +full:- +full:depth
2 * linux/drivers/video/skeletonfb.c -- Skeleton for a frame buffer device
16 * First the roles of struct fb_info and struct display have changed. Struct
17 * display will go away. The way the new framebuffer console code will
61 * Even less warranty that it actually works :-)
100 * also support multiple monitors where each display can have
101 * its own unique data. In this case each display could be
107 * This allows when one display changes it video resolution (info->var)
108 * the other displays know instantly. Each display can always be
136 * xxxfb_open - Optional function. Called when the framebuffer is
155 * xxxfb_release - Optional function. Called when the framebuffer
174 * xxxfb_check_var - Optional function. Validates a var passed in.
191 * function must return -EINVAL.
196 * a copy of the currently working var (info->var). Better is to not
204 * contents of info->var must be left untouched at all times after
216 * xxxfb_set_par - Optional function. Alters the hardware state.
243 * *var = info->var;
256 struct xxx_par *par = info->par; in xxxfb_set_par()
262 * xxxfb_setcolreg - Optional function. Sets a color register.
288 return -EINVAL; in xxxfb_setcolreg()
294 if (info->var.grayscale) { in xxxfb_setcolreg()
300 * var->{color}.offset contains start of bitfield in xxxfb_setcolreg()
301 * var->{color}.length contains length of bitfield in xxxfb_setcolreg()
307 * color depth = SUM(var->{color}.length) in xxxfb_setcolreg()
310 * var->{color}.offset is 0 unless the palette index takes less than in xxxfb_setcolreg()
313 * var->{color}.length is set so that 1 << length is the number of in xxxfb_setcolreg()
317 * color depth = var->{color}.length in xxxfb_setcolreg()
320 * same as Pseudocolor, but the RAMDAC is not programmed (read-only) in xxxfb_setcolreg()
324 * var->{color}.offset is 0 in xxxfb_setcolreg()
325 * white = (1 << var->{color}.length) - 1, black = 0 in xxxfb_setcolreg()
328 * color depth is always 2 in xxxfb_setcolreg()
332 * var->{color}.offset contains start of bitfield in xxxfb_setcolreg()
333 * var->{color}.length contains length of bitfield in xxxfb_setcolreg()
339 * color depth = SUM(var->{color}.length}) in xxxfb_setcolreg()
341 * The color depth is used by fbcon for choosing the logo and also in xxxfb_setcolreg()
342 * for color palette transformation if color depth < 4 in xxxfb_setcolreg()
349 * to look at the fix->visual. in xxxfb_setcolreg()
352 * depth. The bits_per_pixel field does not directly translate to color in xxxfb_setcolreg()
353 * depth. You have to compute for the color depth (using the color in xxxfb_setcolreg()
354 * bitfields) and fix->visual as seen above. in xxxfb_setcolreg()
361 #define CNVT_TOHW(val,width) ((((val)<<(width))+0x7FFF-(val))>>16) in xxxfb_setcolreg()
362 red = CNVT_TOHW(red, info->var.red.length); in xxxfb_setcolreg()
363 green = CNVT_TOHW(green, info->var.green.length); in xxxfb_setcolreg()
364 blue = CNVT_TOHW(blue, info->var.blue.length); in xxxfb_setcolreg()
365 transp = CNVT_TOHW(transp, info->var.transp.length); in xxxfb_setcolreg()
375 if (info->fix.visual == FB_VISUAL_DIRECTCOLOR || in xxxfb_setcolreg()
376 info->fix.visual == FB_VISUAL_TRUECOLOR) in xxxfb_setcolreg()
380 * info->pseudo_palette. This structure is used _only_ by fbcon, thus in xxxfb_setcolreg()
394 if (info->fix.visual == FB_VISUAL_TRUECOLOR || in xxxfb_setcolreg()
395 info->fix.visual == FB_VISUAL_DIRECTCOLOR) { in xxxfb_setcolreg()
399 return -EINVAL; in xxxfb_setcolreg()
401 v = (red << info->var.red.offset) | in xxxfb_setcolreg()
402 (green << info->var.green.offset) | in xxxfb_setcolreg()
403 (blue << info->var.blue.offset) | in xxxfb_setcolreg()
404 (transp << info->var.transp.offset); in xxxfb_setcolreg()
406 ((u32*)(info->pseudo_palette))[regno] = v; in xxxfb_setcolreg()
414 * xxxfb_pan_display - NOT a required function. Pans the display.
418 * Pan (or wrap, depending on the `vmode' field) the display using the
420 * If the values don't fit, return -EINVAL.
443 * xxxfb_blank - NOT a required function. Blanks the display.
448 * Return 0 if blanking succeeded, != 0 if un-/blanking failed due to
454 * FB_BLANK_NORMAL = display is blanked, syncs are on.
469 /* ------------ Accelerated Functions --------------------- */
480 * xxxfb_fillrect - REQUIRED function. Can use generic routines if
490 * is in the current color depth format.
507 * xxxfb_copyarea - REQUIRED function. Can use generic routines if
532 * xxxfb_imageblit - REQUIRED function. Can use generic routines if
553 * @depth: How many bits represent a single pixel for this image. in xxxfb_imageblit()
554 * @data: The actual data used to construct the image on the display. in xxxfb_imageblit()
562 * this by setting info->pixmap.scan_align = 2 or 4. See a more in xxxfb_imageblit()
568 * xxxfb_cursor - OPTIONAL. If your hardware lacks support
586 * @dest: A image of the area we are going to display the cursor. in xxxfb_cursor()
591 * NOTES ON FLAGS (cursor->set): in xxxfb_cursor()
593 * FB_CUR_SETIMAGE - the cursor image has changed (cursor->image.data) in xxxfb_cursor()
594 * FB_CUR_SETPOS - the cursor position has changed (cursor->image.dx|dy) in xxxfb_cursor()
595 * FB_CUR_SETHOT - the cursor hot spot has changed (cursor->hot.dx|dy) in xxxfb_cursor()
596 * FB_CUR_SETCMAP - the cursor colors has changed (cursor->fg_color|bg_color) in xxxfb_cursor()
597 * FB_CUR_SETSHAPE - the cursor bitmask has changed (cursor->mask) in xxxfb_cursor()
598 * FB_CUR_SETSIZE - the cursor size has changed (cursor->width|height) in xxxfb_cursor()
599 * FB_CUR_SETALL - everything has changed in xxxfb_cursor()
601 * NOTES ON ROPs (cursor->rop, Raster Operation) in xxxfb_cursor()
603 * ROP_XOR - cursor->image.data XOR cursor->mask in xxxfb_cursor()
604 * ROP_COPY - curosr->image.data AND cursor->mask in xxxfb_cursor()
608 * - fbcon only supports a 2-color cursor (cursor->image.depth = 1) in xxxfb_cursor()
609 * - The fb_cursor structure, @cursor, _will_ always contain valid in xxxfb_cursor()
610 * fields, whether any particular bitfields in cursor->set is set in xxxfb_cursor()
616 * xxxfb_sync - NOT a required function. Normally the accel engine
620 * so we can have consistent display output.
624 * If the driver has implemented its own hardware-based drawing function,
656 /* ------------------------------------------------------------------------- */
662 /* static int __init xxfb_probe (struct platform_device *pdev) -- for platform devs */
667 struct device *device = &dev->dev; /* or &pdev->dev */ in xxxfb_probe()
671 * Remove firmware-based drivers that create resource conflicts. in xxxfb_probe()
686 par = info->par; in xxxfb_probe()
694 info->screen_base = framebuffer_virtual_memory; in xxxfb_probe()
695 info->fbops = &xxxfb_ops; in xxxfb_probe()
696 info->fix = xxxfb_fix; in xxxfb_probe()
697 info->pseudo_palette = pseudo_palette; /* The pseudopalette is an in xxxfb_probe()
698 * 16-member array in xxxfb_probe()
703 * is a module -- see FBINFO_* in include/linux/fb.h in xxxfb_probe()
706 * fbcon performance will improve if info->flags is set properly. in xxxfb_probe()
708 * FBINFO_HWACCEL_COPYAREA - hardware moves in xxxfb_probe()
709 * FBINFO_HWACCEL_FILLRECT - hardware fills in xxxfb_probe()
710 * FBINFO_HWACCEL_IMAGEBLIT - hardware mono->color expansion in xxxfb_probe()
711 * FBINFO_HWACCEL_YPAN - hardware can pan display in y-axis in xxxfb_probe()
712 * FBINFO_HWACCEL_YWRAP - hardware can wrap display in y-axis in xxxfb_probe()
713 * FBINFO_HWACCEL_DISABLED - supports hardware accels, but disabled in xxxfb_probe()
714 * FBINFO_READS_FAST - if set, prefer moves over mono->color expansion in xxxfb_probe()
715 * FBINFO_MISC_TILEBLITTING - hardware can do tile blits in xxxfb_probe()
719 info->flags = 0; in xxxfb_probe()
735 info->pixmap.addr = kmalloc(PIXMAP_SIZE, GFP_KERNEL); in xxxfb_probe()
736 if (!info->pixmap.addr) { in xxxfb_probe()
740 info->pixmap.size = PIXMAP_SIZE; in xxxfb_probe()
743 * FB_PIXMAP_SYSTEM - memory is in system ram in xxxfb_probe()
744 * FB_PIXMAP_IO - memory is iomapped in xxxfb_probe()
745 * FB_PIXMAP_SYNC - if set, will call fb_sync() per access to pixmap, in xxxfb_probe()
750 info->pixmap.flags = FB_PIXMAP_SYSTEM; in xxxfb_probe()
756 info->pixmap.scan_align = 4; in xxxfb_probe()
763 info->pixmap.buf_align = 4; in xxxfb_probe()
766 * ie. some epson cards allow 16-bit access only. Most drivers will in xxxfb_probe()
771 info->pixmap.access_align = 32; in xxxfb_probe()
781 retval = fb_find_mode(&info->var, info, mode_option, NULL, 0, NULL, 8); in xxxfb_probe()
784 return -EINVAL; in xxxfb_probe()
787 if (fb_alloc_cmap(&info->cmap, cmap_len, 0)) in xxxfb_probe()
788 return -ENOMEM; in xxxfb_probe()
794 info->var = xxxfb_var; in xxxfb_probe()
799 xxxfb_check_var(&info->var, info); in xxxfb_probe()
813 fb_dealloc_cmap(&info->cmap); in xxxfb_probe()
814 return -EINVAL; in xxxfb_probe()
816 fb_info(info, "%s frame buffer device\n", info->fix.id); in xxxfb_probe()
832 fb_dealloc_cmap(&info->cmap); in xxxfb_remove()
841 * xxxfb_suspend - Optional but recommended function. Suspend the device.
845 * See Documentation/driver-api/pm/devices.rst for more information
850 struct xxxfb_par *par = info->par; in xxxfb_suspend()
857 * xxxfb_resume - Optional but recommended function. Resume the device.
860 * See Documentation/driver-api/pm/devices.rst for more information
865 struct xxxfb_par *par = info->par; in xxxfb_resume()
904 return -ENODEV; in xxxfb_init()
921 * xxxfb_suspend - Optional but recommended function. Suspend the device.
925 * See Documentation/driver-api/pm/devices.rst for more information
930 struct xxxfb_par *par = info->par; in xxxfb_suspend()
937 * xxxfb_resume - Optional but recommended function. Resume the device.
940 * See Documentation/driver-api/pm/devices.rst for more information
945 struct xxxfb_par *par = info->par; in xxxfb_resume()
993 return -ENODEV; in xxxfb_init()
997 return -ENODEV; in xxxfb_init()
1022 /* ------------------------------------------------------------------------- */