blob: 81144ee505cd3b2f1eb4fa7b85646eff205eb481 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
/*
* Copyright (C) 2009 RDC Semiconductor Co.,Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For technical support :
* <jason.lin@rdc.com.tw>
*/
/******************************************************************************/
/* */
/* Escape function definite */
/* */
/******************************************************************************/
// user defined type.
typedef unsigned short WORD;
typedef unsigned long DWORD;
// Escape return value
#define UT_FAIL 0x0000
#define UT_SUCCESS 0x0001
#define UT_MODESET 0x0002
#define UT_INVALID 0x1FFF
#define UT_NOT_IMPLEMENT 0xFFFF
// Escape function define
#define UT_QUERY_SUPPORT_DEVICE 0x1001
#define UT_QUERY_CONNECT_DEVICE 0x1002
#define UT_SET_DEVICE_ACT 0x1003
#define UT_QUERY_PRIMARY_DEVICE 0x1004
#define UT_SET_PRIMARY_DEVICE 0x1005
#define UT_QUERY_ACT_DEVICE 0x1006
#define UT_QUERY_HW_INFO 0x1201
#define UT_QUERY_BIOS_VERSION 0x1202
#define UT_QUERY_MEM_INFO 0x1203
#define UT_QUERY_CLK_SPEED 0x1204
#define UT_QUERY_SAMM 0x1205
#define UT_SET_GAMMA 0x1101
#define UT_QUERY_GAMMA 0x1102
#define UT_SET_LCD_PWM 0x1103
#define UT_QUERY_LCD_PWM 0x1104
#define UT_QUERY_LCD_SIZE 0X1105
// Escape jpeg decoder function define
#define UT_DECODER_JPEG_ENTRY 0x2001
// Escape jpeg eecoder function define
#define UT_ENCODER_JPEG_ENTRY 0x2101
#define UT_GET_USERMODE_DIRECTACCESS 0x2200
/* For display Xextension */
#define RDC_GFX_UT_EXTENSION_NAME "RDCGFX_API"
#define RDCGFX_PARM_NUM 256
#define X_RDCGFXQueryVersion 0
#define X_RDCGFXCommand 1
typedef struct {
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 majorVersion B16;
CARD16 minorVersion B16;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xRDCGFXQueryVersionReply;
typedef struct {
CARD8 reqType;
CARD8 RDCGFXReqType;
CARD16 length B16;
CARD32 util_cmd_id;
CARD32 *inBuffer;
CARD32 inBufferSize;
CARD32 *outBuffer;
CARD32 outBufferSize;
CARD32 result_header;
CARD32 pad;
} xRDCGFXCommandReq;
/*============ Request and Reply Structures Definition==================*/
typedef union
{
struct
{
WORD LCD ;
WORD DVI ;
WORD CRT ;
WORD HDMI ;
WORD HDTV ;
WORD TV ;
WORD LCD2 ;
WORD DVI2 ;
WORD CRT2 ;
WORD HDMI2 ;
WORD HDTV2 ;
WORD TV2 ;
WORD RESERVE ;
} TABLE ;
WORD MERGE ;
} UTDEVICELIST;
typedef struct _UTHWINFO
{
ULONG ulVenderID;
ULONG ulDeviceID;
ULONG ulSubSystemID;
ULONG ulSubVenderID;
ULONG ulRevision;
}UTHWINFO;
typedef struct _UTBIOSDATA
{
ULONG wData1;
ULONG wData2;
ULONG wData3;
ULONG wDate;
}UTBIOSDATA;
typedef struct _CLKINFO
{
ULONG MemCLK; /*(The unit is MHz)*/
ULONG EngCLK; /*(The unit is MHz)*/
}CLKINFO;
typedef struct _VIDEO_CLUTDATA
{
UCHAR Red;
UCHAR Green;
UCHAR Blue;
UCHAR Unused;
} VIDEO_CLUTDATA, *PVIDEO_CLUTDATA;
typedef struct
{
USHORT NumEntries ; // total 256 entries
USHORT FirstEntry ; // start from 0
union
{
VIDEO_CLUTDATA RgbArray ;
ULONG RgbLong ;
} LookupTable[1] ;
} VIDEO_CLUT, *PVIDEO_CLUT ;
typedef struct
{
DWORD device ; // the device
DWORD dwSize; // the size of gamma tbl
PVIDEO_CLUT table ; // the table
} GammaTbl, *pGammaTbl ;
// LCD info structure.
typedef struct _LCDINFO
{
WORD wLCDHeight;
WORD wLCDWidth;
} LCDINFO, *PLCDINFO;
|