Naveen Neel / shedskin
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers videoagp.h Source File

videoagp.h

00001 /*
00002  * videoagp.h
00003  *
00004  * Video miniport AGP interface
00005  *
00006  * This file is part of the w32api package.
00007  *
00008  * Contributors:
00009  *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
00010  *
00011  * THIS SOFTWARE IS NOT COPYRIGHTED
00012  *
00013  * This source code is offered for use in the public domain. You may
00014  * use, modify or distribute it freely.
00015  *
00016  * This code is distributed in the hope that it will be useful but
00017  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
00018  * DISCLAIMED. This includes but is not limited to warranties of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00020  *
00021  */
00022 
00023 #ifndef __VIDEOAGP_H
00024 #define __VIDEOAGP_H
00025 
00026 #if __GNUC__ >=3
00027 #pragma GCC system_header
00028 #endif
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 #include "ntddk.h"
00035 #include "video.h"
00036 
00037 
00038 #define VIDEO_AGP_RATE_1X                 0x00000001
00039 #define VIDEO_AGP_RATE_2X                 0x00000002
00040 #define VIDEO_AGP_RATE_4X                 0x00000004
00041 #define VIDEO_AGP_RATE_8X                 0x00000008
00042 
00043 typedef enum _VIDEO_PORT_CACHE_TYPE {
00044     VpNonCached = 0,
00045     VpWriteCombined,
00046     VpCached
00047 } VIDEO_PORT_CACHE_TYPE;
00048 
00049 typedef BOOLEAN DDKAPI
00050 (*PAGP_COMMIT_PHYSICAL)(
00051   /*IN*/ PVOID  HwDeviceExtension,
00052   /*IN*/ PVOID  PhysicalReserveContext,
00053   /*IN*/ ULONG  Pages,
00054   /*IN*/ ULONG  Offset);
00055 
00056 typedef PVOID DDKAPI
00057 (*PAGP_COMMIT_VIRTUAL)(
00058   /*IN*/  PVOID  HwDeviceExtension,
00059   /*IN*/  PVOID  VirtualReserveContext,
00060   /*IN*/  ULONG  Pages,
00061   /*IN*/  ULONG  Offset);
00062 
00063 typedef VOID DDKAPI
00064 (*PAGP_FREE_PHYSICAL)(
00065   /*IN*/  PVOID  HwDeviceExtension,
00066   /*IN*/  PVOID  PhysicalReserveContext,
00067   /*IN*/  ULONG  Pages,
00068   /*IN*/  ULONG  Offset);
00069 
00070 typedef VOID DDKAPI
00071 (*PAGP_FREE_VIRTUAL)(
00072   /*IN*/ PVOID  HwDeviceExtension,
00073   /*IN*/ PVOID  VirtualReserveContext,
00074   /*IN*/ ULONG  Pages,
00075   /*IN*/ ULONG  Offset);
00076 
00077 typedef VOID DDKAPI
00078 (*PAGP_RELEASE_PHYSICAL)(
00079   /*IN*/ PVOID  HwDeviceExtension,
00080   /*IN*/ PVOID  PhysicalReserveContext);
00081 
00082 typedef VOID DDKAPI
00083 (*PAGP_RELEASE_VIRTUAL)(
00084   /*IN*/  PVOID  HwDeviceExtension,
00085   /*IN*/  PVOID  VirtualReserveContext);
00086 
00087 typedef PHYSICAL_ADDRESS DDKAPI
00088 (*PAGP_RESERVE_PHYSICAL)(
00089   /*IN*/ PVOID  HwDeviceExtension,
00090   /*IN*/ ULONG  Pages,
00091   /*IN*/ VIDEO_PORT_CACHE_TYPE  Caching,
00092   /*OUT*/ PVOID  *PhysicalReserveContext);
00093 
00094 typedef PVOID DDKAPI
00095 (*PAGP_RESERVE_VIRTUAL)(
00096   /*IN*/ PVOID  HwDeviceExtension,
00097   /*IN*/ HANDLE  ProcessHandle,
00098   /*IN*/ PVOID  PhysicalReserveContext,
00099   /*OUT*/ PVOID  *VirtualReserveContext);
00100 
00101 typedef BOOLEAN DDKAPI
00102 (*PAGP_SET_RATE)(
00103   /*IN*/ PVOID  HwDeviceExtension,
00104   /*IN*/ ULONG  AgpRate);
00105 
00106 typedef struct _VIDEO_PORT_AGP_SERVICES {
00107   PAGP_RESERVE_PHYSICAL  AgpReservePhysical;
00108   PAGP_RELEASE_PHYSICAL  AgpReleasePhysical;
00109   PAGP_COMMIT_PHYSICAL  AgpCommitPhysical;
00110   PAGP_FREE_PHYSICAL  AgpFreePhysical;
00111   PAGP_RESERVE_VIRTUAL  AgpReserveVirtual;
00112   PAGP_RELEASE_VIRTUAL  AgpReleaseVirtual;
00113   PAGP_COMMIT_VIRTUAL  AgpCommitVirtual;
00114   PAGP_FREE_VIRTUAL  AgpFreeVirtual;
00115   ULONGLONG  AllocationLimit;
00116 } VIDEO_PORT_AGP_SERVICES, *PVIDEO_PORT_AGP_SERVICES;
00117 
00118 VPAPI
00119 BOOLEAN
00120 DDKAPI
00121 VideoPortGetAgpServices(
00122   /*IN*/ PVOID  HwDeviceExtension,
00123   /*IN*/ PVIDEO_PORT_AGP_SERVICES  AgpServices);
00124 
00125 #ifdef __cplusplus
00126 }
00127 #endif
00128 
00129 #endif /* __VIDEOAGP_H */