ReactOS  0.4.15-dev-976-g0f66c66
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 (PVOID Context)
 
VOID NTAPI IntInterfaceDereference (PVOID Context)
 
VP_STATUS NTAPI VideoPortQueryServices (IN PVOID HwDeviceExtension, IN VIDEO_PORT_SERVICES ServicesType, IN OUT 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 ( PVOID  Context)

Definition at line 34 of file services.c.

35 {
36  /* Do nothing */
37 }

Referenced by VideoPortQueryServices().

◆ IntInterfaceReference()

VOID NTAPI IntInterfaceReference ( PVOID  Context)

Definition at line 28 of file services.c.

29 {
30  /* Do nothing */
31 }

Referenced by VideoPortQueryServices().

◆ VideoPortGetAgpServices()

BOOLEAN NTAPI VideoPortGetAgpServices ( IN PVOID  HwDeviceExtension,
OUT PVIDEO_PORT_AGP_SERVICES  AgpServices 
)

Definition at line 96 of file services.c.

99 {
102 
103  TRACE_(VIDEOPRT, "VideoPortGetAgpServices\n");
104 
105  Interface.Size = sizeof(Interface);
107 
110  if (Status != NO_ERROR)
111  {
112  WARN_(VIDEOPRT, "VideoPortQueryServices() failed!\n");
113  return FALSE;
114  }
115 
116  RtlCopyMemory(AgpServices, &Interface.AgpReservePhysical, sizeof(VIDEO_PORT_AGP_SERVICES));
117  return TRUE;
118 }
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define TRUE
Definition: types.h:120
#define NO_ERROR
Definition: dderror.h:5
#define FALSE
Definition: types.h:117
#define TRACE_(x)
Definition: compat.h:76
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
#define VIDEO_PORT_AGP_INTERFACE_VERSION_1
Definition: video.h:123
Status
Definition: gdiplustypes.h:24
VP_STATUS NTAPI VideoPortQueryServices(IN PVOID HwDeviceExtension, IN VIDEO_PORT_SERVICES ServicesType, IN OUT PINTERFACE Interface)
Definition: services.c:40
LONG VP_STATUS
Definition: video.h:153
#define WARN_(ch,...)
Definition: debug.h:157

◆ VideoPortQueryServices()

VP_STATUS NTAPI VideoPortQueryServices ( IN PVOID  HwDeviceExtension,
IN VIDEO_PORT_SERVICES  ServicesType,
IN OUT PINTERFACE  Interface 
)

Definition at line 40 of file services.c.

44 {
45  TRACE_(VIDEOPRT, "VideoPortQueryServices - ServicesType: 0x%x\n", ServicesType);
46 
47  switch (ServicesType)
48  {
51  Interface->Size >= sizeof(VIDEO_PORT_INT10_INTERFACE))
52  {
53  VIDEO_PORT_INT10_INTERFACE *Int10Interface =
55 
57  Interface->InterfaceDereference = IntInterfaceDereference;
59  Int10Interface->Int10FreeBuffer = IntInt10FreeBuffer;
60  Int10Interface->Int10ReadMemory = IntInt10ReadMemory;
61  Int10Interface->Int10WriteMemory = IntInt10WriteMemory;
62  Int10Interface->Int10CallBios = IntInt10CallBios;
63  return NO_ERROR;
64  }
65  break;
66 
69  Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2)) ||
71  Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE)))
72  {
73  if (NT_SUCCESS(IntAgpGetInterface(HwDeviceExtension, Interface)))
74  {
75  return NO_ERROR;
76  }
77  }
78  break;
79 
83 
87 
88  default:
89  break;
90  }
91 
93 }
#define VIDEO_PORT_INT10_INTERFACE_VERSION_1
Definition: video.h:127
VOID NTAPI IntInterfaceReference(PVOID Context)
Definition: services.c:28
VP_STATUS NTAPI IntInt10AllocateBuffer(IN PVOID Context, OUT PUSHORT Seg, OUT PUSHORT Off, IN OUT PULONG Length)
Definition: int10.c:156
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define NO_ERROR
Definition: dderror.h:5
struct _VIDEO_PORT_AGP_INTERFACE VIDEO_PORT_AGP_INTERFACE
VP_STATUS NTAPI IntInt10ReadMemory(IN PVOID Context, IN USHORT Seg, IN USHORT Off, OUT PVOID Buffer, IN ULONG Length)
Definition: int10.c:251
OUT PINT10_READ_MEMORY Int10ReadMemory
Definition: video.h:780
VP_STATUS NTAPI IntInt10WriteMemory(IN PVOID Context, IN USHORT Seg, IN USHORT Off, IN PVOID Buffer, IN ULONG Length)
Definition: int10.c:283
VP_STATUS NTAPI IntInt10CallBios(IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
Definition: int10.c:315
#define TRACE_(x)
Definition: compat.h:76
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define VIDEO_PORT_AGP_INTERFACE_VERSION_2
Definition: video.h:124
OUT PINT10_ALLOCATE_BUFFER Int10AllocateBuffer
Definition: video.h:778
#define VIDEO_PORT_AGP_INTERFACE_VERSION_1
Definition: video.h:123
VOID NTAPI IntInterfaceDereference(PVOID Context)
Definition: services.c:34
NTSTATUS NTAPI IntAgpGetInterface(IN PVOID HwDeviceExtension, IN OUT PINTERFACE Interface)
Definition: agp.c:496
VP_STATUS NTAPI IntInt10FreeBuffer(IN PVOID Context, IN USHORT Seg, IN USHORT Off)
Definition: int10.c:218
OUT PINT10_WRITE_MEMORY Int10WriteMemory
Definition: video.h:781
OUT PINT10_FREE_BUFFER Int10FreeBuffer
Definition: video.h:779
#define UNIMPLEMENTED
Definition: debug.h:115
OUT PINT10_CALL_BIOS Int10CallBios
Definition: video.h:782
OUT PINTERFACE_REFERENCE InterfaceReference
Definition: video.h:776

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