fb.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /* arch/arm/plat-samsung/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. /* S3C_FB_MAX_WIN
  17. * Set to the maximum number of windows that any of the supported hardware
  18. * can use. Since the platform data uses this for an array size, having it
  19. * set to the maximum of any version of the hardware can do is safe.
  20. */
  21. #define S3C_FB_MAX_WIN (5)
  22. /**
  23. * struct s3c_fb_pd_win - per window setup data
  24. * @xres : The window X size.
  25. * @yres : The window Y size.
  26. * @virtual_x: The virtual X size.
  27. * @virtual_y: The virtual Y size.
  28. */
  29. struct s3c_fb_pd_win {
  30. unsigned short default_bpp;
  31. unsigned short max_bpp;
  32. unsigned short xres;
  33. unsigned short yres;
  34. unsigned short virtual_x;
  35. unsigned short virtual_y;
  36. };
  37. /**
  38. * struct s3c_fb_platdata - S3C driver platform specific information
  39. * @setup_gpio: Setup the external GPIO pins to the right state to transfer
  40. * the data from the display system to the connected display
  41. * device.
  42. * @default_win: default window layer number to be used for UI layer.
  43. * @vidcon0: The base vidcon0 values to control the panel data format.
  44. * @vidcon1: The base vidcon1 values to control the panel data output.
  45. * @vtiming: Video timing when connected to a RGB type panel.
  46. * @win: The setup data for each hardware window, or NULL for unused.
  47. * @display_mode: The LCD output display mode.
  48. *
  49. * The platform data supplies the video driver with all the information
  50. * it requires to work with the display(s) attached to the machine. It
  51. * controls the initial mode, the number of display windows (0 is always
  52. * the base framebuffer) that are initialised etc.
  53. *
  54. */
  55. struct s3c_fb_platdata {
  56. void (*setup_gpio)(void);
  57. struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
  58. struct fb_videomode *vtiming;
  59. u32 default_win;
  60. u32 vidcon0;
  61. u32 vidcon1;
  62. };
  63. /**
  64. * s3c_fb_set_platdata() - Setup the FB device with platform data.
  65. * @pd: The platform data to set. The data is copied from the passed structure
  66. * so the machine data can mark the data __initdata so that any unused
  67. * machines will end up dumping their data at runtime.
  68. */
  69. extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd);
  70. /**
  71. * s5p_fimd0_set_platdata() - Setup the FB device with platform data.
  72. * @pd: The platform data to set. The data is copied from the passed structure
  73. * so the machine data can mark the data __initdata so that any unused
  74. * machines will end up dumping their data at runtime.
  75. */
  76. extern void s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd);
  77. /**
  78. * s3c64xx_fb_gpio_setup_24bpp() - S3C64XX setup function for 24bpp LCD
  79. *
  80. * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
  81. */
  82. extern void s3c64xx_fb_gpio_setup_24bpp(void);
  83. /**
  84. * s5pc100_fb_gpio_setup_24bpp() - S5PC100 setup function for 24bpp LCD
  85. *
  86. * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
  87. */
  88. extern void s5pc100_fb_gpio_setup_24bpp(void);
  89. /**
  90. * s5pv210_fb_gpio_setup_24bpp() - S5PV210/S5PC110 setup function for 24bpp LCD
  91. *
  92. * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
  93. */
  94. extern void s5pv210_fb_gpio_setup_24bpp(void);
  95. /**
  96. * exynos4_fimd0_gpio_setup_24bpp() - Exynos4 setup function for 24bpp LCD0
  97. *
  98. * Initialise the GPIO for an 24bpp LCD display on the RGB interface 0.
  99. */
  100. extern void exynos4_fimd0_gpio_setup_24bpp(void);
  101. /**
  102. * s5p64x0_fb_gpio_setup_24bpp() - S5P6440/S5P6450 setup function for 24bpp LCD
  103. *
  104. * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
  105. */
  106. extern void s5p64x0_fb_gpio_setup_24bpp(void);
  107. #endif /* __PLAT_S3C_FB_H */