~ubuntu-branches/ubuntu/quantal/vice/quantal

« back to all changes in this revision

Viewing changes to src/arch/os2/gradd.h

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2005-03-27 13:06:04 UTC
  • mfrom: (4 hoary)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20050327130604-zodmv0i60dbbmcik
Tags: 1.16-3
Apply patch from Andreas Jochens <aj@andaco.de> to correct building on
AMD64 and GCC 4.x (closes: #300936)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 *
 
3
 * SOURCE FILE NAME = GRADD.H
 
4
 *
 
5
 * DESCRIPTIVE NAME = Structures and defines for the GRADD Architecture
 
6
 *
 
7
 * Copyright : COPYRIGHT IBM CORPORATION, 1996
 
8
 *             LICENSED MATERIAL - PROGRAM PROPERTY OF IBM
 
9
 *             REFER TO COPYRIGHT INSTRUCTION FORM#G120-2083
 
10
 *
 
11
 * ==========================================================================
 
12
 *
 
13
 * VERSION = 1.0
 
14
 *
 
15
 * DESCRIPTION
 
16
 *      This file contains all of the defines and
 
17
 *      data structures that are shared between the
 
18
 *      video manager and the translation layers.
 
19
 *
 
20
 * FUNCTIONS
 
21
 *
 
22
 * NOTES
 
23
 *
 
24
 * STRUCTURES
 
25
 *
 
26
 * EXTERNAL REFERENCES
 
27
 *
 
28
 * EXTERNAL FUNCTIONS
 
29
 *
 
30
 * CHANGE ACTIVITY =
 
31
 *  DATE      FLAG        APAR   CHANGE DESCRIPTION
 
32
 *  --------  ----------  -----  --------------------------------------
 
33
 *  mm/dd/yy  @Vr.mpppxx  xxxxx  xxxxxxx
 
34
 *
 
35
 ****************************************************************************/
 
36
 
 
37
#ifndef  GRADD_INCLUDED
 
38
  #define GRADD_INCLUDED
 
39
 
 
40
  #include <ddi.h>
 
41
  /*
 
42
   **  Prototype declarations for low level driver function call table.
 
43
   */
 
44
  typedef ULONG CID;             // Chain ID
 
45
  typedef ULONG GrID;             // Gradd ID
 
46
 
 
47
  #define GrID_DONTCARE           0xffffffff
 
48
 
 
49
  typedef ULONG  (EXPENTRY FNHWCMD)(PVOID, PVOID);
 
50
  typedef ULONG  (EXPENTRY FNHWENTRY)(GrID, ULONG, PVOID, PVOID);
 
51
  typedef ULONG  (EXPENTRY FNSDBITBLT)(PVOID, PVOID);
 
52
  typedef ULONG  (EXPENTRY FNSDLINE)(PVOID, PVOID);
 
53
 
 
54
  typedef FNHWENTRY * PFNHWENTRY;
 
55
/*
 
56
  #ifdef FOURCC
 
57
  #undef FOURCC
 
58
  #endif
 
59
 
 
60
  #define FOURCC( ch0, ch1, ch2, ch3 )                      \
 
61
    ( (ULONG)(BYTE)(ch0) | ( (ULONG)(BYTE)(ch1) << 8 ) |    \
 
62
    ( (ULONG)(BYTE)(ch2) << 16 ) | ((ULONG)(BYTE)(ch3) << 24 ) )
 
63
 
 
64
  #define FOURCC_LUT8 FOURCC('L','U','T','8')  // 8-bit palettized
 
65
  #define FOURCC_R565 FOURCC('R','5','6','5')  // RGB 565
 
66
  #define FOURCC_R555 FOURCC('R','5','5','5')  // RGB 555
 
67
  #define FOURCC_R666 FOURCC('R','6','6','6')  // RGB 666
 
68
  #define FOURCC_R664 FOURCC('R','6','6','4')  // RGB 664
 
69
  #define FOURCC_RGB3 FOURCC('R','G','B','3')  // RGB 24 in 3 bytes 
 
70
  #define FOURCC_BGR3 FOURCC('B','G','R','3')  // BGR 24 in 3 bytes 
 
71
  #define FOURCC_RGB4 FOURCC('R','G','B','4')  // RGB 24 in 4 bytes 
 
72
  #define FOURCC_BGR4 FOURCC('B','G','R','4')  // BGR 24 in 4 bytes 
 
73
  #define FOURCC_Y888 FOURCC('Y','8','8','8')  // YUV 24
 
74
  #define FOURCC_Y411 FOURCC('Y','4','1','1')  // YUV 411 interleaved 4 by 1 subsampled
 
75
  #define FOURCC_Y422 FOURCC('Y','4','2','2')  // YUV 422 (CCIR601)
 
76
  #define FOURCC_YUV9 FOURCC('Y','U','V','9')  // YUV9
 
77
  #define FOURCC_Y2X2 FOURCC('Y','2','X','2')  // YUV 2 by 2 subsampled multi-plane
 
78
  #define FOURCC_Y4X4 FOURCC('Y','4','X','4')  // YUV 4 by 4 subsampled multi-plane
 
79
  */
 
80
  typedef struct _GDDMODEINFO {     /* gddmodeinfo */
 
81
     ULONG  ulLength;
 
82
     ULONG  ulModeId;               /* used to make SETMODE request     */
 
83
     ULONG  ulBpp;                  /* no of colors (bpp)               */
 
84
     ULONG  ulHorizResolution;      /* horizontal pels                  */
 
85
     ULONG  ulVertResolution;       /* vertical scan lines              */
 
86
     ULONG  ulRefreshRate;          /* in Hz (0 if not available)       */
 
87
     PBYTE  pbVRAMPhys;             /* physical address of VRAM         */
 
88
     ULONG  ulApertureSize;         /* Current bank size                */
 
89
     ULONG  ulScanLineSize;         /* size (in bytes) of one scan line */
 
90
     ULONG  fccColorEncoding;       /* Pel format (defines above        */
 
91
     ULONG  ulTotalVRAMSize;        /* Total size of VRAM in bytes      */
 
92
     ULONG  cColors;                /* Total number of colors           */
 
93
  } GDDMODEINFO;
 
94
  typedef GDDMODEINFO *PGDDMODEINFO;
 
95
 
 
96
  /*
 
97
  **  Structure for HWEntry router, see gdddata.c for array.
 
98
  */
 
99
  typedef struct _HWCMD {           /* hwcmd */
 
100
          FNHWCMD * pfnHWCmd;
 
101
          ULONG     ulRc;           /* return code if pfnHWCmd is NULL */
 
102
                                    /* ring change otherwise           */
 
103
  } HWCMD;
 
104
  typedef HWCMD *PHWCMD;
 
105
 
 
106
  /*
 
107
  ** Ring change codes
 
108
  */
 
109
  #define DONTCARE   0
 
110
  #define RING2      2
 
111
 
 
112
  /*
 
113
  **  Prototype declarations for low level driver routines
 
114
  */
 
115
  FNHWENTRY HWEntry;
 
116
 
 
117
  /*
 
118
  **  Graphics Hardware Interface (GHI) commands for
 
119
  **  the Base Function class.
 
120
  */
 
121
  #define BASE_FUNCTION_CLASS    "Base Function"
 
122
 
 
123
  #define GHI_CMD_INIT           0
 
124
  #define GHI_CMD_INITPROC       1
 
125
  #define GHI_CMD_TERM           2
 
126
  #define GHI_CMD_TERMPROC       3
 
127
  #define GHI_CMD_QUERYCAPS      4
 
128
  #define GHI_CMD_QUERYMODES     5
 
129
  #define GHI_CMD_SETMODE        6
 
130
  #define GHI_CMD_PALETTE        7
 
131
  #define GHI_CMD_BITBLT         8
 
132
  #define GHI_CMD_LINE           9
 
133
  #define GHI_CMD_MOVEPTR        10
 
134
  #define GHI_CMD_SETPTR         11
 
135
  #define GHI_CMD_SHOWPTR        12
 
136
  #define GHI_CMD_VRAM           13
 
137
  #define GHI_CMD_REQUESTHW      14
 
138
  #define GHI_CMD_EVENT          15
 
139
  #define GHI_CMD_EXTENSION      16
 
140
  #define GHI_CMD_BANK           17
 
141
  #define GHI_CMD_TEXT           18
 
142
  #define GHI_CMD_USERCAPS       19
 
143
  #define GHI_CMD_POLYGON        20
 
144
  #define GHI_CMD_MAX            21
 
145
 
 
146
  /*
 
147
  **  Defines and structures for the GHI_CMD_INIT DDI
 
148
  */
 
149
  typedef struct _GDDINITIN {         /* gddinitin */
 
150
     ULONG        ulLength;
 
151
     PFNHWENTRY   pfnChainedHWEntry;
 
152
  } GDDINITIN;
 
153
  typedef GDDINITIN  *PGDDINITIN;
 
154
 
 
155
  typedef struct _GDDINITOUT {        /* gddinitout */
 
156
     ULONG        ulLength;
 
157
     ULONG        cFunctionClasses;
 
158
  } GDDINITOUT;
 
159
  typedef GDDINITOUT  *PGDDINITOUT;
 
160
 
 
161
  /*
 
162
  **  Defines and structures for the GHI_CMD_INITPROC DDI
 
163
  */
 
164
  typedef struct _INITPROCOUT {         /* initprocout */
 
165
     ULONG        ulLength;
 
166
     ULONG        ulVRAMVirt;
 
167
  } INITPROCOUT;
 
168
  typedef INITPROCOUT  *PINITPROCOUT;
 
169
 
 
170
  /*
 
171
  **  Defines and structures for the GHI_CMD_QUERYCAPS DDI
 
172
  */
 
173
  typedef struct _CAPSINFO {          /* capsinfo */
 
174
     ULONG        ulLength;           /* sizeof CAPSINFO structure      */
 
175
     PSZ          pszFunctionClassID; /* Name describing function set   */
 
176
     ULONG        ulFCFlags;          /* Function class specific flags  */
 
177
  } CAPSINFO;
 
178
  typedef CAPSINFO  *PCAPSINFO;
 
179
 
 
180
  /*
 
181
  ** Defines for ulFCFlags field of the CAPSINFO data structure
 
182
  ** NOTE: The flags below are GRADD Caps for the base function class.
 
183
  */
 
184
  #define GC_SEND_MEM_TO_MEM         0x00000001     // GRADD wants to see M2M blits
 
185
  #define GC_SIM_SRC_PAT_ROPS        0x00000002     // GRADD wants to simulate 3way rops as sequence of 2way rops.
 
186
  //RESERVED - NOT USED NOW
 
187
  #define GC_ALPHA_SUPPORT           0x00000004     // GRADD supports alpha blending rules and
 
188
                                                    // ALPHABITBLTINFO.
 
189
                                                    // If this flag is not returned,
 
190
                                                    // VMAN will never call the Gradd for
 
191
                                                    // Alpha Blending.
 
192
  // SHOULD match DS2_* in pmddi.h
 
193
  #define GC_SRC_STRETCH             0x00000008     // GRADD handles stretchblts
 
194
  #define GC_POLYGON_SIZE_ANY        0x00000010     // GRADD can handle polygon(concave or convex)
 
195
                                                    // of any size.
 
196
                                                    // GC_POLYGON_FILL must be set
 
197
  #define GC_CLIP                    0x00000020     // GRADD can handle single clip rect of
 
198
                                                    // polygons for pfnPolygon and
 
199
                                                    // source bitmap for pfnBitblt with
 
200
                                                    // GC_SRC_STRETCH set.
 
201
                                                    // see GC_CLP_COMPLEX
 
202
  #define GC_CLIP_COMPLEX            0x00000040     // GRADD can handle clipping
 
203
                                                    // with more than one clip rect
 
204
                                                    // GC_CLIP must be set.
 
205
 
 
206
 
 
207
 
 
208
  /* following defines GC_* SHOULD match DS_* in pmddi.h */
 
209
  #define GC_TEXTBLT_DOWNLOADABLE    0x00002000     // Downloadable Fonts
 
210
  #define GC_TEXTBLT_CLIPABLE        0x00004000     // CLIPPABLE    Fonts
 
211
  #define GC_TEXTBLT_DS_DEVICE_FONTS 0x00008000     // Device has Hardware Fonts
 
212
  #define GC_SIMPLE_LINES            0x00800000     // Device handles LINEINFO2.
 
213
  // For compatibility with old source code retain old definitions
 
214
  #define TEXTBLT_DOWNLOADABLE       GC_TEXTBLT_DOWNLOADABLE
 
215
  #define TEXTBLT_CLIPABLE           GC_TEXTBLT_CLIPABLE
 
216
  #define TEXTBLT_DS_DEVICE_FONTS    GC_TEXTBLT_DS_DEVICE_FONTS
 
217
#ifndef DS_SIMPLE_LINES
 
218
  #define DS_SIMPLE_LINES            GC_SIMPLE_LINES
 
219
#endif
 
220
  //RESERVED - NOT USED NOW
 
221
  #define GC_SRC_CONVERT             0x02000000     // send Device independent bitmaps
 
222
                                                    // without converting to device internal format.
 
223
                                                    // Gradd will convert during blts or
 
224
                                                    // call softdraw to simulate.
 
225
                                                    // If not set, GRE will convert DIB in a temporary buffer.
 
226
                                                    // Gradd should set this based on performance.
 
227
  #define GC_POLYGON_FILL            0x08000000     // GRADD can handle polygon(triangle and quad)
 
228
                                                    // fills and POLYGONINFO. see GC_POLYGON_SIZE_ANY
 
229
                                                    // if set, Graphics Engine call pfnPolygon
 
230
                                                    // for fills instead of pfnBitBlt.
 
231
 
 
232
 
 
233
 
 
234
 
 
235
  /*
 
236
  **  Defines and structures for the GHI_CMD_QUERYMODES and GHI_CMD_SETMODE
 
237
  */
 
238
  #define QUERYMODE_NUM_MODES     0x0001
 
239
  #define QUERYMODE_MODE_DATA     0x0002
 
240
  #define QUERYMODE_VALID         (QUERYMODE_NUM_MODES|QUERYMODE_MODE_DATA)
 
241
 
 
242
  /*
 
243
  **  Defines and structures for the GHI_CMD_VRAM
 
244
  */
 
245
  typedef struct _VRAMIN {         /* vramin */
 
246
     ULONG ulLength;
 
247
     ULONG ulFunction;
 
248
     PVOID pIn;
 
249
  } VRAMIN;
 
250
  typedef VRAMIN *PVRAMIN;
 
251
 
 
252
  /*
 
253
  **  Defines for the ulFunction field of the VRAMIN data structure.
 
254
  */
 
255
  #define VRAM_ALLOCATE                1
 
256
  #define VRAM_DEALLOCATE              2
 
257
  #define VRAM_QUERY                   3
 
258
  #define VRAM_REGISTER                4
 
259
  #define VRAM_DEREGISTER              5
 
260
 
 
261
  typedef struct _VRAMREGISTERIN { /* vramregisterin */
 
262
     ULONG ulLength;               /* sizeof(VRAMREGISTERIN) */
 
263
     ULONG ulHandle;               /* de-registering handle  */
 
264
     ULONG ulFlags;                /* Input flags            */
 
265
  } VRAMREGISTERIN;
 
266
  typedef VRAMREGISTERIN *PVRAMREGISTERIN;
 
267
 
 
268
  /*
 
269
  **  Defines for the ulFlags field of the VRAMREGISTERIN data structure.
 
270
  */
 
271
  #define VRAM_REGISTER_HANDLE       0x0001   /* If this bit is set we have  */
 
272
                                              /* a registration if it is off */
 
273
                                              /* we have a deregistration    */
 
274
 
 
275
  #define VRAM_REGISTER_VRAMONLY     0x1000   /* If this flag is set the app */
 
276
                                              /* is registering and telling  */
 
277
                                              /* us that it does not intend  */
 
278
                                              /* to use the accelerator      */
 
279
 
 
280
  typedef struct _VRAMREGISTEROUT {   /* vramregisterout */
 
281
     ULONG ulLength;
 
282
     ULONG ulFlags;                /* Returned flags (currently none def) */
 
283
     ULONG ulHandle;               /* Returned handle                     */
 
284
  } VRAMREGISTEROUT;
 
285
  typedef VRAMREGISTEROUT *PVRAMREGISTEROUT;
 
286
 
 
287
  typedef struct _VRAMALLOCIN {    /* vramallocin */
 
288
     ULONG ulLength;
 
289
     ULONG ulFlags;
 
290
     ULONG ulID;            /* Used for de-allocation */
 
291
     ULONG ulFunction;
 
292
     ULONG ulHandle;
 
293
     ULONG ulSize;
 
294
     ULONG ulWidth;
 
295
     ULONG ulHeight;
 
296
  } VRAMALLOCIN;
 
297
  typedef VRAMALLOCIN *PVRAMALLOCIN;
 
298
 
 
299
  /*
 
300
  **  Defines for the ulFlags field of the VRAMALLOCIN data structure.
 
301
  */
 
302
  #define VRAM_ALLOC_SHARED          0x0001
 
303
  #define VRAM_ALLOC_RECTANGLE       0x0002
 
304
  #define VRAM_ALLOC_WORKBUFFER      0x0004
 
305
  #define VRAM_ALLOC_STATIC          0x1000
 
306
 
 
307
  /*
 
308
  **  Defines for the ulFunction field of the VRAMALLOCIN data structure.
 
309
  */
 
310
  #define VRAM_ALLOCATE                1
 
311
  #define VRAM_DEALLOCATE              2
 
312
  #define VRAM_QUERY                   3
 
313
 
 
314
  typedef struct _VRAMALLOCOUT {   /* vramallocout */
 
315
     ULONG ulLength;
 
316
     ULONG ulFlags;
 
317
     ULONG ulID;
 
318
     POINTL ptlStart;
 
319
     ULONG ulSize;
 
320
     ULONG ulScanLineBytes;
 
321
  } VRAMALLOCOUT;
 
322
  typedef VRAMALLOCOUT *PVRAMALLOCOUT;
 
323
 
 
324
  /*
 
325
  **  Defines and structures for the GHI_CMD_EVENT command
 
326
  */
 
327
  typedef struct _HWEVENTIN {      /* hweventin  */
 
328
     ULONG  ulLength;
 
329
     ULONG  ulEvent;               /* Event type                     */
 
330
     PVOID  pEventData;            /* Pointer to event specific data */
 
331
  } HWEVENTIN;
 
332
  typedef HWEVENTIN *PHWEVENTIN;
 
333
 
 
334
  /*
 
335
  **  Defines for the ulEvent field of the HWEVENTIN data structure.
 
336
  */
 
337
  #define EVENT_FOREGROUND             1
 
338
  #define EVENT_BACKGROUND             2
 
339
  #define EVENT_NEWCHAININFO           3
 
340
 
 
341
  /*
 
342
  **  Defines and structures for the GHI_CMD_EXTENSION command
 
343
  */
 
344
  typedef struct _HWEXTENSION {          /* hwextension */
 
345
     ULONG  ulLength;
 
346
     ULONG  ulXSubFunction;
 
347
     ULONG  cScrChangeRects;
 
348
     PRECTL arectlScreen;
 
349
     ULONG  ulXFlags;
 
350
     PVOID  pXP1;
 
351
  } HWEXTENSION;
 
352
  typedef HWEXTENSION *PHWEXTENSION;
 
353
 
 
354
  /*
 
355
  **  Defines for the ulXFlags field of the HWEXTENSION data structure.
 
356
  */
 
357
  #define X_REQUESTHW  1
 
358
 
 
359
 
 
360
  /*
 
361
  ** GRADD.SYS defines        
 
362
  */
 
363
 
 
364
  #define GRADDPDD_IOCTL   0x10
 
365
  #define GRADDPDD_LOCK       0
 
366
  #define GRADDPDD_UNLOCK     1
 
367
  #define GRADDPDD_SETMTRR    2
 
368
 
 
369
  typedef struct _MTRRIN 
 
370
  {
 
371
      ULONG     ulPhysAddr;            /* Starting Physical address              */
 
372
      ULONG     ulLength;              /* Range to be enabled for WC             */
 
373
      ULONG     ulFlags;               /* Flags as defined above. Bit 27 is      */
 
374
                                       /* interrpreted as a Enable MTRR if set   */
 
375
                                       /* and as a Disable MTRR if not set       */
 
376
  } MTRRIN, *PMTRRIN;
 
377
 
 
378
  ULONG GHSetMTRR(PMTRRIN, BOOL);
 
379
 
 
380
  /*
 
381
  ** The following are the possible values for the flags which are returned when
 
382
  ** calling GRADDPDD_SETMTRR these are also defined in GRADDSYS.H for use by 
 
383
  ** GRADD.SYS please make sure any updates are kept in synch.
 
384
  **
 
385
  ** The first(low order byte) is reserved for Processor Identification and is 
 
386
  ** interpreted as a number.  The 2nd byte is reserved for future use. The
 
387
  ** 3rd byte is interpreted as a set of flags indicating what support is 
 
388
  ** available and the high order byte is interpreted as a number corresponding
 
389
  ** to the command passed in to the SetMTRR function.
 
390
  */
 
391
  #define INTEL_PROCESSOR  0x00000001
 
392
  #define AMD_PROCESSOR    0x00000002
 
393
  #define CYRIX_PROCESSOR  0x00000003
 
394
  #define CPUID_SUPPORT    0x00010000
 
395
  #define MTRR_SUPPORT     0x00020000
 
396
  #define MTRR_ENABLED     0x00040000
 
397
  #define MTRR_AVAILABLE   0x00080000
 
398
  #define WC_ENABLED       0x00100000
 
399
 
 
400
  #define VENDOR_MASK      0x000000FF
 
401
  #define COMMAND_MASK     0xFF000000
 
402
 
 
403
  /*
 
404
  ** Or one of the following into the ulFlags field of MTRRIN to 
 
405
  ** enabled/disable WC
 
406
  */
 
407
  #define MTRR_DISABLE     0x00000000
 
408
  #define MTRR_ENABLE      0x01000000
 
409
  #define MTRR_QUERY       0x02000000
 
410
  #define MTRR_CMD_MAX     MTRR_QUERY
 
411
  
 
412
 
 
413
  /*
 
414
  ** End of GRADD.SYS defines 
 
415
  */
 
416
 
 
417
  /*
 
418
  **  Prototype declarations for Video Manager Interface (VMI)
 
419
  */
 
420
 
 
421
  typedef ULONG (EXPENTRY FNVMIENTRY)(GrID, ULONG, PVOID, PVOID);
 
422
 
 
423
  /*
 
424
  **  VMI commands which map directly to GRADD commands
 
425
  */
 
426
  #define VMI_CMD_INIT             GHI_CMD_INIT
 
427
  #define VMI_CMD_INITPROC         GHI_CMD_INITPROC
 
428
  #define VMI_CMD_TERM             GHI_CMD_TERM
 
429
  #define VMI_CMD_TERMPROC         GHI_CMD_TERMPROC
 
430
  #define VMI_CMD_QUERYCAPS        GHI_CMD_QUERYCAPS
 
431
  #define VMI_CMD_QUERYMODES       GHI_CMD_QUERYMODES
 
432
  #define VMI_CMD_SETMODE          GHI_CMD_SETMODE
 
433
  #define VMI_CMD_PALETTE          GHI_CMD_PALETTE
 
434
  #define VMI_CMD_BITBLT           GHI_CMD_BITBLT
 
435
  #define VMI_CMD_LINE             GHI_CMD_LINE
 
436
  #define VMI_CMD_MOVEPTR          GHI_CMD_MOVEPTR
 
437
  #define VMI_CMD_SETPTR           GHI_CMD_SETPTR
 
438
  #define VMI_CMD_SHOWPTR          GHI_CMD_SHOWPTR
 
439
  #define VMI_CMD_VRAM             GHI_CMD_VRAM
 
440
  #define VMI_CMD_REQUESTHW        GHI_CMD_REQUESTHW
 
441
  #define VMI_CMD_EVENT            GHI_CMD_EVENT
 
442
  #define VMI_CMD_EXTENSION        GHI_CMD_EXTENSION
 
443
  #define VMI_CMD_BANK             GHI_CMD_BANK
 
444
  #define VMI_CMD_TEXT             GHI_CMD_TEXT
 
445
  #define VMI_CMD_USERCAPS         GHI_CMD_USERCAPS
 
446
  #define VMI_CMD_POLYGON          GHI_CMD_POLYGON
 
447
 
 
448
  /*
 
449
  **  VMI commands unique to the video manager
 
450
  */
 
451
  #define VMI_CMD_BASE             0x1000
 
452
 
 
453
  #define VMI_CMD_QUERYCHAININFO   VMI_CMD_BASE + 0
 
454
  #define VMI_CMD_QUERYCURRENTMODE VMI_CMD_BASE + 1
 
455
  #define VMI_CMD_EXCLUDEPTR       VMI_CMD_BASE + 2
 
456
  #define VMI_CMD_UPDATECHAININFO  VMI_CMD_BASE + 3
 
457
  #define VMI_CMD_MAX              VMI_CMD_BASE + 4
 
458
 
 
459
  /*
 
460
  **  Defines and structures for VMI_CMD_QUERYCHAININFO
 
461
  */
 
462
  typedef struct _GRADDINFO {       /* graddinfo */
 
463
          GrID                   gid;
 
464
          PSZ                   pszGraddName;
 
465
          PFNHWENTRY            pGraddEntry;
 
466
          PFNHWENTRY            pChainEntry;
 
467
          ULONG                 cModes;
 
468
          struct _GDDMODEINFO * pModeInfo;
 
469
          struct _CAPSINFO *    pCapsInfo;
 
470
          struct _GRADDINFO *   pNextGraddInfo;
 
471
  } GRADDINFO ;
 
472
  typedef GRADDINFO *PGRADDINFO;
 
473
 
 
474
  typedef struct _CHAININFO {       /* chaininfo */
 
475
          CID                   cid;
 
476
          PSZ                   pszChainName;
 
477
          PFNHWENTRY            pChainHWEntry;
 
478
          PGRADDINFO            pGraddList;
 
479
          struct _CHAININFO *   pNextChainInfo;
 
480
  } CHAININFO ;
 
481
  typedef CHAININFO *PCHAININFO;
 
482
 
 
483
 
 
484
  typedef struct _VMIQCI {          /* vmiqci */
 
485
     ULONG        ulLength;
 
486
     PCHAININFO   pciHead;                /* Head of the GRADD chain      */
 
487
  } VMIQCI;
 
488
  typedef VMIQCI  *PVMIQCI;
 
489
 
 
490
  /*
 
491
  **  Defines and structures for VMI_CMD_EXCLUDEPTR
 
492
  */
 
493
  typedef struct _EXCLUDEPTRIN {       /* excludeptrin                    */
 
494
     ULONG  ulLength;                  /* sizeof(EXCLUDEPTRIN)            */
 
495
     BOOL   fAdd;                      /* TRUE - add, FASE - remove rects */
 
496
     ULONG  cExcludeRects;             /* count of exclude rectangles     */
 
497
     PRECTL apRectls;                  /* array of exclude rectangles     */
 
498
  } EXCLUDEPTRIN;
 
499
  typedef EXCLUDEPTRIN *PEXCLUDEPTRIN;
 
500
 
 
501
  /*
 
502
  ** Video Helper services exported by VMAN
 
503
  */
 
504
  typedef struct _MEMINFO    {   /* meminfo */
 
505
    ULONG       ulPhysAddr;
 
506
    ULONG       ulMemLen;
 
507
    ULONG       ulVirtAddr;
 
508
    PVOID       pNextMI;
 
509
  } MEMINFO;
 
510
  typedef MEMINFO *PMEMINFO;
 
511
 
 
512
  ULONG VHMap(PVOID, ULONG);
 
513
  ULONG VHMapVRAM(ULONG, ULONG, PBYTE *, PBYTE *);
 
514
  ULONG VHLockMem(PVOID, ULONG, BOOL);
 
515
  ULONG VHUnLockMem(ULONG);
 
516
  PVOID VHAllocMem(ULONG);
 
517
  ULONG VHFreeMem(PVOID);
 
518
  ULONG VHPhysToVirt(PMEMINFO);
 
519
  ULONG VHGetVRAMInfo(PMEMINFO);
 
520
  ULONG VHSetMTRR(PMTRRIN, BOOL);
 
521
  ULONG EXPENTRY VMIEntry(GrID, ULONG, PVOID, PVOID);
 
522
  ULONG EXPENTRY VHSortTriangle(PPOINTL pptl, PPOINTL pptlBounds);
 
523
  ULONG EXPENTRY VHSortQuad(PPOINTL pptl, PPOINTL pptlBounds);
 
524
 
 
525
  // Defines for xxxxxx
 
526
 
 
527
  #define TRAPEZOID_COLLINEAR            0x0000
 
528
  #define TRAPEZOID_TRIANGLE             0x0001
 
529
  #define TRAPEZOID_TWO_TRIANGLES        0x0002
 
530
  #define TRAPEZOID_DIAMOND              0x0004
 
531
  #define TRAPEZOID_MINY_HORIZONTAL      0x0010
 
532
  #define TRAPEZOID_MAXY_HORIZONTAL      0x0020
 
533
  #define TRAPEZOID_LEFT_SPLIT           0x0040
 
534
  #define TRAPEZOID_RIGHT_SPLIT          0x0080
 
535
  #define TRAPEZOID_MIDY_HORIZONTAL      0x0100
 
536
  #define TRAPEZOID_SECOND_SPLIT_LEFT    0x0200
 
537
  #define TRAPEZOID_SECOND_SPLIT_RIGHT   0x0400
 
538
 
 
539
 
 
540
  /*
 
541
  **  Defines for the ulFlags field of the HEADER data structure.
 
542
  */
 
543
  #define SERIALIZE_REQUIRED           0x1
 
544
 
 
545
  #define QUERYCAPS                        1L
 
546
  #define QUERYCAPSLIST                    2L
 
547
  #define SETCAP                           3L
 
548
 
 
549
  typedef struct _USERCAPSIN
 
550
  {
 
551
     ULONG ulLength;
 
552
     ULONG ulFunction;
 
553
     ULONG ulSize;
 
554
  } USERCAPSIN;
 
555
  typedef USERCAPSIN *PUSERCAPSIN;
 
556
 
 
557
 
 
558
 
 
559
 
 
560
#endif   /* ifndef GRADD_INCLUDED */