fsl_diu_fb.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Copyright 2007 Freescale Semiconductor, Inc.
  3. * York Sun <yorksun@freescale.com>
  4. *
  5. * FSL DIU Framebuffer driver
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. struct fb_var_screeninfo {
  26. unsigned int xres; /* visible resolution */
  27. unsigned int yres;
  28. unsigned int bits_per_pixel; /* guess what */
  29. /* Timing: All values in pixclocks, except pixclock (of course) */
  30. unsigned int pixclock; /* pixel clock in ps (pico seconds) */
  31. unsigned int left_margin; /* time from sync to picture */
  32. unsigned int right_margin; /* time from picture to sync */
  33. unsigned int upper_margin; /* time from sync to picture */
  34. unsigned int lower_margin;
  35. unsigned int hsync_len; /* length of horizontal sync */
  36. unsigned int vsync_len; /* length of vertical sync */
  37. unsigned int sync; /* see FB_SYNC_* */
  38. unsigned int vmode; /* see FB_VMODE_* */
  39. unsigned int rotate; /* angle we rotate counter clockwise */
  40. };
  41. struct fb_info {
  42. struct fb_var_screeninfo var; /* Current var */
  43. unsigned long smem_start; /* Start of frame buffer mem */
  44. /* (physical address) */
  45. unsigned int smem_len; /* Length of frame buffer mem */
  46. unsigned int type; /* see FB_TYPE_* */
  47. unsigned int line_length; /* length of a line in bytes */
  48. char *screen_base;
  49. unsigned long screen_size;
  50. int logo_height;
  51. unsigned int logo_size;
  52. };
  53. extern char *fsl_fb_open(struct fb_info **info);
  54. extern int fsl_diu_init(int xres,
  55. unsigned int pixel_format,
  56. int gamma_fix,
  57. unsigned char *splash_bmp);
  58. extern void fsl_diu_clear_screen(void);
  59. extern int fsl_diu_display_bmp(unsigned char *bmp,
  60. int xoffset,
  61. int yoffset,
  62. int transpar);