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
60 * Even less warranty that it actually works :-)
99 * also support multiple monitors where each display can have its
100 * its own unique data. In this case each display could be
106 * This allows when one display changes it video resolution (info->var)
107 * the other displays know instantly. Each display can always be
137 * xxxfb_open - Optional function. Called when the framebuffer is
156 * xxxfb_release - Optional function. Called when 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.
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()
329 * color depth is always 2 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()
342 * The color depth is used by fbcon for choosing the logo and also in xxxfb_setcolreg()
343 * for color palette transformation if color depth < 4 in xxxfb_setcolreg()
350 * to look at the fix->visual. in xxxfb_setcolreg()
353 * depth. The bits_per_pixel field does not directly translate to color in xxxfb_setcolreg()
354 * depth. You have to compute for the color depth (using the color 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()
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.
419 * Pan (or wrap, depending on the `vmode' field) the display using the
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
455 * FB_BLANK_NORMAL = display is blanked, syncs are on.
470 /* ------------ Accelerated Functions --------------------- */
481 * xxxfb_fillrect - REQUIRED function. Can use generic routines if
491 * is in the current color depth format.
508 * xxxfb_copyarea - REQUIRED function. Can use generic routines if
533 * xxxfb_imageblit - REQUIRED function. Can use generic routines if
554 * @depth: How many bits represent a single pixel for this image. in xxxfb_imageblit()
555 * @data: The actual data used to construct the image on the display. in xxxfb_imageblit()
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
587 * @dest: A image of the area we are going to display the cursor. in xxxfb_cursor()
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_sync - NOT a required function. Normally the accel engine
621 * so we can have consistent display output.
625 * If the driver has implemented its own hardware-based drawing function,
657 /* ------------------------------------------------------------------------- */
663 /* static int __init xxfb_probe (struct platform_device *pdev) -- for platform devs */
668 struct device *device = &dev->dev; /* or &pdev->dev */ in xxxfb_probe()
680 par = info->par; in xxxfb_probe()
688 info->screen_base = framebuffer_virtual_memory; in xxxfb_probe()
689 info->fbops = &xxxfb_ops; in xxxfb_probe()
690 info->fix = xxxfb_fix; in xxxfb_probe()
691 info->pseudo_palette = pseudo_palette; /* The pseudopalette is an in xxxfb_probe()
692 * 16-member array in xxxfb_probe()
697 * is a module -- see FBINFO_* in include/linux/fb.h in xxxfb_probe()
700 * fbcon performance will improve if info->flags is set properly. in xxxfb_probe()
702 * FBINFO_HWACCEL_COPYAREA - hardware moves in xxxfb_probe()
703 * FBINFO_HWACCEL_FILLRECT - hardware fills in xxxfb_probe()
704 * FBINFO_HWACCEL_IMAGEBLIT - hardware mono->color expansion in xxxfb_probe()
705 * FBINFO_HWACCEL_YPAN - hardware can pan display in y-axis in xxxfb_probe()
706 * FBINFO_HWACCEL_YWRAP - hardware can wrap display in y-axis in xxxfb_probe()
707 * FBINFO_HWACCEL_DISABLED - supports hardware accels, but disabled in xxxfb_probe()
708 * FBINFO_READS_FAST - if set, prefer moves over mono->color expansion in xxxfb_probe()
709 * FBINFO_MISC_TILEBLITTING - hardware can do tile blits in xxxfb_probe()
713 info->flags = FBINFO_DEFAULT; in xxxfb_probe()
729 info->pixmap.addr = kmalloc(PIXMAP_SIZE, GFP_KERNEL); in xxxfb_probe()
730 if (!info->pixmap.addr) { in xxxfb_probe()
734 info->pixmap.size = PIXMAP_SIZE; in xxxfb_probe()
737 * FB_PIXMAP_SYSTEM - memory is in system ram in xxxfb_probe()
738 * FB_PIXMAP_IO - memory is iomapped in xxxfb_probe()
739 * FB_PIXMAP_SYNC - if set, will call fb_sync() per access to pixmap, in xxxfb_probe()
744 info->pixmap.flags = FB_PIXMAP_SYSTEM; in xxxfb_probe()
750 info->pixmap.scan_align = 4; in xxxfb_probe()
757 info->pixmap.buf_align = 4; in xxxfb_probe()
760 * ie. some epson cards allow 16-bit access only. Most drivers will in xxxfb_probe()
765 info->pixmap.access_align = 32; in xxxfb_probe()
775 retval = fb_find_mode(&info->var, info, mode_option, NULL, 0, NULL, 8); in xxxfb_probe()
778 return -EINVAL; in xxxfb_probe()
781 if (fb_alloc_cmap(&info->cmap, cmap_len, 0)) in xxxfb_probe()
782 return -ENOMEM; in xxxfb_probe()
788 info->var = xxxfb_var; in xxxfb_probe()
793 xxxfb_check_var(&info->var, info); in xxxfb_probe()
807 fb_dealloc_cmap(&info->cmap); in xxxfb_probe()
808 return -EINVAL; in xxxfb_probe()
810 fb_info(info, "%s frame buffer device\n", info->fix.id); in xxxfb_probe()
826 fb_dealloc_cmap(&info->cmap); in xxxfb_remove()
835 * xxxfb_suspend - Optional but recommended function. Suspend the device.
839 * See Documentation/driver-api/pm/devices.rst for more information
844 struct xxxfb_par *par = info->par; in xxxfb_suspend()
851 * xxxfb_resume - Optional but recommended function. Resume the device.
854 * See Documentation/driver-api/pm/devices.rst for more information
859 struct xxxfb_par *par = info->par; in xxxfb_resume()
897 return -ENODEV; in xxxfb_init()
914 * xxxfb_suspend - Optional but recommended function. Suspend the device.
918 * See Documentation/driver-api/pm/devices.rst for more information
923 struct xxxfb_par *par = info->par; in xxxfb_suspend()
930 * xxxfb_resume - Optional but recommended function. Resume the device.
933 * See Documentation/driver-api/pm/devices.rst for more information
938 struct xxxfb_par *par = info->par; in xxxfb_resume()
985 return -ENODEV; in xxxfb_init()
1010 /* ------------------------------------------------------------------------- */