Author: hpoussin
Date: Fri Dec 28 17:47:03 2007
New Revision: 31477
URL:
http://svn.reactos.org/svn/reactos?rev=31477&view=rev
Log:
Use kernel facilities to change debug level at runtime
Modified:
trunk/reactos/drivers/video/videoprt/agp.c
trunk/reactos/drivers/video/videoprt/ddc.c
trunk/reactos/drivers/video/videoprt/dispatch.c
trunk/reactos/drivers/video/videoprt/dma.c
trunk/reactos/drivers/video/videoprt/funclist.c
trunk/reactos/drivers/video/videoprt/int10.c
trunk/reactos/drivers/video/videoprt/interrupt.c
trunk/reactos/drivers/video/videoprt/resource.c
trunk/reactos/drivers/video/videoprt/services.c
trunk/reactos/drivers/video/videoprt/spinlock.c
trunk/reactos/drivers/video/videoprt/timer.c
trunk/reactos/drivers/video/videoprt/videoprt.c
trunk/reactos/drivers/video/videoprt/videoprt.h
Modified: trunk/reactos/drivers/video/videoprt/agp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/agp…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/agp.c (original)
+++ trunk/reactos/drivers/video/videoprt/agp.c Fri Dec 28 17:47:03 2007
@@ -18,7 +18,6 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id$
*/
#include "videoprt.h"
@@ -104,7 +103,7 @@
PVIDEO_PORT_AGP_MAPPING AgpMapping;
NTSTATUS Status;
- DPRINT("AgpCommitPhysical - PhysicalContext: 0x%x Pages: %d, Offset:
0x%x\n",
+ TRACE_(VIDEOPRT, "AgpCommitPhysical - PhysicalContext: 0x%x Pages: %d, Offset:
0x%x\n",
PhysicalContext, Pages, Offset);
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
@@ -117,7 +116,7 @@
if (!NT_SUCCESS(Status))
{
- DPRINT1("Warning: AgpBusInterface->CommitMemory failed (Status =
0x%x)\n",
+ WARN_(VIDEOPRT, "Warning: AgpBusInterface->CommitMemory failed (Status =
0x%x)\n",
Status);
}
return NT_SUCCESS(Status);
@@ -135,7 +134,7 @@
PVIDEO_PORT_AGP_MAPPING AgpMapping;
NTSTATUS Status;
- DPRINT("AgpFreePhysical - PhysicalContext: 0x%x Pages: %d, Offset: 0x%x\n",
+ TRACE_(VIDEOPRT, "AgpFreePhysical - PhysicalContext: 0x%x Pages: %d, Offset:
0x%x\n",
PhysicalContext, Pages, Offset);
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
@@ -146,7 +145,7 @@
AgpMapping->MapHandle, Pages, Offset);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Warning: AgpBusInterface->FreeMemory failed (Status =
0x%x)\n",
+ WARN_(VIDEOPRT, "Warning: AgpBusInterface->FreeMemory failed (Status =
0x%x)\n",
Status);
}
}
@@ -161,7 +160,7 @@
PVIDEO_PORT_AGP_MAPPING AgpMapping;
NTSTATUS Status;
- DPRINT("AgpReleasePhysical - PhysicalContext: 0x%x\n", PhysicalContext);
+ TRACE_(VIDEOPRT, "AgpReleasePhysical - PhysicalContext: 0x%x\n",
PhysicalContext);
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
AgpBusInterface = &DeviceExtension->AgpInterface;
@@ -172,7 +171,7 @@
AgpMapping->MapHandle);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Warning: AgpBusInterface->ReleaseMemory failed (Status =
0x%x)\n",
+ WARN_(VIDEOPRT, "Warning: AgpBusInterface->ReleaseMemory failed (Status =
0x%x)\n",
Status);
}
@@ -194,7 +193,7 @@
PVIDEO_PORT_AGP_MAPPING AgpMapping;
NTSTATUS Status;
- DPRINT("AgpReservePhysical - Pages: %d, Caching: 0x%x\n", Pages, Caching);
+ TRACE_(VIDEOPRT, "AgpReservePhysical - Pages: %d, Caching: 0x%x\n", Pages,
Caching);
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
AgpBusInterface = &DeviceExtension->AgpInterface;
@@ -208,7 +207,7 @@
MemCachingType = MmWriteCombined;
else
{
- DPRINT1("Invalid caching type %d!\n", Caching);
+ WARN_(VIDEOPRT, "Invalid caching type %d!\n", Caching);
return ZeroAddress;
}
@@ -218,7 +217,7 @@
TAG_VIDEO_PORT);
if (AgpMapping == NULL)
{
- DPRINT1("Out of memory! Couldn't allocate AGP mapping
structure!\n");
+ WARN_(VIDEOPRT, "Out of memory! Couldn't allocate AGP mapping
structure!\n");
return ZeroAddress;
}
RtlZeroMemory(AgpMapping, sizeof(VIDEO_PORT_AGP_MAPPING));
@@ -232,7 +231,7 @@
if (!NT_SUCCESS(Status) || AgpMapping->MapHandle == NULL)
{
ExFreePool(AgpMapping);
- DPRINT1("Warning: AgpBusInterface->ReserveMemory failed (Status =
0x%x)\n",
+ WARN_(VIDEOPRT, "Warning: AgpBusInterface->ReserveMemory failed (Status =
0x%x)\n",
Status);
return ZeroAddress;
}
@@ -256,7 +255,7 @@
PVOID BaseAddress = NULL;
NTSTATUS Status;
- DPRINT("AgpCommitVirtual - VirtualContext: 0x%x Pages: %d, Offset: 0x%x\n",
+ TRACE_(VIDEOPRT, "AgpCommitVirtual - VirtualContext: 0x%x Pages: %d, Offset:
0x%x\n",
VirtualContext, Pages, Offset);
VirtualMapping = (PVIDEO_PORT_AGP_VIRTUAL_MAPPING)VirtualContext;
@@ -288,7 +287,7 @@
&Size, MEM_RELEASE);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Warning: ZwFreeVirtualMemory() failed: Status = 0x%x\n",
Status);
+ WARN_(VIDEOPRT, "Warning: ZwFreeVirtualMemory() failed: Status =
0x%x\n", Status);
return NULL;
}
ASSERT(Size == Pages * PAGE_SIZE);
@@ -303,14 +302,14 @@
&BaseAddress);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Warning: IntVideoPortMapPhysicalMemory() failed: Status =
0x%x\n", Status);
+ WARN_(VIDEOPRT, "Warning: IntVideoPortMapPhysicalMemory() failed: Status =
0x%x\n", Status);
/* Reserve the released virtual memory area again */
Status = ZwAllocateVirtualMemory(VirtualMapping->ProcessHandle,
&BaseAddress, 0, &Size, MEM_RESERVE,
PAGE_NOACCESS);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Warning: ZwAllocateVirtualMemory() failed: Status =
0x%x\n", Status);
+ WARN_(VIDEOPRT, "Warning: ZwAllocateVirtualMemory() failed: Status =
0x%x\n", Status);
/* FIXME: What to do now?? */
ASSERT(0);
return NULL;
@@ -338,7 +337,7 @@
PVOID BaseAddress = NULL;
NTSTATUS Status;
- DPRINT("AgpFreeVirtual - VirtualContext: 0x%x Pages: %d, Offset: 0x%x\n",
+ TRACE_(VIDEOPRT, "AgpFreeVirtual - VirtualContext: 0x%x Pages: %d, Offset:
0x%x\n",
VirtualContext, Pages, Offset);
VirtualMapping = (PVIDEO_PORT_AGP_VIRTUAL_MAPPING)VirtualContext;
@@ -358,7 +357,7 @@
Status = ZwUnmapViewOfSection(VirtualMapping->ProcessHandle, BaseAddress);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Warning: ZwUnmapViewOfSection() failed: Status = 0x%x\n",
Status);
+ WARN_(VIDEOPRT, "Warning: ZwUnmapViewOfSection() failed: Status =
0x%x\n", Status);
/* FIXME: What to do now?? */
ASSERT(0);
return;
@@ -370,7 +369,7 @@
PAGE_NOACCESS);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Warning: ZwAllocateVirtualMemory() failed: Status = 0x%x\n",
Status);
+ WARN_(VIDEOPRT, "Warning: ZwAllocateVirtualMemory() failed: Status =
0x%x\n", Status);
/* FIXME: What to do now?? */
ASSERT(0);
return;
@@ -389,7 +388,7 @@
PVIDEO_PORT_AGP_VIRTUAL_MAPPING VirtualMapping;
NTSTATUS Status;
- DPRINT("AgpReleaseVirtual - VirtualContext: 0x%x\n", VirtualContext);
+ TRACE_(VIDEOPRT, "AgpReleaseVirtual - VirtualContext: 0x%x\n",
VirtualContext);
VirtualMapping = (PVIDEO_PORT_AGP_VIRTUAL_MAPPING)VirtualContext;
@@ -407,7 +406,7 @@
&Size, MEM_RELEASE);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Warning: ZwFreeVirtualMemory() failed: Status = 0x%x\n",
Status);
+ WARN_(VIDEOPRT, "Warning: ZwFreeVirtualMemory() failed: Status =
0x%x\n", Status);
}
}
@@ -427,7 +426,7 @@
PVOID MappedAddress;
NTSTATUS Status;
- DPRINT("AgpReserveVirtual - ProcessHandle: 0x%x PhysicalContext: 0x%x\n",
+ TRACE_(VIDEOPRT, "AgpReserveVirtual - ProcessHandle: 0x%x PhysicalContext:
0x%x\n",
ProcessHandle, PhysicalContext);
AgpMapping = (PVIDEO_PORT_AGP_MAPPING)PhysicalContext;
@@ -438,7 +437,7 @@
TAG_VIDEO_PORT);
if (VirtualMapping == NULL)
{
- DPRINT1("Out of memory! Couldn't allocate AGP virtual mapping
structure!\n");
+ WARN_(VIDEOPRT, "Out of memory! Couldn't allocate AGP virtual mapping
structure!\n");
return NULL;
}
RtlZeroMemory(VirtualMapping, sizeof(VIDEO_PORT_AGP_VIRTUAL_MAPPING));
@@ -460,7 +459,7 @@
if (!NT_SUCCESS(Status))
{
ExFreePool(VirtualMapping);
- DPRINT("ZwAllocateVirtualMemory() failed: Status = 0x%x\n", Status);
+ WARN_(VIDEOPRT, "ZwAllocateVirtualMemory() failed: Status = 0x%x\n",
Status);
return NULL;
}
}
@@ -483,7 +482,7 @@
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
PAGP_BUS_INTERFACE_STANDARD AgpBusInterface;
- DPRINT("AgpSetRate - Rate: %d\n", Rate);
+ TRACE_(VIDEOPRT, "AgpSetRate - Rate: %d\n", Rate);
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
AgpBusInterface = &DeviceExtension->AgpInterface;
@@ -515,7 +514,7 @@
if (DeviceExtension->NextDeviceObject == NULL)
{
- DPRINT("DeviceExtension->NextDeviceObject is NULL!\n");
+ WARN_(VIDEOPRT, "DeviceExtension->NextDeviceObject is NULL!\n");
return STATUS_UNSUCCESSFUL;
}
@@ -536,10 +535,10 @@
&IoStatusBlock, IRP_MN_QUERY_INTERFACE, &IoStack);
if (!NT_SUCCESS(Status))
{
- DPRINT("IopInitiatePnpIrp() failed! (Status 0x%x)\n", Status);
+ WARN_(VIDEOPRT, "IopInitiatePnpIrp() failed! (Status 0x%x)\n",
Status);
return Status;
}
- DPRINT("Got AGP driver interface!\n");
+ INFO_(VIDEOPRT, "Got AGP driver interface!\n");
}
/* FIXME: Not sure if we should wrap the reference/dereference functions */
Modified: trunk/reactos/drivers/video/videoprt/ddc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/ddc…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/ddc.c (original)
+++ trunk/reactos/drivers/video/videoprt/ddc.c Fri Dec 28 17:47:03 2007
@@ -18,7 +18,6 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id$
*/
#include "videoprt.h"
@@ -69,7 +68,7 @@
Ack = (READ_SDA() == LOW);
DELAY_HALF();
- DPRINT("I2CWrite: %s\n", Ack ? "Ack" : "Nak");
+ INFO_(VIDEOPRT, "I2CWrite: %s\n", Ack ? "Ack" : "Nak");
return Ack;
}
@@ -128,7 +127,7 @@
/* make sure the bus is free */
if (READ_SDA() == LOW || READ_SCL() == LOW)
{
- DPRINT1("I2CStart: Bus is not free!\n");
+ WARN_(VIDEOPRT, "I2CStart: Bus is not free!\n");
return FALSE;
}
@@ -139,11 +138,11 @@
{
/* ??release the bus?? */
I2CStop(HwDeviceExtension, i2c);
- DPRINT1("I2CStart: Device not found (Address = 0x%x)\n", Address);
- return FALSE;
- }
-
- DPRINT("I2CStart: SUCCESS!\n");
+ WARN_(VIDEOPRT, "I2CStart: Device not found (Address = 0x%x)\n",
Address);
+ return FALSE;
+ }
+
+ INFO_(VIDEOPRT, "I2CStart: SUCCESS!\n");
return TRUE;
}
@@ -182,12 +181,12 @@
PUCHAR pBuffer = (PUCHAR)pEdidBuffer;
BOOL Ack;
- DPRINT("VideoPortDDCMonitorHelper()\n");
+ TRACE_(VIDEOPRT, "VideoPortDDCMonitorHelper()\n");
ASSERT_IRQL(PASSIVE_LEVEL);
if (ddc->Size != sizeof (ddc))
{
- DPRINT("ddc->Size != %d (%d)\n", sizeof (ddc), ddc->Size);
+ WARN_(VIDEOPRT, "ddc->Size != %d (%d)\n", sizeof (ddc),
ddc->Size);
return FALSE;
}
@@ -216,12 +215,12 @@
pBuffer[4] != 0xff || pBuffer[5] != 0xff ||
pBuffer[6] != 0xff || pBuffer[7] != 0x00)
{
- DPRINT1("VideoPortDDCMonitorHelper(): Invalid EDID header!\n");
- return FALSE;
- }
-
- DPRINT("VideoPortDDCMonitorHelper(): EDID version %d rev. %d\n",
pBuffer[18], pBuffer[19]);
- DPRINT("VideoPortDDCMonitorHelper() - SUCCESS!\n");
+ WARN_(VIDEOPRT, "VideoPortDDCMonitorHelper(): Invalid EDID
header!\n");
+ return FALSE;
+ }
+
+ INFO_(VIDEOPRT, "VideoPortDDCMonitorHelper(): EDID version %d rev. %d\n",
pBuffer[18], pBuffer[19]);
+ INFO_(VIDEOPRT, "VideoPortDDCMonitorHelper() - SUCCESS!\n");
return TRUE;
}
Modified: trunk/reactos/drivers/video/videoprt/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/dis…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/dispatch.c (original)
+++ trunk/reactos/drivers/video/videoprt/dispatch.c Fri Dec 28 17:47:03 2007
@@ -102,7 +102,7 @@
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
PVIDEO_PORT_DRIVER_EXTENSION DriverExtension;
- DPRINT("IntVideoPortDispatchOpen\n");
+ TRACE_(VIDEOPRT, "IntVideoPortDispatchOpen\n");
if (CsrssInitialized == FALSE)
{
@@ -111,9 +111,9 @@
* to let us know its handle.
*/
- DPRINT("Referencing CSRSS\n");
+ INFO_(VIDEOPRT, "Referencing CSRSS\n");
Csrss = (PKPROCESS)PsGetCurrentProcess();
- DPRINT("Csrss %p\n", Csrss);
+ INFO_(VIDEOPRT, "Csrss %p\n", Csrss);
CsrssInitialized = TRUE;
@@ -159,7 +159,7 @@
{
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
- DPRINT("IntVideoPortDispatchClose\n");
+ TRACE_(VIDEOPRT, "IntVideoPortDispatchClose\n");
DeviceExtension = (PVIDEO_PORT_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
if (DeviceExtension->DeviceOpened >= 1 &&
@@ -197,7 +197,7 @@
PVIDEO_REQUEST_PACKET vrp;
NTSTATUS Status;
- DPRINT("IntVideoPortDispatchDeviceControl\n");
+ TRACE_(VIDEOPRT, "IntVideoPortDispatchDeviceControl\n");
IrpStack = IoGetCurrentIrpStackLocation(Irp);
DeviceExtension = DeviceObject->DeviceExtension;
@@ -213,7 +213,7 @@
vrp->StatusBlock = (PSTATUS_BLOCK)&(Irp->IoStatus);
vrp->IoControlCode = IrpStack->Parameters.DeviceIoControl.IoControlCode;
- DPRINT("- IoControlCode: %x\n", vrp->IoControlCode);
+ INFO_(VIDEOPRT, "- IoControlCode: %x\n", vrp->IoControlCode);
/* We're assuming METHOD_BUFFERED */
vrp->InputBuffer = Irp->AssociatedIrp.SystemBuffer;
@@ -229,7 +229,7 @@
/* Free the VRP */
ExFreePool(vrp);
- DPRINT("- Returned status: %x\n", Irp->IoStatus.Status);
+ INFO_(VIDEOPRT, "- Returned status: %x\n", Irp->IoStatus.Status);
if (Irp->IoStatus.Status != STATUS_SUCCESS)
{
@@ -377,7 +377,7 @@
}
}
}
- DPRINT("Interrupt level: 0x%x Interrupt Vector: 0x%x\n",
+ INFO_(VIDEOPRT, "Interrupt level: 0x%x Interrupt Vector: 0x%x\n",
DeviceExtension->InterruptLevel,
DeviceExtension->InterruptVector);
Modified: trunk/reactos/drivers/video/videoprt/dma.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/dma…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/dma.c (original)
+++ trunk/reactos/drivers/video/videoprt/dma.c Fri Dec 28 17:47:03 2007
@@ -18,7 +18,6 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: dma.c 27066 2007-06-07 22:12:10Z greatlrd $
*/
#include "videoprt.h"
@@ -75,7 +74,7 @@
IN PVOID HwDeviceExtension,
IN PVP_DMA_ADAPTER VpDmaAdapter)
{
- DPRINT1("unimplemented VideoPortPutDmaAdapter\n");
+ UNIMPLEMENTED;
}
/*
@@ -94,7 +93,7 @@
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
- DPRINT("VideoPortGetDmaAdapter\n");
+ TRACE_(VIDEOPRT, "VideoPortGetDmaAdapter\n");
DeviceDescription.Version = DEVICE_DESCRIPTION_VERSION;
DeviceDescription.Master = TRUE /* ?? */;
@@ -114,7 +113,7 @@
Adapter =
(PVP_DMA_ADAPTER)HalGetAdapter(&DeviceDescription, &NumberOfMapRegisters);
- DPRINT("Adapter %X\n", Adapter);
+ INFO_(VIDEOPRT, "Adapter %p\n", Adapter);
return(Adapter);
}
Modified: trunk/reactos/drivers/video/videoprt/funclist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/fun…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/funclist.c (original)
+++ trunk/reactos/drivers/video/videoprt/funclist.c Fri Dec 28 17:47:03 2007
@@ -18,7 +18,6 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: videoprt.c 28975 2007-09-09 12:39:11Z fireball $
*/
@@ -46,7 +45,7 @@
{
ULONG i = 0;
- DPRINT("VideoPortGetProcAddress(%s)\n", FunctionName);
+ TRACE_(VIDEOPRT, "VideoPortGetProcAddress(%s)\n", FunctionName);
/* Search by name */
for (i = 0; i < VP_EXPORTED_FUNCS; i++)
@@ -58,7 +57,7 @@
}
}
- DPRINT("VideoPortGetProcAddress: Can't resolve symbol %s\n",
FunctionName);
+ WARN_(VIDEOPRT, "VideoPortGetProcAddress: Can't resolve symbol %s\n",
FunctionName);
return NULL;
}
Modified: trunk/reactos/drivers/video/videoprt/int10.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/int…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/int10.c (original)
+++ trunk/reactos/drivers/video/videoprt/int10.c Fri Dec 28 17:47:03 2007
@@ -18,7 +18,6 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: int10.c 23763 2006-08-28 23:56:35Z ion $
*/
#include "videoprt.h"
@@ -38,7 +37,7 @@
PKPROCESS CallingProcess;
KAPC_STATE ApcState;
- DPRINT("IntInt10AllocateBuffer\n");
+ TRACE_(VIDEOPRT, "IntInt10AllocateBuffer\n");
IntAttachToCSRSS(&CallingProcess, &ApcState);
@@ -48,7 +47,7 @@
if (!NT_SUCCESS(Status))
{
- DPRINT("- ZwAllocateVirtualMemory failed\n");
+ WARN_(VIDEOPRT, "- ZwAllocateVirtualMemory failed\n");
IntDetachFromCSRSS(&CallingProcess, &ApcState);
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -57,7 +56,7 @@
{
ZwFreeVirtualMemory(NtCurrentProcess(), &MemoryAddress, Length,
MEM_RELEASE);
- DPRINT("- Unacceptable memory allocated\n");
+ WARN_(VIDEOPRT, "- Unacceptable memory allocated\n");
IntDetachFromCSRSS(&CallingProcess, &ApcState);
return ERROR_NOT_ENOUGH_MEMORY;
}
@@ -65,9 +64,9 @@
*Seg = (ULONG)MemoryAddress >> 4;
*Off = (ULONG)MemoryAddress & 0xF;
- DPRINT("- Segment: %x\n", (ULONG)MemoryAddress >> 4);
- DPRINT("- Offset: %x\n", (ULONG)MemoryAddress & 0xF);
- DPRINT("- Length: %x\n", *Length);
+ INFO_(VIDEOPRT, "- Segment: %x\n", (ULONG)MemoryAddress >> 4);
+ INFO_(VIDEOPRT, "- Offset: %x\n", (ULONG)MemoryAddress & 0xF);
+ INFO_(VIDEOPRT, "- Length: %x\n", *Length);
IntDetachFromCSRSS(&CallingProcess, &ApcState);
@@ -85,9 +84,9 @@
PKPROCESS CallingProcess;
KAPC_STATE ApcState;
- DPRINT("IntInt10FreeBuffer\n");
- DPRINT("- Segment: %x\n", Seg);
- DPRINT("- Offset: %x\n", Off);
+ TRACE_(VIDEOPRT, "IntInt10FreeBuffer\n");
+ INFO_(VIDEOPRT, "- Segment: %x\n", Seg);
+ INFO_(VIDEOPRT, "- Offset: %x\n", Off);
IntAttachToCSRSS(&CallingProcess, &ApcState);
Status = ZwFreeVirtualMemory(NtCurrentProcess(), &MemoryAddress, 0,
@@ -108,11 +107,11 @@
PKPROCESS CallingProcess;
KAPC_STATE ApcState;
- DPRINT("IntInt10ReadMemory\n");
- DPRINT("- Segment: %x\n", Seg);
- DPRINT("- Offset: %x\n", Off);
- DPRINT("- Buffer: %x\n", Buffer);
- DPRINT("- Length: %x\n", Length);
+ TRACE_(VIDEOPRT, "IntInt10ReadMemory\n");
+ INFO_(VIDEOPRT, "- Segment: %x\n", Seg);
+ INFO_(VIDEOPRT, "- Offset: %x\n", Off);
+ INFO_(VIDEOPRT, "- Buffer: %x\n", Buffer);
+ INFO_(VIDEOPRT, "- Length: %x\n", Length);
IntAttachToCSRSS(&CallingProcess, &ApcState);
RtlCopyMemory(Buffer, (PVOID)((Seg << 4) | Off), Length);
@@ -132,11 +131,11 @@
PKPROCESS CallingProcess;
KAPC_STATE ApcState;
- DPRINT("IntInt10WriteMemory\n");
- DPRINT("- Segment: %x\n", Seg);
- DPRINT("- Offset: %x\n", Off);
- DPRINT("- Buffer: %x\n", Buffer);
- DPRINT("- Length: %x\n", Length);
+ TRACE_(VIDEOPRT, "IntInt10WriteMemory\n");
+ INFO_(VIDEOPRT, "- Segment: %x\n", Seg);
+ INFO_(VIDEOPRT, "- Offset: %x\n", Off);
+ INFO_(VIDEOPRT, "- Buffer: %x\n", Buffer);
+ INFO_(VIDEOPRT, "- Length: %x\n", Length);
IntAttachToCSRSS(&CallingProcess, &ApcState);
RtlCopyMemory((PVOID)((Seg << 4) | Off), Buffer, Length);
@@ -208,7 +207,7 @@
PKPROCESS CallingProcess;
KAPC_STATE ApcState;
- DPRINT("VideoPortInt10\n");
+ TRACE_(VIDEOPRT, "VideoPortInt10\n");
if (!CsrssInitialized)
{
@@ -218,19 +217,19 @@
IntAttachToCSRSS(&CallingProcess, &ApcState);
memset(&Regs, 0, sizeof(Regs));
- DPRINT("- Input register Eax: %x\n", BiosArguments->Eax);
+ INFO_(VIDEOPRT, "- Input register Eax: %x\n", BiosArguments->Eax);
Regs.Eax = BiosArguments->Eax;
- DPRINT("- Input register Ebx: %x\n", BiosArguments->Ebx);
+ INFO_(VIDEOPRT, "- Input register Ebx: %x\n", BiosArguments->Ebx);
Regs.Ebx = BiosArguments->Ebx;
- DPRINT("- Input register Ecx: %x\n", BiosArguments->Ecx);
+ INFO_(VIDEOPRT, "- Input register Ecx: %x\n", BiosArguments->Ecx);
Regs.Ecx = BiosArguments->Ecx;
- DPRINT("- Input register Edx: %x\n", BiosArguments->Edx);
+ INFO_(VIDEOPRT, "- Input register Edx: %x\n", BiosArguments->Edx);
Regs.Edx = BiosArguments->Edx;
- DPRINT("- Input register Esi: %x\n", BiosArguments->Esi);
+ INFO_(VIDEOPRT, "- Input register Esi: %x\n", BiosArguments->Esi);
Regs.Esi = BiosArguments->Esi;
- DPRINT("- Input register Edi: %x\n", BiosArguments->Edi);
+ INFO_(VIDEOPRT, "- Input register Edi: %x\n", BiosArguments->Edi);
Regs.Edi = BiosArguments->Edi;
- DPRINT("- Input register Ebp: %x\n", BiosArguments->Ebp);
+ INFO_(VIDEOPRT, "- Input register Ebp: %x\n", BiosArguments->Ebp);
Regs.Ebp = BiosArguments->Ebp;
Status = Ke386CallBios(0x10, (PCONTEXT)&Regs);
BiosArguments->Eax = Regs.Eax;
Modified: trunk/reactos/drivers/video/videoprt/interrupt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/int…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/interrupt.c (original)
+++ trunk/reactos/drivers/video/videoprt/interrupt.c Fri Dec 28 17:47:03 2007
@@ -18,7 +18,6 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: interrupt.c 21844 2006-05-07 19:34:23Z ion $
*/
#include "videoprt.h"
@@ -71,7 +70,7 @@
if (InterruptVector == 0)
{
- DPRINT("HalGetInterruptVector failed\n");
+ WARN_(VIDEOPRT, "HalGetInterruptVector failed\n");
return FALSE;
}
@@ -91,7 +90,7 @@
if (!NT_SUCCESS(Status))
{
- DPRINT("IoConnectInterrupt failed with status 0x%08x\n", Status);
+ WARN_(VIDEOPRT, "IoConnectInterrupt failed with status 0x%08x\n",
Status);
return FALSE;
}
}
@@ -111,7 +110,7 @@
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
BOOLEAN Status;
- DPRINT("VideoPortEnableInterrupt\n");
+ TRACE_(VIDEOPRT, "VideoPortEnableInterrupt\n");
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
@@ -133,7 +132,7 @@
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
BOOLEAN Status;
- DPRINT("VideoPortDisableInterrupt\n");
+ TRACE_(VIDEOPRT, "VideoPortDisableInterrupt\n");
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
Modified: trunk/reactos/drivers/video/videoprt/resource.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/res…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/resource.c (original)
+++ trunk/reactos/drivers/video/videoprt/resource.c Fri Dec 28 17:47:03 2007
@@ -18,7 +18,6 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: resource.c 21844 2006-05-07 19:34:23Z ion $
*/
#include "videoprt.h"
@@ -50,7 +49,7 @@
Status = ZwOpenSection(&hMemObj, SECTION_ALL_ACCESS, &ObjAttribs);
if (!NT_SUCCESS(Status))
{
- DPRINT("ZwOpenSection() failed! (0x%x)\n", Status);
+ WARN_(VIDEOPRT, "ZwOpenSection() failed! (0x%x)\n", Status);
return Status;
}
@@ -69,7 +68,7 @@
ZwClose(hMemObj);
if (!NT_SUCCESS(Status))
{
- DPRINT("ZwMapViewOfSection() failed! (0x%x)\n", Status);
+ WARN_(VIDEOPRT, "ZwMapViewOfSection() failed! (0x%x)\n", Status);
}
return Status;
@@ -91,20 +90,20 @@
PVOID MappedAddress;
PLIST_ENTRY Entry;
- DPRINT("- IoAddress: %lx\n", IoAddress.u.LowPart);
- DPRINT("- NumberOfUchars: %lx\n", NumberOfUchars);
- DPRINT("- InIoSpace: %x\n", InIoSpace);
+ INFO_(VIDEOPRT, "- IoAddress: %lx\n", IoAddress.u.LowPart);
+ INFO_(VIDEOPRT, "- NumberOfUchars: %lx\n", NumberOfUchars);
+ INFO_(VIDEOPRT, "- InIoSpace: %x\n", InIoSpace);
InIoSpace &= ~VIDEO_MEMORY_SPACE_DENSE;
if ((InIoSpace & VIDEO_MEMORY_SPACE_P6CACHE) != 0)
{
- DPRINT("VIDEO_MEMORY_SPACE_P6CACHE not supported, turning off\n");
+ INFO_(VIDEOPRT, "VIDEO_MEMORY_SPACE_P6CACHE not supported, turning
off\n");
InIoSpace &= ~VIDEO_MEMORY_SPACE_P6CACHE;
}
if (ProcessHandle != NULL && (InIoSpace & VIDEO_MEMORY_SPACE_USER_MODE) ==
0)
{
- DPRINT("ProcessHandle is not NULL (0x%x) but InIoSpace does not have "
+ INFO_(VIDEOPRT, "ProcessHandle is not NULL (0x%x) but InIoSpace does not have
"
"VIDEO_MEMORY_SPACE_USER_MODE set! Setting "
"VIDEO_MEMORY_SPACE_USER_MODE.\n",
ProcessHandle);
@@ -112,7 +111,7 @@
}
else if (ProcessHandle == NULL && (InIoSpace &
VIDEO_MEMORY_SPACE_USER_MODE) != 0)
{
- DPRINT("ProcessHandle is NULL (0x%x) but InIoSpace does have "
+ INFO_(VIDEOPRT, "ProcessHandle is NULL (0x%x) but InIoSpace does have "
"VIDEO_MEMORY_SPACE_USER_MODE set! Setting ProcessHandle "
"to NtCurrentProcess()\n",
ProcessHandle);
@@ -180,12 +179,12 @@
&MappedAddress);
if (!NT_SUCCESS(NtStatus))
{
- DPRINT("IntVideoPortMapPhysicalMemory() failed! (0x%x)\n", NtStatus);
+ WARN_(VIDEOPRT, "IntVideoPortMapPhysicalMemory() failed! (0x%x)\n",
NtStatus);
if (Status)
*Status = NO_ERROR;
return NULL;
}
- DPRINT("Mapped user address = 0x%08x\n", MappedAddress);
+ INFO_(VIDEOPRT, "Mapped user address = 0x%08x\n", MappedAddress);
}
else /* kernel space */
{
@@ -273,7 +272,7 @@
Status = ZwUnmapViewOfSection(NtCurrentProcess(), MappedAddress);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Warning: Mapping for address 0x%x not found!\n",
(ULONG)MappedAddress);
+ WARN_(VIDEOPRT, "Warning: Mapping for address 0x%x not found!\n",
(ULONG)MappedAddress);
}
}
@@ -290,7 +289,7 @@
IN ULONG NumberOfUchars,
IN UCHAR InIoSpace)
{
- DPRINT("VideoPortGetDeviceBase\n");
+ TRACE_(VIDEOPRT, "VideoPortGetDeviceBase\n");
return IntVideoPortMapMemory(
VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension),
IoAddress,
@@ -309,7 +308,7 @@
IN PVOID HwDeviceExtension,
IN PVOID MappedAddress)
{
- DPRINT("VideoPortFreeDeviceBase\n");
+ TRACE_(VIDEOPRT, "VideoPortFreeDeviceBase\n");
IntVideoPortUnmapMemory(
VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension),
MappedAddress);
@@ -331,7 +330,7 @@
IN PBANKED_SECTION_ROUTINE BankRoutine,
IN PVOID Context)
{
- DPRINT("VideoPortMapBankedMemory\n");
+ TRACE_(VIDEOPRT, "VideoPortMapBankedMemory\n");
UNIMPLEMENTED;
return ERROR_CALL_NOT_IMPLEMENTED;
}
@@ -352,8 +351,8 @@
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
NTSTATUS Status;
- DPRINT("VideoPortMapMemory\n");
- DPRINT("- *VirtualAddress: 0x%x\n", *VirtualAddress);
+ TRACE_(VIDEOPRT, "VideoPortMapMemory\n");
+ INFO_(VIDEOPRT, "- *VirtualAddress: 0x%x\n", *VirtualAddress);
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
*VirtualAddress = IntVideoPortMapMemory(
@@ -377,7 +376,7 @@
IN PVOID VirtualAddress,
IN HANDLE ProcessHandle)
{
- DPRINT("VideoPortFreeDeviceBase\n");
+ TRACE_(VIDEOPRT, "VideoPortFreeDeviceBase\n");
IntVideoPortUnmapMemory(
VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension),
@@ -415,7 +414,7 @@
ULONG SlotIdToFind;
ULONG ReturnedLength;
- DPRINT("VideoPortGetAccessRanges\n");
+ TRACE_(VIDEOPRT, "VideoPortGetAccessRanges\n");
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
@@ -448,7 +447,7 @@
SlotIdToFind = Slot != NULL ? *Slot : 0;
PciSlotNumber.u.AsULONG = SlotIdToFind;
- DPRINT("Looking for VendorId 0x%04x DeviceId 0x%04x\n",
+ INFO_(VIDEOPRT, "Looking for VendorId 0x%04x DeviceId 0x%04x\n",
VendorIdToFind, DeviceIdToFind);
/*
@@ -457,7 +456,7 @@
for (FunctionNumber = 0; FunctionNumber < 8; FunctionNumber++)
{
- DPRINT("- Function number: %d\n", FunctionNumber);
+ INFO_(VIDEOPRT, "- Function number: %d\n", FunctionNumber);
PciSlotNumber.u.bits.FunctionNumber = FunctionNumber;
ReturnedLength = HalGetBusData(
PCIConfiguration,
@@ -465,10 +464,10 @@
PciSlotNumber.u.AsULONG,
&Config,
sizeof(PCI_COMMON_CONFIG));
- DPRINT("- Length of data: %x\n", ReturnedLength);
+ INFO_(VIDEOPRT, "- Length of data: %x\n", ReturnedLength);
if (ReturnedLength == sizeof(PCI_COMMON_CONFIG))
{
- DPRINT("- Slot 0x%02x (Device %d Function %d) VendorId 0x%04x
"
+ INFO_(VIDEOPRT, "- Slot 0x%02x (Device %d Function %d) VendorId
0x%04x "
"DeviceId 0x%04x\n",
PciSlotNumber.u.AsULONG,
PciSlotNumber.u.bits.DeviceNumber,
@@ -486,7 +485,7 @@
if (FunctionNumber == 8)
{
- DPRINT("Didn't find device.\n");
+ WARN_(VIDEOPRT, "Didn't find device.\n");
return ERROR_DEV_NOT_EXIST;
}
}
@@ -524,17 +523,17 @@
Descriptor->Type == CmResourceTypePort) &&
AssignedCount >= NumAccessRanges)
{
- DPRINT1("Too many access ranges found\n");
+ WARN_(VIDEOPRT, "Too many access ranges found\n");
return ERROR_NO_SYSTEM_RESOURCES;
}
if (Descriptor->Type == CmResourceTypeMemory)
{
if (NumAccessRanges <= AssignedCount)
{
- DPRINT1("Too many access ranges found\n");
+ WARN_(VIDEOPRT, "Too many access ranges found\n");
return ERROR_NO_SYSTEM_RESOURCES;
}
- DPRINT("Memory range starting at 0x%08x length 0x%08x\n",
+ INFO_(VIDEOPRT, "Memory range starting at 0x%08x length
0x%08x\n",
Descriptor->u.Memory.Start.u.LowPart,
Descriptor->u.Memory.Length);
AccessRanges[AssignedCount].RangeStart = Descriptor->u.Memory.Start;
AccessRanges[AssignedCount].RangeLength = Descriptor->u.Memory.Length;
@@ -546,7 +545,7 @@
}
else if (Descriptor->Type == CmResourceTypePort)
{
- DPRINT("Port range starting at 0x%04x length %d\n",
+ INFO_(VIDEOPRT, "Port range starting at 0x%04x length %d\n",
Descriptor->u.Memory.Start.u.LowPart,
Descriptor->u.Memory.Length);
AccessRanges[AssignedCount].RangeStart = Descriptor->u.Port.Start;
AccessRanges[AssignedCount].RangeLength = Descriptor->u.Port.Length;
@@ -593,7 +592,7 @@
ULONG ResourceListSize;
NTSTATUS Status;
- DPRINT("VideoPortVerifyAccessRanges\n");
+ TRACE_(VIDEOPRT, "VideoPortVerifyAccessRanges\n");
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
@@ -603,7 +602,7 @@
ResourceList = ExAllocatePool(PagedPool, ResourceListSize);
if (!ResourceList)
{
- DPRINT("ExAllocatePool() failed\n");
+ WARN_(VIDEOPRT, "ExAllocatePool() failed\n");
return ERROR_INVALID_PARAMETER;
}
@@ -666,7 +665,7 @@
IN PMINIPORT_QUERY_DEVICE_ROUTINE CallbackRoutine,
IN PVOID Context)
{
- DPRINT("VideoPortGetDeviceData\n");
+ TRACE_(VIDEOPRT, "VideoPortGetDeviceData\n");
UNIMPLEMENTED;
return ERROR_CALL_NOT_IMPLEMENTED;
}
@@ -682,7 +681,7 @@
IN SIZE_T NumberOfBytes,
IN ULONG Tag)
{
- DPRINT("VideoPortAllocatePool\n");
+ TRACE_(VIDEOPRT, "VideoPortAllocatePool\n");
return ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag);
}
@@ -708,7 +707,7 @@
IN ULONG Size,
OUT PVOID *Buffer)
{
- DPRINT("VideoPortAllocateBuffer\n");
+ TRACE_(VIDEOPRT, "VideoPortAllocateBuffer\n");
*Buffer = ExAllocatePoolWithTag ( PagedPool, Size, TAG_VIDEO_PORT_BUFFER ) ;
return *Buffer == NULL ? ERROR_NOT_ENOUGH_MEMORY : NO_ERROR;
}
@@ -722,7 +721,7 @@
IN PVOID HwDeviceExtension,
IN PVOID Ptr)
{
- DPRINT("VideoPortReleaseBuffer\n");
+ TRACE_(VIDEOPRT, "VideoPortReleaseBuffer\n");
ExFreePool(Ptr);
}
@@ -737,8 +736,8 @@
IN ULONG Length,
IN VP_LOCK_OPERATION Operation)
{
- DPRINT1("VideoPortLockBuffer: Unimplemented.\n");
- return NULL;
+ UNIMPLEMENTED;
+ return NULL;
}
/*
@@ -750,7 +749,7 @@
IN PVOID HwDeviceExtension,
IN PVOID Mdl)
{
- DPRINT1("VideoPortUnlockBuffer: Unimplemented.\n");
+ UNIMPLEMENTED;
}
/*
@@ -763,9 +762,9 @@
IN ULONG NumAccessRanges,
IN PVIDEO_ACCESS_RANGE AccessRange)
{
- DPRINT("VideoPortSetTrappedEmulatorPorts\n");
- /* Should store the ranges in the device extension for use by ntvdm. */
- return NO_ERROR;
+ UNIMPLEMENTED;
+ /* Should store the ranges in the device extension for use by ntvdm. */
+ return NO_ERROR;
}
/*
@@ -783,7 +782,7 @@
{
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
- DPRINT("VideoPortGetBusData\n");
+ TRACE_(VIDEOPRT, "VideoPortGetBusData\n");
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
@@ -818,7 +817,7 @@
{
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
- DPRINT("VideoPortSetBusData\n");
+ TRACE_(VIDEOPRT, "VideoPortSetBusData\n");
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
Modified: trunk/reactos/drivers/video/videoprt/services.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/ser…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/services.c (original)
+++ trunk/reactos/drivers/video/videoprt/services.c Fri Dec 28 17:47:03 2007
@@ -18,7 +18,6 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: services.c 21844 2006-05-07 19:34:23Z ion $
*/
#include "videoprt.h"
@@ -41,7 +40,7 @@
IN VIDEO_PORT_SERVICES ServicesType,
IN OUT PINTERFACE Interface)
{
- DPRINT("VideoPortQueryServices - ServicesType: 0x%x\n", ServicesType);
+ TRACE_(VIDEOPRT, "VideoPortQueryServices - ServicesType: 0x%x\n",
ServicesType);
switch (ServicesType)
{
@@ -77,9 +76,11 @@
break;
case VideoPortServicesI2C:
+ UNIMPLEMENTED;
+ return ERROR_CALL_NOT_IMPLEMENTED;
+
case VideoPortServicesHeadless:
- DPRINT1("VideoPortServices%s is UNIMPLEMENTED!\n",
- (ServicesType == VideoPortServicesI2C) ? "I2C" :
"Headless");
+ UNIMPLEMENTED;
return ERROR_CALL_NOT_IMPLEMENTED;
default:
@@ -97,7 +98,7 @@
VIDEO_PORT_AGP_INTERFACE Interface;
VP_STATUS Status;
- DPRINT("VideoPortGetAgpServices\n");
+ TRACE_(VIDEOPRT, "VideoPortGetAgpServices\n");
Interface.Size = sizeof(Interface);
Interface.Version = VIDEO_PORT_AGP_INTERFACE_VERSION_1;
@@ -106,7 +107,7 @@
(PINTERFACE)&Interface);
if (Status != NO_ERROR)
{
- DPRINT("VideoPortQueryServices() failed!\n");
+ WARN_(VIDEOPRT, "VideoPortQueryServices() failed!\n");
return FALSE;
}
Modified: trunk/reactos/drivers/video/videoprt/spinlock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/spi…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/spinlock.c (original)
+++ trunk/reactos/drivers/video/videoprt/spinlock.c Fri Dec 28 17:47:03 2007
@@ -18,7 +18,6 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: spinlock.c 21844 2006-05-07 19:34:23Z ion $
*/
#include "videoprt.h"
@@ -32,7 +31,7 @@
IN PVOID HwDeviceExtension,
OUT PSPIN_LOCK *SpinLock)
{
- DPRINT("VideoPortCreateSpinLock\n");
+ TRACE_(VIDEOPRT, "VideoPortCreateSpinLock\n");
*SpinLock = ExAllocatePool(NonPagedPool, sizeof(KSPIN_LOCK));
if (*SpinLock == NULL)
return ERROR_NOT_ENOUGH_MEMORY;
@@ -49,7 +48,7 @@
IN PVOID HwDeviceExtension,
IN PSPIN_LOCK SpinLock)
{
- DPRINT("VideoPortDeleteSpinLock\n");
+ TRACE_(VIDEOPRT, "VideoPortDeleteSpinLock\n");
ExFreePool(SpinLock);
return NO_ERROR;
}
@@ -64,7 +63,7 @@
IN PSPIN_LOCK SpinLock,
OUT PUCHAR OldIrql)
{
- DPRINT("VideoPortAcquireSpinLock\n");
+ TRACE_(VIDEOPRT, "VideoPortAcquireSpinLock\n");
KeAcquireSpinLock((PKSPIN_LOCK)SpinLock, OldIrql);
}
@@ -77,7 +76,7 @@
IN PVOID HwDeviceExtension,
IN PSPIN_LOCK SpinLock)
{
- DPRINT("VideoPortAcquireSpinLockAtDpcLevel\n");
+ TRACE_(VIDEOPRT, "VideoPortAcquireSpinLockAtDpcLevel\n");
KefAcquireSpinLockAtDpcLevel((PKSPIN_LOCK)SpinLock);
}
@@ -91,7 +90,7 @@
IN PSPIN_LOCK SpinLock,
IN UCHAR NewIrql)
{
- DPRINT("VideoPortReleaseSpinLock\n");
+ TRACE_(VIDEOPRT, "VideoPortReleaseSpinLock\n");
KeReleaseSpinLock((PKSPIN_LOCK)SpinLock, NewIrql);
}
@@ -104,6 +103,6 @@
IN PVOID HwDeviceExtension,
IN PSPIN_LOCK SpinLock)
{
- DPRINT("VideoPortReleaseSpinLockFromDpcLevel\n");
+ TRACE_(VIDEOPRT, "VideoPortReleaseSpinLockFromDpcLevel\n");
KefReleaseSpinLockFromDpcLevel((PKSPIN_LOCK)SpinLock);
}
Modified: trunk/reactos/drivers/video/videoprt/timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/tim…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/timer.c (original)
+++ trunk/reactos/drivers/video/videoprt/timer.c Fri Dec 28 17:47:03 2007
@@ -18,7 +18,6 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: timer.c 21844 2006-05-07 19:34:23Z ion $
*/
#include "videoprt.h"
@@ -50,7 +49,7 @@
if (DriverExtension->InitializationData.HwTimer != NULL)
{
- DPRINT("Initializing timer\n");
+ INFO_(VIDEOPRT, "Initializing timer\n");
Status = IoInitializeTimer(
DeviceObject,
@@ -59,7 +58,7 @@
if (!NT_SUCCESS(Status))
{
- DPRINT("IoInitializeTimer failed with status 0x%08x\n", Status);
+ WARN_(VIDEOPRT, "IoInitializeTimer failed with status 0x%08x\n",
Status);
return FALSE;
}
}
@@ -76,7 +75,7 @@
VOID NTAPI
VideoPortStartTimer(IN PVOID HwDeviceExtension)
{
- DPRINT("VideoPortStartTimer\n");
+ TRACE_(VIDEOPRT, "VideoPortStartTimer\n");
IoStartTimer(VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension)->FunctionalDeviceObject);
}
@@ -87,6 +86,6 @@
VOID NTAPI
VideoPortStopTimer(IN PVOID HwDeviceExtension)
{
- DPRINT("VideoPortStopTimer\n");
+ TRACE_(VIDEOPRT, "VideoPortStopTimer\n");
IoStopTimer(VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension)->FunctionalDeviceObject);
}
Modified: trunk/reactos/drivers/video/videoprt/videoprt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/vid…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.c (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.c Fri Dec 28 17:47:03 2007
@@ -134,7 +134,7 @@
}
else
{
- DPRINT1("Unparsable registry path %wZ", DriverRegistryPath);
+ WARN_(VIDEOPRT, "Unparsable registry path %wZ", DriverRegistryPath);
}
if (Valid)
@@ -190,7 +190,7 @@
DeviceNumber = VideoPortDeviceNumber++;
if (DeviceNumber == 0xFFFFFFFF)
{
- DPRINT("Can't find free device number\n");
+ WARN_(VIDEOPRT, "Can't find free device number\n");
return STATUS_UNSUCCESSFUL;
}
@@ -202,7 +202,7 @@
swprintf(DeviceBuffer, L"\\Device\\Video%lu", DeviceNumber);
RtlInitUnicodeString(&DeviceName, DeviceBuffer);
- DPRINT("HwDeviceExtension size is: 0x%x\n",
+ INFO_(VIDEOPRT, "HwDeviceExtension size is: 0x%x\n",
DriverExtension->InitializationData.HwDeviceExtensionSize);
/* Create the device object. */
@@ -218,7 +218,7 @@
if (!NT_SUCCESS(Status))
{
- DPRINT("IoCreateDevice call failed with status 0x%08x\n", Status);
+ WARN_(VIDEOPRT, "IoCreateDevice call failed with status 0x%08x\n",
Status);
return Status;
}
@@ -249,7 +249,7 @@
&DeviceExtension->RegistryPath);
if (!NT_SUCCESS(Status))
{
- DPRINT("IntCreateRegistryPath() call failed with status 0x%08x\n",
Status);
+ WARN_(VIDEOPRT, "IntCreateRegistryPath() call failed with status
0x%08x\n", Status);
IoDeleteDevice(*DeviceObject);
*DeviceObject = NULL;
return Status;
@@ -267,7 +267,7 @@
&Size);
if (!NT_SUCCESS(Status))
{
- DPRINT("Couldn't get an information from bus driver. We will try
to\n"
+ WARN_(VIDEOPRT, "Couldn't get an information from bus driver. We will
try to\n"
"use legacy detection method, but even that doesn't mean
that\n"
"it will work.\n");
DeviceExtension->PhysicalDeviceObject = NULL;
@@ -422,7 +422,7 @@
}
else
{
- DPRINT("HwFindAdapter call failed with error 0x%X\n", Status);
+ WARN_(VIDEOPRT, "HwFindAdapter call failed with error 0x%X\n",
Status);
RtlFreeUnicodeString(&DeviceExtension->RegistryPath);
IoDeleteDevice(DeviceObject);
@@ -443,7 +443,7 @@
if (Status != NO_ERROR)
{
- DPRINT("HwFindAdapter call failed with error 0x%X\n", Status);
+ WARN_(VIDEOPRT, "HwFindAdapter call failed with error 0x%X\n", Status);
RtlFreeUnicodeString(&DeviceExtension->RegistryPath);
IoDeleteDevice(DeviceObject);
return Status;
@@ -504,7 +504,7 @@
IoDisconnectInterrupt(DeviceExtension->InterruptObject);
RtlFreeUnicodeString(&DeviceExtension->RegistryPath);
IoDeleteDevice(DeviceObject);
- DPRINT("STATUS_INSUFFICIENT_RESOURCES\n");
+ WARN_(VIDEOPRT, "STATUS_INSUFFICIENT_RESOURCES\n");
return STATUS_INSUFFICIENT_RESOURCES;
}
@@ -513,7 +513,7 @@
*/
VideoPortEnumerateChildren(&DeviceExtension->MiniPortDeviceExtension, NULL);
- DPRINT("STATUS_SUCCESS\n");
+ INFO_(VIDEOPRT, "STATUS_SUCCESS\n");
return STATUS_SUCCESS;
}
@@ -555,7 +555,7 @@
PVIDEO_PORT_DRIVER_EXTENSION DriverExtension;
BOOLEAN PnpDriver = FALSE, LegacyDetection = FALSE;
- DPRINT("VideoPortInitialize\n");
+ TRACE_(VIDEOPRT, "VideoPortInitialize\n");
/*
* As a first thing do parameter checks.
@@ -581,19 +581,19 @@
*/
case SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA:
- DPRINT("We were loaded by a Windows NT miniport driver.\n");
+ INFO_(VIDEOPRT, "We were loaded by a Windows NT miniport driver.\n");
break;
case SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA:
- DPRINT("We were loaded by a Windows 2000 miniport driver.\n");
+ INFO_(VIDEOPRT, "We were loaded by a Windows 2000 miniport
driver.\n");
break;
case sizeof(VIDEO_HW_INITIALIZATION_DATA):
- DPRINT("We were loaded by a Windows XP or later miniport driver.\n");
+ INFO_(VIDEOPRT, "We were loaded by a Windows XP or later miniport
driver.\n");
break;
default:
- DPRINT("Invalid HwInitializationData size.\n");
+ WARN_(VIDEOPRT, "Invalid HwInitializationData size.\n");
return STATUS_UNSUCCESSFUL;
}
@@ -615,14 +615,14 @@
&& HwInitializationData->HwGetPowerState
&& HwInitializationData->HwGetVideoChildDescriptor)
{
- DPRINT("The miniport is a PnP miniport driver\n");
+ INFO_(VIDEOPRT, "The miniport is a PnP miniport driver\n");
PnpDriver = TRUE;
}
/* Check if legacy detection should be applied */
if (!PnpDriver || HwContext)
{
- DPRINT("Legacy detection for adapter interface %d\n",
+ INFO_(VIDEOPRT, "Legacy detection for adapter interface %d\n",
HwInitializationData->AdapterInterfaceType);
/* FIXME: Move the code for legacy detection
@@ -674,7 +674,7 @@
}
RtlCopyUnicodeString(&DriverExtension->RegistryPath, RegistryPath);
- DPRINT("RegistryPath: %wZ\n", &DriverExtension->RegistryPath);
+ INFO_(VIDEOPRT, "RegistryPath: %wZ\n",
&DriverExtension->RegistryPath);
}
else
{
@@ -716,11 +716,11 @@
}
Status = IntVideoPortCreateAdapterDeviceObject(DriverObject, DriverExtension,
NULL, &DeviceObject);
- DPRINT("IntVideoPortCreateAdapterDeviceObject returned 0x%x\n", Status);
+ INFO_(VIDEOPRT, "IntVideoPortCreateAdapterDeviceObject returned 0x%x\n",
Status);
if (!NT_SUCCESS(Status))
return Status;
Status = IntVideoPortFindAdapter(DriverObject, DriverExtension, DeviceObject);
- DPRINT("IntVideoPortFindAdapter returned 0x%x\n", Status);
+ INFO_(VIDEOPRT, "IntVideoPortFindAdapter returned 0x%x\n", Status);
return Status;
}
else
@@ -743,14 +743,11 @@
IN VIDEO_DEBUG_LEVEL DebugPrintLevel,
IN PCHAR DebugMessage, ...)
{
- char Buffer[256];
va_list ap;
va_start(ap, DebugMessage);
- vsprintf(Buffer, DebugMessage, ap);
+ vDbgPrintEx(DPFLTR_IHVVIDEO_ID, DebugPrintLevel, DebugMessage, ap);
va_end(ap);
-
- DbgPrintEx(DPFLTR_IHVVIDEO_ID, DebugPrintLevel, Buffer);
}
/*
@@ -764,12 +761,12 @@
IN VP_STATUS ErrorCode,
IN ULONG UniqueId)
{
- DPRINT1("VideoPortLogError ErrorCode %d (0x%x) UniqueId %lu (0x%lx)\n",
- ErrorCode, ErrorCode, UniqueId, UniqueId);
- if (NULL != Vrp)
- {
- DPRINT1("Vrp->IoControlCode %lu (0x%lx)\n", Vrp->IoControlCode,
Vrp->IoControlCode);
- }
+ UNIMPLEMENTED;
+
+ INFO_(VIDEOPRT, "VideoPortLogError ErrorCode %d (0x%x) UniqueId %lu
(0x%lx)\n",
+ ErrorCode, ErrorCode, UniqueId, UniqueId);
+ if (Vrp)
+ INFO_(VIDEOPRT, "Vrp->IoControlCode %lu (0x%lx)\n",
Vrp->IoControlCode, Vrp->IoControlCode);
}
/*
@@ -800,7 +797,7 @@
{
PQUERY_REGISTRY_CALLBACK_CONTEXT CallbackContext = (PQUERY_REGISTRY_CALLBACK_CONTEXT)
Context;
- DPRINT("Found registry value for name %S: type %d, length %d\n",
+ INFO_(VIDEOPRT, "Found registry value for name %S: type %d, length %d\n",
ValueName, ValueType, ValueLength);
return (*(CallbackContext->HwGetRegistryRoutine))(
CallbackContext->HwDeviceExtension,
@@ -828,7 +825,7 @@
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
- DPRINT("VideoPortGetRegistryParameters ParameterName %S, RegPath: %wZ\n",
+ TRACE_(VIDEOPRT, "VideoPortGetRegistryParameters ParameterName %S, RegPath:
%wZ\n",
ParameterName, &DeviceExtension->RegistryPath);
Context.HwDeviceExtension = HwDeviceExtension;
@@ -846,7 +843,7 @@
&Context,
NULL)))
{
- DPRINT1("VideoPortGetRegistryParameters could not find the "
+ WARN_(VIDEOPRT, "VideoPortGetRegistryParameters could not find the "
"requested parameter\n");
return ERROR_INVALID_PARAMETER;
}
@@ -873,7 +870,7 @@
{
VP_STATUS Status;
- DPRINT("VideoPortSetRegistryParameters ParameterName %S, RegPath: %wZ\n",
+ TRACE_(VIDEOPRT, "VideoPortSetRegistryParameters ParameterName %S, RegPath:
%wZ\n",
ValueName,
&VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension)->RegistryPath);
ASSERT_IRQL(PASSIVE_LEVEL);
@@ -886,7 +883,7 @@
ValueLength);
if (Status != ERROR_SUCCESS)
- DPRINT1("VideoPortSetRegistryParameters error 0x%x\n", Status);
+ WARN_(VIDEOPRT, "VideoPortSetRegistryParameters error 0x%x\n", Status);
return Status;
}
@@ -902,7 +899,7 @@
{
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
- DPRINT("VideoPortGetVgaStatus\n");
+ TRACE_(VIDEOPRT, "VideoPortGetVgaStatus\n");
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
if (KeGetCurrentIrql() == PASSIVE_LEVEL)
@@ -934,7 +931,7 @@
PKPROCESS CallingProcess;
KAPC_STATE ApcState;
- DPRINT("VideoPortGetRomImage(HwDeviceExtension 0x%X Length 0x%X)\n",
+ TRACE_(VIDEOPRT, "VideoPortGetRomImage(HwDeviceExtension 0x%X Length
0x%X)\n",
HwDeviceExtension, Length);
/* If the length is zero then free the existing buffer. */
@@ -992,7 +989,7 @@
BOOLEAN Found;
PUCHAR SearchLocation;
- DPRINT("VideoPortScanRom RomBase %p RomLength 0x%x String %s\n", RomBase,
RomLength, String);
+ TRACE_(VIDEOPRT, "VideoPortScanRom RomBase %p RomLength 0x%x String %s\n",
RomBase, RomLength, String);
StringLength = strlen((PCHAR)String);
Found = FALSE;
@@ -1004,7 +1001,7 @@
Found = (RtlCompareMemory(SearchLocation, String, StringLength) == StringLength);
if (Found)
{
- DPRINT("Match found at %p\n", SearchLocation);
+ INFO_(VIDEOPRT, "Match found at %p\n", SearchLocation);
}
}
@@ -1084,7 +1081,7 @@
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
if
(DeviceExtension->DriverExtension->InitializationData.HwGetVideoChildDescriptor ==
NULL)
{
- DPRINT("Miniport's HwGetVideoChildDescriptor is NULL!\n");
+ WARN_(VIDEOPRT, "Miniport's HwGetVideoChildDescriptor is NULL!\n");
return NO_ERROR;
}
@@ -1126,7 +1123,7 @@
// Compare the previous monitor ID with the current one, break the loop
if they are identical
if (RtlCompareMemory(LastMonitorID, &ChildDescriptor[8],
sizeof(LastMonitorID)) == sizeof(LastMonitorID))
{
- DPRINT("Found identical Monitor ID two times, stopping
enumeration\n");
+ INFO_(VIDEOPRT, "Found identical Monitor ID two times, stopping
enumeration\n");
break;
}
}
@@ -1139,17 +1136,17 @@
}
else if (Status == VIDEO_ENUM_INVALID_DEVICE)
{
- DPRINT("Child device %d is invalid!\n", ChildEnumInfo.ChildIndex);
+ WARN_(VIDEOPRT, "Child device %d is invalid!\n",
ChildEnumInfo.ChildIndex);
continue;
}
else if (Status == VIDEO_ENUM_NO_MORE_DEVICES)
{
- DPRINT("End of child enumeration! (%d children enumerated)\n", i -
1);
+ INFO_(VIDEOPRT, "End of child enumeration! (%d children
enumerated)\n", i - 1);
break;
}
else
{
- DPRINT("HwGetVideoChildDescriptor returned unknown status code
0x%x!\n", Status);
+ WARN_(VIDEOPRT, "HwGetVideoChildDescriptor returned unknown status code
0x%x!\n", Status);
break;
}
@@ -1158,21 +1155,21 @@
{
INT j;
PUCHAR p = ChildDescriptor;
- DPRINT("Monitor device enumerated! (ChildId = 0x%x)\n", ChildId);
+ INFO_(VIDEOPRT, "Monitor device enumerated! (ChildId = 0x%x)\n",
ChildId);
for (j = 0; j < sizeof (ChildDescriptor); j += 8)
{
- DPRINT("%02x %02x %02x %02x %02x %02x %02x %02x\n",
+ INFO_(VIDEOPRT, "%02x %02x %02x %02x %02x %02x %02x %02x\n",
p[j+0], p[j+1], p[j+2], p[j+3],
p[j+4], p[j+5], p[j+6], p[j+7]);
}
}
else if (ChildType == Other)
{
- DPRINT("\"Other\" device enumerated: DeviceId = %S\n",
(PWSTR)ChildDescriptor);
+ INFO_(VIDEOPRT, "\"Other\" device enumerated: DeviceId =
%S\n", (PWSTR)ChildDescriptor);
}
else
{
- DPRINT("HwGetVideoChildDescriptor returned unsupported type: %d\n",
ChildType);
+ WARN_(VIDEOPRT, "HwGetVideoChildDescriptor returned unsupported type:
%d\n", ChildType);
}
#endif /* NDEBUG */
@@ -1191,8 +1188,8 @@
IN OUT PVOID *SecondaryDeviceExtension,
IN ULONG Flag)
{
- DPRINT1("VideoPortCreateSecondaryDisplay: Unimplemented.\n");
- return ERROR_DEV_NOT_EXIST;
+ UNIMPLEMENTED;
+ return ERROR_DEV_NOT_EXIST;
}
/*
@@ -1220,7 +1217,7 @@
{
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
- DPRINT("VideoPortGetAssociatedDeviceExtension\n");
+ TRACE_(VIDEOPRT, "VideoPortGetAssociatedDeviceExtension\n");
DeviceExtension = ((PDEVICE_OBJECT)DeviceObject)->DeviceExtension;
if (!DeviceExtension)
return NULL;
@@ -1287,11 +1284,11 @@
NTSTATUS Status;
BOOL DevicePresent;
- DPRINT("VideoPortCheckForDeviceExistence\n");
+ TRACE_(VIDEOPRT, "VideoPortCheckForDeviceExistence\n");
if (Flags & ~(CDE_USE_REVISION | CDE_USE_SUBSYSTEM_IDS))
{
- DPRINT1("VideoPortCheckForDeviceExistence: Unknown flags 0x%lx\n", Flags
& ~(CDE_USE_REVISION | CDE_USE_SUBSYSTEM_IDS));
+ WARN_(VIDEOPRT, "VideoPortCheckForDeviceExistence: Unknown flags
0x%lx\n", Flags & ~(CDE_USE_REVISION | CDE_USE_SUBSYSTEM_IDS));
return FALSE;
}
@@ -1308,7 +1305,7 @@
&IoStatusBlock, IRP_MN_QUERY_INTERFACE, &IoStack);
if (!NT_SUCCESS(Status))
{
- DPRINT("IopInitiatePnpIrp() failed! (Status 0x%lx)\n", Status);
+ WARN_(VIDEOPRT, "IopInitiatePnpIrp() failed! (Status 0x%lx)\n", Status);
return FALSE;
}
@@ -1337,8 +1334,8 @@
IN PVOID Callback,
IN ULONG BugcheckDataSize)
{
- DPRINT1("VideoPortRegisterBugcheckCallback(): Unimplemented.\n");
- return NO_ERROR;
+ UNIMPLEMENTED;
+ return NO_ERROR;
}
/*
@@ -1352,7 +1349,7 @@
{
LARGE_INTEGER Result;
- DPRINT("VideoPortQueryPerformanceCounter\n");
+ TRACE_(VIDEOPRT, "VideoPortQueryPerformanceCounter\n");
Result = KeQueryPerformanceCounter((PLARGE_INTEGER)PerformanceFrequency);
return Result.QuadPart;
}
@@ -1369,7 +1366,7 @@
NTSTATUS Status;
(void)Status;
- DPRINT("VideoPortAcquireDeviceLock\n");
+ TRACE_(VIDEOPRT, "VideoPortAcquireDeviceLock\n");
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
Status = KeWaitForMutexObject(&DeviceExtension->DeviceLock, Executive,
KernelMode, FALSE, NULL);
@@ -1388,10 +1385,10 @@
LONG Status;
(void)Status;
- DPRINT("VideoPortReleaseDeviceLock\n");
+ TRACE_(VIDEOPRT, "VideoPortReleaseDeviceLock\n");
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
Status = KeReleaseMutex(&DeviceExtension->DeviceLock, FALSE);
- //ASSERT(Status == 0);
+ //ASSERT(Status == STATUS_SUCCESS);
}
/*
@@ -1403,7 +1400,7 @@
IN PDEVICE_OBJECT DeviceObject,
IN PVOID Data)
{
- DPRINT1("unimplemented VpNotifyEaData\n");
+ UNIMPLEMENTED;
}
/*
Modified: trunk/reactos/drivers/video/videoprt/videoprt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/vid…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.h (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.h Fri Dec 28 17:47:03 2007
@@ -33,21 +33,10 @@
#include <ndk/ntndk.h>
#include <reactos/helper.h>
-#define NDEBUG
#include <debug.h>
#define TAG_VIDEO_PORT TAG('V', 'I', 'D', 'P')
#define TAG_VIDEO_PORT_BUFFER TAG('V', 'p', 'm', '\0' )
-
-#define DPFLTR_IHVVIDEO_ID 80 /* FIXME */
-
-/* ROS Internal. Please deprecate */
-NTHALAPI
-VOID
-NTAPI
-HalReleaseDisplayOwnership(
- VOID
-);
typedef struct _VIDEO_PORT_ADDRESS_MAPPING
{