hiddenDangerAnalysis.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. #ifndef __LINUX_FBIO_H
  2. #define __LINUX_FBIO_H
  3. #include <linux/compiler.h>
  4. #include <linux/types.h>
  5. /* Constants used for fbio SunOS compatibility */
  6. /* (C) 1996 Miguel de Icaza */
  7. /* Frame buffer types */
  8. #define FBTYPE_NOTYPE -1
  9. #define FBTYPE_SUN1BW 0 /* mono */
  10. #define FBTYPE_SUN1COLOR 1
  11. #define FBTYPE_SUN2BW 2
  12. #define FBTYPE_SUN2COLOR 3
  13. #define FBTYPE_SUN2GP 4
  14. #define FBTYPE_SUN5COLOR 5
  15. #define FBTYPE_SUN3COLOR 6
  16. #define FBTYPE_MEMCOLOR 7
  17. #define FBTYPE_SUN4COLOR 8
  18. #define FBTYPE_NOTSUN1 9
  19. #define FBTYPE_NOTSUN2 10
  20. #define FBTYPE_NOTSUN3 11
  21. #define FBTYPE_SUNFAST_COLOR 12 /* cg6 */
  22. #define FBTYPE_SUNROP_COLOR 13
  23. #define FBTYPE_SUNFB_VIDEO 14
  24. #define FBTYPE_SUNGIFB 15
  25. #define FBTYPE_SUNGPLAS 16
  26. #define FBTYPE_SUNGP3 17
  27. #define FBTYPE_SUNGT 18
  28. #define FBTYPE_SUNLEO 19 /* zx Leo card */
  29. #define FBTYPE_MDICOLOR 20 /* cg14 */
  30. #define FBTYPE_TCXCOLOR 21 /* SUNW,tcx card */
  31. #define FBTYPE_LASTPLUSONE 21 /* This is not last + 1 in fact... */
  32. /* Does not seem to be listed in the Sun file either */
  33. #define FBTYPE_CREATOR 22
  34. #define FBTYPE_PCI_IGA1682 23
  35. #define FBTYPE_P9100COLOR 24
  36. #define FBTYPE_PCI_GENERIC 1000
  37. #define FBTYPE_PCI_MACH64 1001
  38. /* fbio ioctls */
  39. /* Returned by FBIOGTYPE */
  40. struct fbtype {
  41. int fb_type; /* fb type, see above */
  42. int fb_height; /* pixels */
  43. int fb_width; /* pixels */
  44. int fb_depth;
  45. int fb_cmsize; /* color map entries */
  46. int fb_size; /* fb size in bytes */
  47. };
  48. #define FBIOGTYPE _IOR('F', 0, struct fbtype)
  49. struct fbcmap {
  50. int index; /* first element (0 origin) */
  51. int count;
  52. unsigned char __user *red;
  53. unsigned char __user *green;
  54. unsigned char __user *blue;
  55. };
  56. #ifdef __KERNEL__
  57. #define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap)
  58. #define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap)
  59. #else
  60. #define FBIOPUTCMAP _IOW('F', 3, struct fbcmap)
  61. #define FBIOGETCMAP _IOW('F', 4, struct fbcmap)
  62. #endif
  63. /* # of device specific values */
  64. #define FB_ATTR_NDEVSPECIFIC 8
  65. /* # of possible emulations */
  66. #define FB_ATTR_NEMUTYPES 4
  67. struct fbsattr {
  68. int flags;
  69. int emu_type; /* -1 if none */
  70. int dev_specific[FB_ATTR_NDEVSPECIFIC];
  71. };
  72. struct fbgattr {
  73. int real_type; /* real frame buffer type */
  74. int owner; /* unknown */
  75. struct fbtype fbtype; /* real frame buffer fbtype */
  76. struct fbsattr sattr;
  77. int emu_types[FB_ATTR_NEMUTYPES]; /* supported emulations */
  78. };
  79. #define FBIOSATTR _IOW('F', 5, struct fbgattr) /* Unsupported: */
  80. #define FBIOGATTR _IOR('F', 6, struct fbgattr) /* supported */
  81. #define FBIOSVIDEO _IOW('F', 7, int)
  82. #define FBIOGVIDEO _IOR('F', 8, int)
  83. struct fbcursor {
  84. short set; /* what to set, choose from the list above */
  85. short enable; /* cursor on/off */
  86. struct fbcurpos pos; /* cursor position */
  87. struct fbcurpos hot; /* cursor hot spot */
  88. struct fbcmap cmap; /* color map info */
  89. struct fbcurpos size; /* cursor bit map size */
  90. char __user *image; /* cursor image bits */
  91. char __user *mask; /* cursor mask bits */
  92. };
  93. /* set/get cursor attributes/shape */
  94. #define FBIOSCURSOR _IOW('F', 24, struct fbcursor)
  95. #define FBIOGCURSOR _IOWR('F', 25, struct fbcursor)
  96. /* set/get cursor position */
  97. #define FBIOSCURPOS _IOW('F', 26, struct fbcurpos)
  98. #define FBIOGCURPOS _IOW('F', 27, struct fbcurpos)
  99. /* get max cursor size */
  100. #define FBIOGCURMAX _IOR('F', 28, struct fbcurpos)
  101. /* wid manipulation */
  102. struct fb_wid_alloc {
  103. #define FB_WID_SHARED_8 0
  104. #define FB_WID_SHARED_24 1
  105. #define FB_WID_DBL_8 2
  106. #define FB_WID_DBL_24 3
  107. __u32 wa_type;
  108. __s32 wa_index; /* Set on return */
  109. __u32 wa_count;
  110. };
  111. struct fb_wid_item {
  112. __u32 wi_type;
  113. __s32 wi_index;
  114. __u32 wi_attrs;
  115. __u32 wi_values[32];
  116. };
  117. struct fb_wid_list {
  118. __u32 wl_flags;
  119. __u32 wl_count;
  120. struct fb_wid_item *wl_list;
  121. };
  122. #define FBIO_WID_ALLOC _IOWR('F', 30, struct fb_wid_alloc)
  123. #define FBIO_WID_FREE _IOW('F', 31, struct fb_wid_alloc)
  124. #define FBIO_WID_PUT _IOW('F', 32, struct fb_wid_list)
  125. #define FBIO_WID_GET _IOWR('F', 33, struct fb_wid_list)
  126. /* Creator ioctls */
  127. #define FFB_IOCTL ('F'<<8)
  128. #define FFB_SYS_INFO (FFB_IOCTL|80)
  129. #define FFB_CLUTREAD (FFB_IOCTL|81)
  130. #define FFB_CLUTPOST (FFB_IOCTL|82)
  131. #define FFB_SETDIAGMODE (FFB_IOCTL|83)
  132. #define FFB_GETMONITORID (FFB_IOCTL|84)
  133. #define FFB_GETVIDEOMODE (FFB_IOCTL|85)
  134. #define FFB_SETVIDEOMODE (FFB_IOCTL|86)
  135. #define FFB_SETSERVER (FFB_IOCTL|87)
  136. #define FFB_SETOVCTL (FFB_IOCTL|88)
  137. #define FFB_GETOVCTL (FFB_IOCTL|89)
  138. #define FFB_GETSAXNUM (FFB_IOCTL|90)
  139. #define FFB_FBDEBUG (FFB_IOCTL|91)
  140. /* Cg14 ioctls */
  141. #define MDI_IOCTL ('M'<<8)
  142. #define MDI_RESET (MDI_IOCTL|1)
  143. #define MDI_GET_CFGINFO (MDI_IOCTL|2)
  144. #define MDI_SET_PIXELMODE (MDI_IOCTL|3)
  145. # define MDI_32_PIX 32
  146. # define MDI_16_PIX 16
  147. # define MDI_8_PIX 8
  148. struct mdi_cfginfo {
  149. int mdi_ncluts; /* Number of implemented CLUTs in this MDI */
  150. int mdi_type; /* FBTYPE name */
  151. int mdi_height; /* height */
  152. int mdi_width; /* width */
  153. int mdi_size; /* available ram */
  154. int mdi_mode; /* 8bpp, 16bpp or 32bpp */
  155. int mdi_pixfreq; /* pixel clock (from PROM) */
  156. };
  157. /* SparcLinux specific ioctl for the MDI, should be replaced for
  158. * the SET_XLUT/SET_CLUTn ioctls instead
  159. */
  160. #define MDI_CLEAR_XLUT (MDI_IOCTL|9)
  161. /* leo & ffb ioctls */
  162. struct fb_clut_alloc {
  163. __u32 clutid; /* Set on return */
  164. __u32 flag;
  165. __u32 index;
  166. };
  167. struct fb_clut {
  168. #define FB_CLUT_WAIT 0x00000001 /* Not yet implemented */
  169. __u32 flag;
  170. __u32 clutid;
  171. __u32 offset;
  172. __u32 count;