Link video miniports to videoprt library only
Modified: trunk/reactos/drivers/video/miniport/vbe/vbemp.c Modified: trunk/reactos/drivers/video/miniport/vbe/vbemp.h Modified: trunk/reactos/drivers/video/miniport/vbe/vbemp.xml Modified: trunk/reactos/drivers/video/miniport/vga/vgamp.c Modified: trunk/reactos/drivers/video/miniport/vga/vgamp.h Modified: trunk/reactos/drivers/video/miniport/vga/vgamp.xml Modified: trunk/reactos/drivers/video/videoprt/videoprt.c Modified: trunk/reactos/drivers/video/videoprt/videoprt.h
--- trunk/reactos/drivers/video/miniport/vbe/vbemp.c 2005-12-01 17:23:26 UTC (rev 19800) +++ trunk/reactos/drivers/video/miniport/vbe/vbemp.c 2005-12-01 19:51:08 UTC (rev 19801) @@ -29,9 +29,6 @@
#include "vbemp.h"
-#define NDEBUG -#include <debug.h> -
/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/ VP_STATUS STDCALL @@ -80,7 +77,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
*/ 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 @@
if (SuitableModeCount == 0) {
- DPRINT("VBEMP: No video modes supported\n");
+ VideoPortDebugPrint(Warn, "VBEMP: No video modes supported\n");
return FALSE; } @@ -388,17 +385,15 @@
* 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 @@
} else {
- DPRINT1("VBEMP: VBESetCurrentMode failed (%x)\n", BiosRegisters.Eax);
+ VideoPortDebugPrint(Error, "VBEMP: VBESetCurrentMode failed (%x)\n", BiosRegisters.Eax);
DeviceExtension->CurrentMode = -1; }
--- trunk/reactos/drivers/video/miniport/vbe/vbemp.h 2005-12-01 17:23:26 UTC (rev 19800) +++ trunk/reactos/drivers/video/miniport/vbe/vbemp.h 2005-12-01 19:51:08 UTC (rev 19801) @@ -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.
--- trunk/reactos/drivers/video/miniport/vbe/vbemp.xml 2005-12-01 17:23:26 UTC (rev 19800) +++ trunk/reactos/drivers/video/miniport/vbe/vbemp.xml 2005-12-01 19:51:08 UTC (rev 19801) @@ -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>
--- trunk/reactos/drivers/video/miniport/vga/vgamp.c 2005-12-01 17:23:26 UTC (rev 19800) +++ trunk/reactos/drivers/video/miniport/vga/vgamp.c 2005-12-01 19:51:08 UTC (rev 19801) @@ -526,7 +526,7 @@
InitVGAMode(); return TRUE; } else {
- DPRINT1("Unrecognised mode for VGASetCurrentMode\n");
+ VideoPortDebugPrint(Warn, "Unrecognised mode for VGASetCurrentMode\n");
return FALSE; } }
--- trunk/reactos/drivers/video/miniport/vga/vgamp.h 2005-12-01 17:23:26 UTC (rev 19800) +++ trunk/reactos/drivers/video/miniport/vga/vgamp.h 2005-12-01 19:51:08 UTC (rev 19801) @@ -27,8 +27,10 @@
#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();
--- trunk/reactos/drivers/video/miniport/vga/vgamp.xml 2005-12-01 17:23:26 UTC (rev 19800) +++ trunk/reactos/drivers/video/miniport/vga/vgamp.xml 2005-12-01 19:51:08 UTC (rev 19801) @@ -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>
--- trunk/reactos/drivers/video/videoprt/videoprt.c 2005-12-01 17:23:26 UTC (rev 19800) +++ trunk/reactos/drivers/video/videoprt/videoprt.c 2005-12-01 19:51:08 UTC (rev 19801) @@ -658,7 +658,7 @@
vsprintf(Buffer, DebugMessage, ap); va_end(ap);
- DbgPrint(Buffer);
+ DbgPrintEx(DPFLTR_IHVVIDEO_ID, DebugPrintLevel, Buffer);
} /*
--- trunk/reactos/drivers/video/videoprt/videoprt.h 2005-12-01 17:23:26 UTC (rev 19800) +++ trunk/reactos/drivers/video/videoprt/videoprt.h 2005-12-01 19:51:08 UTC (rev 19801) @@ -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;