ReactOS 0.4.16-dev-1946-g52006dd
services.c File Reference
#include "videoprt.h"
#include <debug.h>
Include dependency graph for services.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID NTAPI IntInterfaceReference (_In_ PVOID Context)
 
VOID NTAPI IntInterfaceDereference (_In_ PVOID Context)
 
VP_STATUS NTAPI VideoPortQueryServices (_In_ PVOID HwDeviceExtension, _In_ VIDEO_PORT_SERVICES ServicesType, _Inout_ PINTERFACE Interface)
 
BOOLEAN NTAPI VideoPortGetAgpServices (_In_ PVOID HwDeviceExtension, _Out_ PVIDEO_PORT_AGP_SERVICES AgpServices)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 24 of file services.c.

Function Documentation

◆ IntInterfaceDereference()

VOID NTAPI IntInterfaceDereference ( _In_ PVOID  Context)

Definition at line 37 of file services.c.

39{
40 /* Do nothing */
41}

Referenced by VideoPortQueryServices().

◆ IntInterfaceReference()

VOID NTAPI IntInterfaceReference ( _In_ PVOID  Context)

Definition at line 29 of file services.c.

31{
32 /* Do nothing */
33}

Referenced by VideoPortQueryServices().

◆ VideoPortGetAgpServices()

BOOLEAN NTAPI VideoPortGetAgpServices ( _In_ PVOID  HwDeviceExtension,
_Out_ PVIDEO_PORT_AGP_SERVICES  AgpServices 
)

Definition at line 102 of file services.c.

105{
108
109 TRACE_(VIDEOPRT, "VideoPortGetAgpServices\n");
110
111 Interface.Size = sizeof(Interface);
113
116 if (Status != NO_ERROR)
117 {
118 WARN_(VIDEOPRT, "VideoPortQueryServices() failed!\n");
119 return FALSE;
120 }
121
122 RtlCopyMemory(AgpServices, &Interface.AgpReservePhysical, sizeof(*AgpServices));
123 return TRUE;
124}
#define NO_ERROR
Definition: dderror.h:5
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define TRACE_(x)
Definition: compat.h:76
Status
Definition: gdiplustypes.h:25
LONG VP_STATUS
Definition: video.h:153
#define VIDEO_PORT_AGP_INTERFACE_VERSION_1
Definition: video.h:123
@ VideoPortServicesAGP
Definition: video.h:713
#define WARN_(ch,...)
Definition: debug.h:157
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
VP_STATUS NTAPI VideoPortQueryServices(_In_ PVOID HwDeviceExtension, _In_ VIDEO_PORT_SERVICES ServicesType, _Inout_ PINTERFACE Interface)
Definition: services.c:45

◆ VideoPortQueryServices()

VP_STATUS NTAPI VideoPortQueryServices ( _In_ PVOID  HwDeviceExtension,
_In_ VIDEO_PORT_SERVICES  ServicesType,
_Inout_ PINTERFACE  Interface 
)

Definition at line 45 of file services.c.

49{
50 TRACE_(VIDEOPRT, "VideoPortQueryServices - ServicesType: 0x%x\n", ServicesType);
51
52 switch (ServicesType)
53 {
57 {
58 PVIDEO_PORT_INT10_INTERFACE Int10Interface =
60
62 Interface->InterfaceDereference = IntInterfaceDereference;
64 Int10Interface->Int10FreeBuffer = IntInt10FreeBuffer;
65 Int10Interface->Int10ReadMemory = IntInt10ReadMemory;
66 Int10Interface->Int10WriteMemory = IntInt10WriteMemory;
67 Int10Interface->Int10CallBios = IntInt10CallBios;
68 return NO_ERROR;
69 }
70 break;
71
74 Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2)) ||
76 Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE)))
77 {
78 if (NT_SUCCESS(IntAgpGetInterface(HwDeviceExtension, Interface)))
79 {
80 return NO_ERROR;
81 }
82 }
83 break;
84
88
92
93 default:
94 break;
95 }
96
98}
NTSTATUS NTAPI IntAgpGetInterface(IN PVOID HwDeviceExtension, IN OUT PINTERFACE Interface)
Definition: agp.c:496
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
VP_STATUS NTAPI IntInt10CallBios(_In_ PVOID Context, _Inout_ PINT10_BIOS_ARGUMENTS BiosArguments)
Definition: int10.c:708
VP_STATUS NTAPI IntInt10WriteMemory(_In_ PVOID Context, _In_ USHORT Seg, _In_ USHORT Off, _In_reads_bytes_(Length) PVOID Buffer, _In_ ULONG Length)
Definition: int10.c:569
VP_STATUS NTAPI IntInt10AllocateBuffer(_In_ PVOID Context, _Out_ PUSHORT Seg, _Out_ PUSHORT Off, _Inout_ PULONG Length)
Definition: int10.c:370
VP_STATUS NTAPI IntInt10ReadMemory(_In_ PVOID Context, _In_ USHORT Seg, _In_ USHORT Off, _Out_writes_bytes_(Length) PVOID Buffer, _In_ ULONG Length)
Definition: int10.c:502
VP_STATUS NTAPI IntInt10FreeBuffer(_In_ PVOID Context, _In_ USHORT Seg, _In_ USHORT Off)
Definition: int10.c:439
struct _VIDEO_PORT_AGP_INTERFACE VIDEO_PORT_AGP_INTERFACE
struct _VIDEO_PORT_INT10_INTERFACE * PVIDEO_PORT_INT10_INTERFACE
#define VIDEO_PORT_INT10_INTERFACE_VERSION_1
Definition: video.h:127
#define VIDEO_PORT_AGP_INTERFACE_VERSION_2
Definition: video.h:124
@ VideoPortServicesI2C
Definition: video.h:714
@ VideoPortServicesHeadless
Definition: video.h:715
@ VideoPortServicesInt10
Definition: video.h:716
OUT PINT10_FREE_BUFFER Int10FreeBuffer
Definition: video.h:787
OUT PINT10_READ_MEMORY Int10ReadMemory
Definition: video.h:788
OUT PINT10_CALL_BIOS Int10CallBios
Definition: video.h:790
OUT PINTERFACE_REFERENCE InterfaceReference
Definition: video.h:784
OUT PINT10_ALLOCATE_BUFFER Int10AllocateBuffer
Definition: video.h:786
OUT PINT10_WRITE_MEMORY Int10WriteMemory
Definition: video.h:789
VOID NTAPI IntInterfaceReference(_In_ PVOID Context)
Definition: services.c:29
VOID NTAPI IntInterfaceDereference(_In_ PVOID Context)
Definition: services.c:37

Referenced by InitializeModeTable(), VBEInitialize(), and VideoPortGetAgpServices().