ReactOS  0.4.14-dev-293-g2b39b42
funclist.c
Go to the documentation of this file.
1 /*
2  * VideoPort driver
3  *
4  * Copyright (C) 2007 ReactOS Team
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  */
21 
22 #include "videoprt.h"
23 
24 #define NDEBUG
25 #include <debug.h>
26 
31 
32 /* GLOBAL VARIABLES ***********************************************************/
33 
34 /* Create an array of entries with pfn, psz, for IntVideoPortGetProcAddress */
35 #define MAKE_ENTRY(FUNCTIONNAME) { FUNCTIONNAME, #FUNCTIONNAME }
96 };
97 #undef MAKE_ENTRY
98 
101  IN PVOID HwDeviceExtension,
103 {
104  ULONG i;
105 
106  TRACE_(VIDEOPRT, "VideoPortGetProcAddress(%s)\n", FunctionName);
107 
108  /* Search by name */
109  for (i = 0; i < ARRAYSIZE(VideoPortExports); i++)
110  {
112  {
113  return (PVOID)VideoPortExports[i].Address;
114  }
115  }
116 
117  ERR_(VIDEOPRT, "VideoPortGetProcAddress: Can't resolve symbol %s\n", FunctionName);
118 
119  return NULL;
120 }
signed char * PCHAR
Definition: retypes.h:7
struct _VIDEO_PORT_FUNCTION_TABLE * PVIDEO_PORT_FUNCTION_TABLE
CONST char * PCSZ
Definition: umtypes.h:125
VPAPI PVOID NTAPI VideoPortGetRomImage(IN PVOID HwDeviceExtension, IN PVOID Unused1, IN ULONG Unused2, IN ULONG Length)
Definition: videoprt.c:844
VPAPI VP_STATUS NTAPI VideoPortQueryServices(IN PVOID HwDeviceExtension, IN VIDEO_PORT_SERVICES ServicesType, IN OUT PINTERFACE Interface)
Definition: services.c:40
#define IN
Definition: typedefs.h:38
VPAPI PDMA NTAPI VideoPortDoDma(IN PVOID HwDeviceExtension, IN PDMA pDma, IN DMA_FLAGS DmaFlags)
Definition: dma.c:426
struct _VIDEO_PORT_FUNCTION_TABLE VIDEO_PORT_FUNCTION_TABLE
VPAPI VP_STATUS NTAPI VideoPortCreateEvent(IN PVOID HwDeviceExtension, IN ULONG EventFlag, IN PVOID Unused, OUT PEVENT *ppEvent)
Definition: event.c:24
unsigned char * PUCHAR
Definition: retypes.h:3
VPAPI VOID NTAPI VideoPortFreeCommonBuffer(IN PVOID HwDeviceExtension, IN ULONG Length, IN PVOID VirtualAddress, IN PHYSICAL_ADDRESS LogicalAddress, IN BOOLEAN CacheEnabled)
Definition: dma.c:187
#define ERR_(ch,...)
Definition: debug.h:156
VPAPI LONG NTAPI VideoPortReadStateEvent(IN PVOID HwDeviceExtension, IN PEVENT pEvent)
Definition: stubs.c:68
VPAPI VOID NTAPI VideoPortUnlockBuffer(IN PVOID HwDeviceExtension, IN PVOID Mdl)
Definition: resource.c:1033
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
VPAPI PDMA NTAPI VideoPortAssociateEventsWithDmaHandle(IN PVOID HwDeviceExtension, IN OUT PVIDEO_REQUEST_PACKET pVrp, IN PVOID MappedUserEvent, IN PVOID DisplayDriverEvent)
Definition: dma.c:439
VPAPI PVOID NTAPI VideoPortGetMdl(IN PVOID HwDeviceExtension, IN PDMA pDma)
Definition: stubs.c:58
VPAPI PVOID NTAPI VideoPortAllocateContiguousMemory(IN PVOID HwDeviceExtension, IN ULONG NumberOfBytes, IN PHYSICAL_ADDRESS HighestAcceptableAddress)
Definition: videoprt.c:1382
VPAPI ULONG NTAPI VideoPortGetAssociatedDeviceID(IN PVOID DeviceObject)
Definition: stubs.c:38
VPAPI VOID NTAPI VideoPortReleaseBuffer(IN PVOID HwDeviceExtension, IN PVOID Buffer)
Definition: resource.c:955
VPAPI PVOID NTAPI VideoPortGetCommonBuffer(IN PVOID HwDeviceExtension, IN ULONG DesiredLength, IN ULONG Alignment, OUT PPHYSICAL_ADDRESS LogicalAddress, OUT PULONG pActualLength, IN BOOLEAN CacheEnabled)
Definition: dma.c:215
VPAPI LONG FASTCALL VideoPortInterlockedDecrement(IN PLONG Addend)
Definition: stubs.c:110
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VPAPI LONGLONG NTAPI VideoPortQueryPerformanceCounter(IN PVOID HwDeviceExtension, OUT PLONGLONG PerformanceFrequency OPTIONAL)
Definition: videoprt.c:1317
VPAPI ULONG NTAPI VideoPortGetBytesUsed(IN PVOID HwDeviceExtension, IN PDMA pDma)
Definition: stubs.c:48
PVOID NTAPI IntVideoPortGetProcAddress(IN PVOID HwDeviceExtension, IN PUCHAR FunctionName)
Definition: funclist.c:100
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
VPAPI VP_STATUS NTAPI VideoPortWaitForSingleObject(IN PVOID HwDeviceExtension, IN PVOID Object, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: event.c:112
VPAPI PVOID NTAPI VideoPortAllocatePool(IN PVOID HwDeviceExtension, IN VP_POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
Definition: resource.c:913
VPAPI PVOID NTAPI VideoPortGetDmaContext(IN PVOID HwDeviceExtension, IN PDMA pDma)
Definition: dma.c:414
VPAPI VP_STATUS NTAPI VideoPortCreateSecondaryDisplay(IN PVOID HwDeviceExtension, IN OUT PVOID *SecondaryDeviceExtension, IN ULONG ulFlag)
Definition: videoprt.c:1156
VPAPI VOID NTAPI VideoPortReleaseCommonBuffer(IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN ULONG Length, IN PHYSICAL_ADDRESS LogicalAddress, IN PVOID VirtualAddress, IN BOOLEAN CacheEnabled)
Definition: dma.c:68
VPAPI VOID NTAPI VideoPortPutDmaAdapter(IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter)
Definition: dma.c:93
VPAPI VOID NTAPI VideoPortReleaseSpinLock(IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, IN UCHAR NewIrql)
Definition: spinlock.c:90
smooth NULL
Definition: ftsmooth.c:416
VPAPI VOID NTAPI VideoPortAcquireSpinLockAtDpcLevel(IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)
Definition: spinlock.c:77
VPAPI BOOLEAN NTAPI VideoPortCheckForDeviceExistence(IN PVOID HwDeviceExtension, IN USHORT VendorId, IN USHORT DeviceId, IN UCHAR RevisionId, IN USHORT SubVendorId, IN USHORT SubSystemId, IN ULONG Flags)
Definition: videoprt.c:1241
VPAPI VOID NTAPI VideoPortFreePool(IN PVOID HwDeviceExtension, IN PVOID Ptr)
Definition: resource.c:928
#define TRACE_(x)
Definition: compat.h:66
VPAPI VP_STATUS NTAPI VideoPortDeleteSpinLock(IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)
Definition: spinlock.c:49
VPAPI LONG FASTCALL VideoPortInterlockedExchange(IN OUT PLONG Target, IN LONG Value)
Definition: stubs.c:126
VPAPI VP_STATUS NTAPI VideoPortAllocateBuffer(IN PVOID HwDeviceExtension, IN ULONG Size, OUT PVOID *Buffer)
Definition: resource.c:940
VPAPI PVOID NTAPI VideoPortGetAssociatedDeviceExtension(IN PVOID DeviceObject)
Definition: videoprt.c:1186
VPAPI VP_STATUS NTAPI VideoPortDeleteEvent(IN PVOID HwDeviceExtension, IN PEVENT pEvent)
Definition: event.c:70
VPAPI VP_STATUS NTAPI VideoPortCompleteDma(IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVP_SCATTER_GATHER_LIST VpScatterGather, IN BOOLEAN WriteToDevice)
Definition: dma.c:453
VPAPI VOID NTAPI VideoPortReleaseDeviceLock(IN PVOID HwDeviceExtension)
Definition: videoprt.c:1352
VPAPI VOID NTAPI VideoPortSetBytesUsed(IN PVOID HwDeviceExtension, IN OUT PDMA pDma, IN ULONG BytesUsed)
Definition: stubs.c:78
VPAPI VOID NTAPI VideoPortSetDmaContext(IN PVOID HwDeviceExtension, OUT PDMA pDma, IN PVOID InstanceContext)
Definition: dma.c:302
VPAPI LONG FASTCALL VideoPortInterlockedIncrement(IN PLONG Addend)
Definition: stubs.c:118
VPAPI VOID NTAPI VideoPortReleaseSpinLockFromDpcLevel(IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)
Definition: spinlock.c:104
VPAPI BOOLEAN NTAPI VideoPortLockPages(IN PVOID HwDeviceExtension, IN OUT PVIDEO_REQUEST_PACKET pVrp, IN OUT PEVENT pUEvent, IN PEVENT pDisplayEvent, IN DMA_FLAGS DmaFlags)
VPAPI VOID NTAPI VideoPortAcquireDeviceLock(IN PVOID HwDeviceExtension)
Definition: videoprt.c:1333
VPAPI VP_STATUS NTAPI VideoPortGetVgaStatus(IN PVOID HwDeviceExtension, OUT PULONG VgaStatus)
Definition: videoprt.c:816
VPAPI VOID NTAPI VideoPortClearEvent(IN PVOID HwDeviceExtension, IN PEVENT pEvent)
Definition: event.c:101
VPAPI PVOID NTAPI VideoPortLockBuffer(IN PVOID HwDeviceExtension, IN PVOID BaseAddress, IN ULONG Length, IN VP_LOCK_OPERATION Operation)
Definition: resource.c:968
VPAPI VP_STATUS NTAPI VideoPortCreateSpinLock(IN PVOID HwDeviceExtension, OUT PSPIN_LOCK *SpinLock)
Definition: spinlock.c:32
VPAPI BOOLEAN NTAPI VideoPortSignalDmaComplete(IN PVOID HwDeviceExtension, IN PDMA pDmaHandle)
Definition: dma.c:315
VPAPI VP_STATUS NTAPI VideoPortRegisterBugcheckCallback(IN PVOID HwDeviceExtension, IN ULONG BugcheckCode, IN PVIDEO_BUGCHECK_CALLBACK Callback, IN ULONG BugcheckDataSize)
Definition: videoprt.c:1302
VPAPI BOOLEAN NTAPI VideoPortQueueDpc(IN PVOID HwDeviceExtension, IN PMINIPORT_DPC_ROUTINE CallbackRoutine, IN PVOID Context)
Definition: videoprt.c:1170
VPAPI PDMA NTAPI VideoPortMapDmaMemory(IN PVOID HwDeviceExtension, IN PVIDEO_REQUEST_PACKET pVrp, IN PHYSICAL_ADDRESS BoardAddress, IN PULONG Length, IN PULONG InIoSpace, IN PVOID MappedUserEvent, IN PVOID DisplayDriverEvent, IN OUT PVOID *VirtualAddress)
Definition: dma.c:284
#define MAKE_ENTRY(FUNCTIONNAME)
Definition: funclist.c:35
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char * FunctionName
Definition: acpixf.h:1264
VPAPI LONG NTAPI VideoPortSetEvent(IN PVOID HwDeviceExtension, IN PEVENT pEvent)
Definition: event.c:90
VPAPI PVP_DMA_ADAPTER NTAPI VideoPortGetDmaAdapter(IN PVOID HwDeviceExtension, IN PVP_DEVICE_DESCRIPTION VpDeviceDescription)
Definition: dma.c:120
VPAPI BOOLEAN NTAPI VideoPortUnmapDmaMemory(IN PVOID HwDeviceExtension, IN PVOID VirtualAddress, IN HANDLE ProcessHandle, IN PDMA BoardMemoryHandle)
const VIDEO_PORT_FUNCTION_TABLE VideoPortExports[]
Definition: funclist.c:36
unsigned int ULONG
Definition: retypes.h:1
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
VPAPI VP_STATUS NTAPI VideoPortStartDma(IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVOID Mdl, IN ULONG Offset, IN OUT PULONG pLength, IN PEXECUTE_DMA ExecuteDmaRoutine, IN PVOID Context, IN BOOLEAN WriteToDevice)
Definition: dma.c:355
VPAPI VP_STATUS NTAPI VideoPortGetVersion(IN PVOID HwDeviceExtension, IN OUT PVPOSVERSIONINFO pVpOsVersionInfo)
Definition: videoprt.c:1203
VPAPI BOOLEAN NTAPI VideoPortUnlockPages(IN PVOID hwDeviceExtension, IN OUT PDMA pDma)
VPAPI BOOLEAN NTAPI VideoPortDDCMonitorHelper(IN PVOID HwDeviceExtension, IN PVOID DDCControl, IN OUT PUCHAR EdidBuffer, IN ULONG EdidBufferSize)
BOOLEAN NTAPI VideoPortGetAgpServices(IN PVOID HwDeviceExtension, IN PVIDEO_PORT_AGP_SERVICES AgpServices)
VPAPI VOID NTAPI VideoPortAcquireSpinLock(IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, OUT PUCHAR OldIrql)
Definition: spinlock.c:63
VPAPI PVOID NTAPI VideoPortAllocateCommonBuffer(IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN ULONG DesiredLength, OUT PPHYSICAL_ADDRESS LogicalAddress, IN BOOLEAN CacheEnabled, PVOID Reserved)
Definition: dma.c:43
VPAPI VP_STATUS NTAPI VideoPortEnumerateChildren(IN PVOID HwDeviceExtension, IN PVOID Reserved)
Definition: videoprt.c:986
VPAPI VP_STATUS NTAPI VideoPortFlushRegistry(PVOID HwDeviceExtension)
Definition: stubs.c:29