XGIfb.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_XGIFB
  3. #define _LINUX_XGIFB
  4. #include "vgatypes.h"
  5. #include "vb_struct.h"
  6. enum xgifb_display_type {
  7. XGIFB_DISP_NONE = 0,
  8. XGIFB_DISP_CRT,
  9. XGIFB_DISP_LCD,
  10. XGIFB_DISP_TV,
  11. };
  12. #define HASVB_NONE 0x00
  13. #define HASVB_301 0x01
  14. #define HASVB_LVDS 0x02
  15. #define HASVB_TRUMPION 0x04
  16. #define HASVB_LVDS_CHRONTEL 0x10
  17. #define HASVB_302 0x20
  18. #define HASVB_CHRONTEL 0x80
  19. enum XGI_CHIP_TYPE {
  20. XG40 = 32,
  21. XG42,
  22. XG20 = 48,
  23. XG21,
  24. XG27,
  25. };
  26. enum xgi_tvtype {
  27. TVMODE_NTSC = 0,
  28. TVMODE_PAL,
  29. TVMODE_HIVISION,
  30. TVTYPE_PALM,
  31. TVTYPE_PALN,
  32. TVTYPE_NTSCJ,
  33. TVMODE_TOTAL
  34. };
  35. enum xgi_tv_plug {
  36. TVPLUG_UNKNOWN = 0,
  37. TVPLUG_COMPOSITE = 1,
  38. TVPLUG_SVIDEO = 2,
  39. TVPLUG_COMPOSITE_AND_SVIDEO = 3,
  40. TVPLUG_SCART = 4,
  41. TVPLUG_YPBPR_525i = 5,
  42. TVPLUG_YPBPR_525P = 6,
  43. TVPLUG_YPBPR_750P = 7,
  44. TVPLUG_YPBPR_1080i = 8,
  45. TVPLUG_TOTAL
  46. };
  47. struct xgifb_video_info {
  48. struct fb_info *fb_info;
  49. struct xgi_hw_device_info hw_info;
  50. struct vb_device_info dev_info;
  51. int mode_idx;
  52. int rate_idx;
  53. u32 pseudo_palette[17];
  54. int chip_id;
  55. unsigned int video_size;
  56. phys_addr_t video_base;
  57. void __iomem *video_vbase;
  58. phys_addr_t mmio_base;
  59. unsigned long mmio_size;
  60. void __iomem *mmio_vbase;
  61. unsigned long vga_base;
  62. int mtrr;
  63. int video_bpp;
  64. int video_cmap_len;
  65. int video_width;
  66. int video_height;
  67. int video_vwidth;
  68. int video_vheight;
  69. int org_x;
  70. int org_y;
  71. int video_linelength;
  72. unsigned int refresh_rate;
  73. enum xgifb_display_type display2; /* the second display output type */
  74. bool display2_force;
  75. unsigned char hasVB;
  76. unsigned char TV_type;
  77. unsigned char TV_plug;
  78. struct XGI21_LVDSCapStruct lvds_data;
  79. enum XGI_CHIP_TYPE chip;
  80. unsigned char revision_id;
  81. unsigned short DstColor;
  82. unsigned long XGI310_AccelDepth;
  83. unsigned long CommandReg;
  84. unsigned int pcibus;
  85. unsigned int pcislot;
  86. unsigned int pcifunc;
  87. unsigned short subsysvendor;
  88. unsigned short subsysdevice;
  89. char reserved[236];
  90. };
  91. #endif