mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Link video miniports to videoprt library only
svn path=/trunk/; revision=19801
This commit is contained in:
parent
03231ed317
commit
11c95f7b5d
8 changed files with 23 additions and 27 deletions
|
@ -29,9 +29,6 @@
|
|||
|
||||
#include "vbemp.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
|
||||
|
||||
VP_STATUS STDCALL
|
||||
|
@ -80,7 +77,7 @@ VBEFindAdapter(
|
|||
static int
|
||||
VBESortModesCallback(PVBE_MODEINFO VbeModeInfoA, PVBE_MODEINFO VbeModeInfoB)
|
||||
{
|
||||
DPRINT("VBESortModesCallback: %dx%dx%d / %dx%dx%d\n",
|
||||
VideoPortDebugPrint(Info, "VBESortModesCallback: %dx%dx%d / %dx%dx%d\n",
|
||||
VbeModeInfoA->XResolution, VbeModeInfoA->YResolution,
|
||||
VbeModeInfoA->BitsPerPixel,
|
||||
VbeModeInfoB->XResolution, VbeModeInfoB->YResolution,
|
||||
|
@ -190,7 +187,7 @@ VBEInitialize(PVOID HwDeviceExtension)
|
|||
|
||||
if (Status != NO_ERROR)
|
||||
{
|
||||
DPRINT1("Failed to get Int 10 service functions (Status %x)\n", Status);
|
||||
VideoPortDebugPrint(Error, "Failed to get Int 10 service functions (Status %x)\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -209,7 +206,7 @@ VBEInitialize(PVOID HwDeviceExtension)
|
|||
|
||||
if (Status != NO_ERROR)
|
||||
{
|
||||
DPRINT1("Failed to allocate virtual memory (Status %x)\n", Status);
|
||||
VideoPortDebugPrint(Error, "Failed to allocate virtual memory (Status %x)\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -242,9 +239,9 @@ VBEInitialize(PVOID HwDeviceExtension)
|
|||
sizeof(VBEDeviceExtension->VbeInfo));
|
||||
|
||||
/* Verify VBE is found and not anýthing else */
|
||||
if (strncmp(VBEDeviceExtension->VbeInfo.Signature,"VESA",4) != 0)
|
||||
if (VideoPortCompareMemory(VBEDeviceExtension->VbeInfo.Signature, "VESA", 4) != 4)
|
||||
{
|
||||
DPRINT("No VBE BIOS present\n");
|
||||
VideoPortDebugPrint(Warn, "No VBE BIOS present\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -254,7 +251,7 @@ VBEInitialize(PVOID HwDeviceExtension)
|
|||
VBEDeviceExtension->VbeInfo.Version = 0x102;
|
||||
}
|
||||
|
||||
DPRINT("VBE BIOS Present (%d.%d, %8ld Kb)\n",
|
||||
VideoPortDebugPrint(Trace, "VBE BIOS Present (%d.%d, %8ld Kb)\n",
|
||||
VBEDeviceExtension->VbeInfo.Version / 0x100,
|
||||
VBEDeviceExtension->VbeInfo.Version & 0xFF,
|
||||
VBEDeviceExtension->VbeInfo.TotalMemory * 64);
|
||||
|
@ -265,13 +262,13 @@ VBEInitialize(PVOID HwDeviceExtension)
|
|||
if (VBEDeviceExtension->VbeInfo.Version < 0x200)
|
||||
#endif
|
||||
{
|
||||
DPRINT("VBE BIOS present, but incompatible version.\n");
|
||||
VideoPortDebugPrint(Warn, "VBE BIOS present, but incompatible version.\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT("No VBE BIOS found.\n");
|
||||
VideoPortDebugPrint(Warn, "No VBE BIOS found.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -308,9 +305,9 @@ VBEInitialize(PVOID HwDeviceExtension)
|
|||
*/
|
||||
|
||||
VBEDeviceExtension->ModeInfo =
|
||||
ExAllocatePool(PagedPool, ModeCount * sizeof(VBE_MODEINFO));
|
||||
VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, ModeCount * sizeof(VBE_MODEINFO), TAG_VBE);
|
||||
VBEDeviceExtension->ModeNumbers =
|
||||
ExAllocatePool(PagedPool, ModeCount * sizeof(WORD));
|
||||
VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, ModeCount * sizeof(WORD), TAG_VBE);
|
||||
|
||||
/*
|
||||
* Get the actual mode infos.
|
||||
|
@ -372,7 +369,7 @@ VBEInitialize(PVOID HwDeviceExtension)
|
|||
|
||||
if (SuitableModeCount == 0)
|
||||
{
|
||||
DPRINT("VBEMP: No video modes supported\n");
|
||||
VideoPortDebugPrint(Warn, "VBEMP: No video modes supported\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -388,17 +385,15 @@ VBEInitialize(PVOID HwDeviceExtension)
|
|||
* Print the supported video modes when NDEBUG is not set.
|
||||
*/
|
||||
|
||||
#ifndef NDEBUG
|
||||
for (CurrentMode = 0;
|
||||
CurrentMode < SuitableModeCount;
|
||||
CurrentMode++)
|
||||
{
|
||||
DPRINT("%dx%dx%d\n",
|
||||
VideoPortDebugPrint(Trace, "%dx%dx%d\n",
|
||||
VBEDeviceExtension->ModeInfo[CurrentMode].XResolution,
|
||||
VBEDeviceExtension->ModeInfo[CurrentMode].YResolution,
|
||||
VBEDeviceExtension->ModeInfo[CurrentMode].BitsPerPixel);
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -746,7 +741,7 @@ VBESetCurrentMode(
|
|||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("VBEMP: VBESetCurrentMode failed (%x)\n", BiosRegisters.Eax);
|
||||
VideoPortDebugPrint(Error, "VBEMP: VBESetCurrentMode failed (%x)\n", BiosRegisters.Eax);
|
||||
DeviceExtension->CurrentMode = -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
#include <ddk/video.h>
|
||||
#include <ddk/ntddvdeo.h>
|
||||
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
#define TAG_VBE TAG('V', 'B', 'E', ' ')
|
||||
|
||||
/*
|
||||
* Compile-time define to get VBE 1.2 support. The implementation
|
||||
* is far from complete now and so it's left undefined.
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
<module name="vbemp" type="kernelmodedriver" installbase="system32/drivers" installname="vbemp.sys">
|
||||
<include base="vbemp">.</include>
|
||||
<include base="ntoskrnl">include</include>
|
||||
<define name="__USE_W32API" />
|
||||
<library>ntoskrnl</library>
|
||||
<library>hal</library>
|
||||
<library>videoprt</library>
|
||||
<file>vbemp.c</file>
|
||||
<file>vbemp.rc</file>
|
||||
|
|
|
@ -526,7 +526,7 @@ BOOL VGASetCurrentMode(IN PVIDEO_MODE RequestedMode,
|
|||
InitVGAMode();
|
||||
return TRUE;
|
||||
} else {
|
||||
DPRINT1("Unrecognised mode for VGASetCurrentMode\n");
|
||||
VideoPortDebugPrint(Warn, "Unrecognised mode for VGASetCurrentMode\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
#include <ddk/miniport.h>
|
||||
#include <ddk/video.h>
|
||||
#include <ddk/ntddvdeo.h>
|
||||
#include <debug.h>
|
||||
|
||||
#define UNIMPLEMENTED \
|
||||
VideoPortDebugPrint(Error, "WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
|
||||
|
||||
void
|
||||
InitVGAMode();
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
<module name="vgamp" type="kernelmodedriver" installbase="system32/drivers" installname="vgamp.sys">
|
||||
<include base="vgamp">.</include>
|
||||
<include base="ntoskrnl">include</include>
|
||||
<define name="__USE_W32API" />
|
||||
<library>ntoskrnl</library>
|
||||
<library>hal</library>
|
||||
<library>videoprt</library>
|
||||
<file>initvga.c</file>
|
||||
<file>vgamp.c</file>
|
||||
|
|
|
@ -658,7 +658,7 @@ VideoPortDebugPrint(
|
|||
vsprintf(Buffer, DebugMessage, ap);
|
||||
va_end(ap);
|
||||
|
||||
DbgPrint(Buffer);
|
||||
DbgPrintEx(DPFLTR_IHVVIDEO_ID, DebugPrintLevel, Buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
#define TAG_VIDEO_PORT TAG('V', 'I', 'D', 'P')
|
||||
|
||||
#define DPFLTR_IHVVIDEO_ID 0 /* FIXME */
|
||||
|
||||
typedef struct _VIDEO_PORT_ADDRESS_MAPPING
|
||||
{
|
||||
LIST_ENTRY List;
|
||||
|
|
Loading…
Reference in a new issue