mbxfb.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #ifndef __MBX_FB_H
  2. #define __MBX_FB_H
  3. #include <asm/ioctl.h>
  4. #include <asm/types.h>
  5. struct mbxfb_val {
  6. unsigned int defval;
  7. unsigned int min;
  8. unsigned int max;
  9. };
  10. struct fb_info;
  11. struct mbxfb_platform_data {
  12. /* Screen info */
  13. struct mbxfb_val xres;
  14. struct mbxfb_val yres;
  15. struct mbxfb_val bpp;
  16. /* Memory info */
  17. unsigned long memsize; /* if 0 use ODFB? */
  18. unsigned long timings1;
  19. unsigned long timings2;
  20. unsigned long timings3;
  21. int (*probe)(struct fb_info *fb);
  22. int (*remove)(struct fb_info *fb);
  23. };
  24. /* planar */
  25. #define MBXFB_FMT_YUV16 0
  26. #define MBXFB_FMT_YUV12 1
  27. /* packed */
  28. #define MBXFB_FMT_UY0VY1 2
  29. #define MBXFB_FMT_VY0UY1 3
  30. #define MBXFB_FMT_Y0UY1V 4
  31. #define MBXFB_FMT_Y0VY1U 5
  32. struct mbxfb_overlaySetup {
  33. __u32 enable;
  34. __u32 x, y;
  35. __u32 width, height;
  36. __u32 fmt;
  37. __u32 mem_offset;
  38. __u32 scaled_width;
  39. __u32 scaled_height;
  40. /* Filled by the driver */
  41. __u32 U_offset;
  42. __u32 V_offset;
  43. __u16 Y_stride;
  44. __u16 UV_stride;
  45. };
  46. #define MBXFB_ALPHABLEND_NONE 0
  47. #define MBXFB_ALPHABLEND_GLOBAL 1
  48. #define MBXFB_ALPHABLEND_PIXEL 2
  49. #define MBXFB_COLORKEY_DISABLED 0
  50. #define MBXFB_COLORKEY_PREVIOUS 1
  51. #define MBXFB_COLORKEY_CURRENT 2
  52. struct mbxfb_alphaCtl {
  53. __u8 overlay_blend_mode;
  54. __u8 overlay_colorkey_mode;
  55. __u8 overlay_global_alpha;
  56. __u32 overlay_colorkey;
  57. __u32 overlay_colorkey_mask;
  58. __u8 graphics_blend_mode;
  59. __u8 graphics_colorkey_mode;
  60. __u8 graphics_global_alpha;
  61. __u32 graphics_colorkey;
  62. __u32 graphics_colorkey_mask;
  63. };
  64. #define MBXFB_PLANE_GRAPHICS 0
  65. #define MBXFB_PLANE_VIDEO 1
  66. struct mbxfb_planeorder {
  67. __u8 bottom;
  68. __u8 top;
  69. };
  70. struct mbxfb_reg {
  71. __u32 addr; /* offset from 0x03fe 0000 */
  72. __u32 val; /* value */
  73. __u32 mask; /* which bits to touch (for write) */
  74. };
  75. #define MBXFB_IOCX_OVERLAY _IOWR(0xF4, 0x00,struct mbxfb_overlaySetup)
  76. #define MBXFB_IOCG_ALPHA _IOR(0xF4, 0x01,struct mbxfb_alphaCtl)
  77. #define MBXFB_IOCS_ALPHA _IOW(0xF4, 0x02,struct mbxfb_alphaCtl)
  78. #define MBXFB_IOCS_PLANEORDER _IOR(0xF4, 0x03,struct mbxfb_planeorder)
  79. #define MBXFB_IOCS_REG _IOW(0xF4, 0x04,struct mbxfb_reg)
  80. #define MBXFB_IOCX_REG _IOWR(0xF4, 0x05,struct mbxfb_reg)
  81. #endif /* __MBX_FB_H */