fb.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* linux/arch/arm/plat-s3c/include/plat/fb.h
  2. *
  3. * Copyright 2008 Openmoko, Inc.
  4. * Copyright 2008 Simtec Electronics
  5. * http://armlinux.simtec.co.uk/
  6. * Ben Dooks <ben@simtec.co.uk>
  7. *
  8. * S3C - FB platform data definitions
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #ifndef __PLAT_S3C_FB_H
  15. #define __PLAT_S3C_FB_H __FILE__
  16. /**
  17. * struct s3c_fb_pd_win - per window setup data
  18. * @win_mode: The display parameters to initialise (not for window 0)
  19. * @virtual_x: The virtual X size.
  20. * @virtual_y: The virtual Y size.
  21. */
  22. struct s3c_fb_pd_win {
  23. struct fb_videomode win_mode;
  24. unsigned short default_bpp;
  25. unsigned short max_bpp;
  26. unsigned short virtual_x;
  27. unsigned short virtual_y;
  28. };
  29. /**
  30. * struct s3c_fb_platdata - S3C driver platform specific information
  31. * @setup_gpio: Setup the external GPIO pins to the right state to transfer
  32. * the data from the display system to the connected display
  33. * device.
  34. * @vidcon0: The base vidcon0 values to control the panel data format.
  35. * @vidcon1: The base vidcon1 values to control the panel data output.
  36. * @win: The setup data for each hardware window, or NULL for unused.
  37. * @display_mode: The LCD output display mode.
  38. *
  39. * The platform data supplies the video driver with all the information
  40. * it requires to work with the display(s) attached to the machine. It
  41. * controls the initial mode, the number of display windows (0 is always
  42. * the base framebuffer) that are initialised etc.
  43. *
  44. */
  45. struct s3c_fb_platdata {
  46. void (*setup_gpio)(void);
  47. struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
  48. u32 vidcon0;
  49. u32 vidcon1;
  50. };
  51. /**
  52. * s3c_fb_set_platdata() - Setup the FB device with platform data.
  53. * @pd: The platform data to set. The data is copied from the passed structure
  54. * so the machine data can mark the data __initdata so that any unused
  55. * machines will end up dumping their data at runtime.
  56. */
  57. extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd);
  58. /**
  59. * s3c64xx_fb_gpio_setup_24bpp() - S3C64XX setup function for 24bpp LCD
  60. *
  61. * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
  62. */
  63. extern void s3c64xx_fb_gpio_setup_24bpp(void);
  64. #endif /* __PLAT_S3C_FB_H */