0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __IOCTL_H__
0009 #define __IOCTL_H__
0010
0011 #ifndef __user
0012 #define __user
0013 #endif
0014
0015
0016 #define VIAFB_GET_INFO_SIZE 0x56494101
0017 #define VIAFB_GET_INFO 0x56494102
0018 #define VIAFB_HOTPLUG 0x56494103
0019 #define VIAFB_SET_HOTPLUG_FLAG 0x56494104
0020 #define VIAFB_GET_RESOLUTION 0x56494105
0021 #define VIAFB_GET_SAMM_INFO 0x56494107
0022 #define VIAFB_TURN_ON_OUTPUT_DEVICE 0x56494108
0023 #define VIAFB_TURN_OFF_OUTPUT_DEVICE 0x56494109
0024 #define VIAFB_GET_DEVICE 0x5649410B
0025 #define VIAFB_GET_DRIVER_VERSION 0x56494112
0026 #define VIAFB_GET_CHIP_INFO 0x56494113
0027 #define VIAFB_GET_DEVICE_INFO 0x56494115
0028
0029 #define VIAFB_GET_DEVICE_SUPPORT 0x56494118
0030 #define VIAFB_GET_DEVICE_CONNECT 0x56494119
0031 #define VIAFB_GET_PANEL_SUPPORT_EXPAND 0x5649411A
0032 #define VIAFB_GET_DRIVER_NAME 0x56494122
0033 #define VIAFB_GET_DEVICE_SUPPORT_STATE 0x56494123
0034 #define VIAFB_GET_GAMMA_LUT 0x56494124
0035 #define VIAFB_SET_GAMMA_LUT 0x56494125
0036 #define VIAFB_GET_GAMMA_SUPPORT_STATE 0x56494126
0037 #define VIAFB_SYNC_SURFACE 0x56494130
0038 #define VIAFB_GET_DRIVER_CAPS 0x56494131
0039 #define VIAFB_GET_IGA_SCALING_INFO 0x56494132
0040 #define VIAFB_GET_PANEL_MAX_SIZE 0x56494133
0041 #define VIAFB_GET_PANEL_MAX_POSITION 0x56494134
0042 #define VIAFB_SET_PANEL_SIZE 0x56494135
0043 #define VIAFB_SET_PANEL_POSITION 0x56494136
0044 #define VIAFB_GET_PANEL_POSITION 0x56494137
0045 #define VIAFB_GET_PANEL_SIZE 0x56494138
0046
0047 #define None_Device 0x00
0048 #define CRT_Device 0x01
0049 #define LCD_Device 0x02
0050 #define DVI_Device 0x08
0051 #define CRT2_Device 0x10
0052 #define LCD2_Device 0x40
0053
0054 #define OP_LCD_CENTERING 0x01
0055 #define OP_LCD_PANEL_ID 0x02
0056 #define OP_LCD_MODE 0x03
0057
0058
0059 #define OP_SAMM 0x80
0060
0061 #define LCD_PANEL_ID_MAXIMUM 23
0062
0063 #define STATE_ON 0x1
0064 #define STATE_OFF 0x0
0065 #define STATE_DEFAULT 0xFFFF
0066
0067 #define MAX_ACTIVE_DEV_NUM 2
0068
0069 struct device_t {
0070 unsigned short crt:1;
0071 unsigned short dvi:1;
0072 unsigned short lcd:1;
0073 unsigned short samm:1;
0074 unsigned short lcd_dsp_cent:1;
0075 unsigned char lcd_mode:1;
0076 unsigned short epia_dvi:1;
0077 unsigned short lcd_dual_edge:1;
0078 unsigned short lcd2:1;
0079
0080 unsigned short primary_dev;
0081 unsigned char lcd_panel_id;
0082 unsigned short xres, yres;
0083 unsigned short xres1, yres1;
0084 unsigned short refresh;
0085 unsigned short bpp;
0086 unsigned short refresh1;
0087 unsigned short bpp1;
0088 unsigned short sequence;
0089 unsigned short bus_width;
0090 };
0091
0092 struct viafb_ioctl_info {
0093 u32 viafb_id;
0094 #define VIAID 0x56494146
0095 u16 vendor_id;
0096 u16 device_id;
0097 u8 version;
0098 u8 revision;
0099 u8 reserved[246];
0100 };
0101
0102 struct viafb_ioctl_mode {
0103 u32 xres;
0104 u32 yres;
0105 u32 refresh;
0106 u32 bpp;
0107 u32 xres_sec;
0108 u32 yres_sec;
0109 u32 virtual_xres_sec;
0110 u32 virtual_yres_sec;
0111 u32 refresh_sec;
0112 u32 bpp_sec;
0113 };
0114 struct viafb_ioctl_samm {
0115 u32 samm_status;
0116 u32 size_prim;
0117 u32 size_sec;
0118 u32 mem_base;
0119 u32 offset_sec;
0120 };
0121
0122 struct viafb_driver_version {
0123 int iMajorNum;
0124 int iKernelNum;
0125 int iOSNum;
0126 int iMinorNum;
0127 };
0128
0129 struct viafb_ioctl_lcd_attribute {
0130 unsigned int panel_id;
0131 unsigned int display_center;
0132 unsigned int lcd_mode;
0133 };
0134
0135 struct viafb_ioctl_setting {
0136
0137 unsigned short device_flag;
0138
0139 unsigned short device_status;
0140 unsigned int reserved;
0141
0142 unsigned short lcd_operation_flag;
0143
0144 unsigned short samm_status;
0145
0146 unsigned short first_dev_hor_res;
0147
0148 unsigned short first_dev_ver_res;
0149
0150 unsigned short second_dev_hor_res;
0151
0152 unsigned short second_dev_ver_res;
0153
0154 unsigned short first_dev_refresh;
0155
0156 unsigned short first_dev_bpp;
0157
0158 unsigned short second_dev_refresh;
0159
0160 unsigned short second_dev_bpp;
0161
0162 unsigned int primary_device;
0163 unsigned int struct_reserved[35];
0164 struct viafb_ioctl_lcd_attribute lcd_attributes;
0165 };
0166
0167 struct _UTFunctionCaps {
0168 unsigned int dw3DScalingState;
0169 unsigned int reserved[31];
0170 };
0171
0172 struct _POSITIONVALUE {
0173 unsigned int dwX;
0174 unsigned int dwY;
0175 };
0176
0177 struct _panel_size_pos_info {
0178 unsigned int device_type;
0179 int x;
0180 int y;
0181 };
0182
0183 extern int viafb_LCD_ON;
0184 extern int viafb_DVI_ON;
0185
0186 int viafb_ioctl_get_viafb_info(u_long arg);
0187 int viafb_ioctl_hotplug(int hres, int vres, int bpp);
0188
0189 #endif