Author: greatlrd
Date: Fri Jul 6 02:06:47 2007
New Revision: 27413
URL:
http://svn.reactos.org/svn/reactos?rev=27413&view=rev
Log:
Do not hack video driver, VBE driver works in windows xp
----------------------------------------------------------------
Fixed to detect few legazy bus types, fill the list for no
PnP bus type in videprt/videoprt.c functions VideoPortInitialize
Modified:
trunk/reactos/drivers/video/miniport/vbe/vbemp.c
trunk/reactos/drivers/video/miniport/vga/vgamp.c
trunk/reactos/drivers/video/miniport/xboxvmp/xboxvmp.c
trunk/reactos/drivers/video/videoprt/videoprt.c
Modified: trunk/reactos/drivers/video/miniport/vbe/vbemp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vbe…
==============================================================================
--- trunk/reactos/drivers/video/miniport/vbe/vbemp.c (original)
+++ trunk/reactos/drivers/video/miniport/vbe/vbemp.c Fri Jul 6 02:06:47 2007
@@ -37,7 +37,7 @@
VIDEO_HW_INITIALIZATION_DATA InitData;
VideoPortZeroMemory(&InitData, sizeof(InitData));
- InitData.HwInitDataSize = SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA;
+ InitData.HwInitDataSize = sizeof(VIDEO_HW_INITIALIZATION_DATA);
InitData.HwFindAdapter = VBEFindAdapter;
InitData.HwInitialize = VBEInitialize;
InitData.HwStartIO = VBEStartIO;
Modified: trunk/reactos/drivers/video/miniport/vga/vgamp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vga…
==============================================================================
--- trunk/reactos/drivers/video/miniport/vga/vgamp.c (original)
+++ trunk/reactos/drivers/video/miniport/vga/vgamp.c Fri Jul 6 02:06:47 2007
@@ -31,7 +31,7 @@
VideoPortZeroMemory(&InitData, sizeof InitData);
- InitData.HwInitDataSize = SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA;
+ InitData.HwInitDataSize = sizeof(InitData);
/* FIXME: Fill in InitData members */
InitData.StartingDeviceNumber = 0;
Modified: trunk/reactos/drivers/video/miniport/xboxvmp/xboxvmp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/xbo…
==============================================================================
--- trunk/reactos/drivers/video/miniport/xboxvmp/xboxvmp.c (original)
+++ trunk/reactos/drivers/video/miniport/xboxvmp/xboxvmp.c Fri Jul 6 02:06:47 2007
@@ -42,7 +42,7 @@
VideoPortZeroMemory(&InitData, sizeof(InitData));
InitData.AdapterInterfaceType = PCIBus;
- InitData.HwInitDataSize = SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA;
+ InitData.HwInitDataSize = sizeof(VIDEO_HW_INITIALIZATION_DATA);
InitData.HwFindAdapter = XboxVmpFindAdapter;
InitData.HwInitialize = XboxVmpInitialize;
InitData.HwStartIO = XboxVmpStartIO;
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 Jul 6 02:06:47 2007
@@ -713,6 +713,15 @@
return STATUS_UNSUCCESSFUL;
}
+ /* add no PNP bus here, add more bus type if it need it */
+ if ( (HwInitializationData->AdapterInterfaceType == 0) ||
+ (HwInitializationData->AdapterInterfaceType == -1) )
+
+ {
+ DPRINT1("No PNP Videocard .\n");
+ LegacyDetection = TRUE;
+ }
+
DriverObject->MajorFunction[IRP_MJ_CREATE] = IntVideoPortDispatchOpen;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = IntVideoPortDispatchClose;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
IntVideoPortDispatchDeviceControl;
@@ -727,6 +736,12 @@
if (LegacyDetection)
{
PDEVICE_OBJECT DeviceObject;
+
+ if (HwInitializationData->HwInitDataSize !=
SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA)
+ {
+ /* power manger */
+ DriverObject->MajorFunction[IRP_MJ_POWER] = IntVideoPortDispatchPower;
+ }
Status = IntVideoPortCreateAdapterDeviceObject(DriverObject, DriverExtension,
NULL, &DeviceObject);
DPRINT("IntVideoPortCreateAdapterDeviceObject returned 0x%x\n", Status);