Author: greatlrd Date: Wed May 21 08:47:22 2008 New Revision: 33619
URL: http://svn.reactos.org/svn/reactos?rev=33619&view=rev Log: filter the higher part of DWORD for return value of VBE return value from the BIOS this will make allot ATI card working proper. thx again bear windows for the info and mail response which card need it, more info for this issue at http://www.bearwindows.boot-land.net/vbemp.htm#10
Modified: trunk/reactos/drivers/video/miniport/vbe/edid.c trunk/reactos/drivers/video/miniport/vbe/vbemp.c trunk/reactos/drivers/video/miniport/vbe/vbemp.h
Modified: trunk/reactos/drivers/video/miniport/vbe/edid.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vbe/... ============================================================================== --- trunk/reactos/drivers/video/miniport/vbe/edid.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/miniport/vbe/edid.c [iso-8859-1] Wed May 21 08:47:22 2008 @@ -125,7 +125,7 @@ VBEDeviceExtension->Int10Interface.Int10CallBios( VBEDeviceExtension->Int10Interface.Context, &BiosRegisters); - if (BiosRegisters.Eax != VBE_SUCCESS) + if (VBE_GETRETURNCODE(BiosRegisters.Eax) != VBE_SUCCESS) return FALSE; VideoPortDebugPrint(Info, "VBEMP: VBE/SCI version %x\n", BiosRegisters.Ecx); if ((BiosRegisters.Ebx & 0xF) != 0xF) @@ -141,7 +141,7 @@ VBEDeviceExtension->Int10Interface.Int10CallBios( VBEDeviceExtension->Int10Interface.Context, &BiosRegisters); - if (BiosRegisters.Eax != VBE_SUCCESS) + if (VBE_GETRETURNCODE(BiosRegisters.Eax) != VBE_SUCCESS) return FALSE;
/* @@ -198,7 +198,7 @@ VBEDeviceExtension->Int10Interface.Context, &BiosRegisters);
- if (BiosRegisters.Eax != VBE_SUCCESS) + if (VBE_GETRETURNCODE(BiosRegisters.Eax) != VBE_SUCCESS) return FALSE;
/*
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 [iso-8859-1] (original) +++ trunk/reactos/drivers/video/miniport/vbe/vbemp.c [iso-8859-1] Wed May 21 08:47:22 2008 @@ -230,7 +230,7 @@ VBEDeviceExtension->Int10Interface.Context, &BiosRegisters);
- if (BiosRegisters.Eax == VBE_SUCCESS) + if (VBE_GETRETURNCODE(BiosRegisters.Eax) == VBE_SUCCESS) { VBEDeviceExtension->Int10Interface.Int10ReadMemory( VBEDeviceExtension->Int10Interface.Context, @@ -341,7 +341,7 @@ VbeModeInfo = VBEDeviceExtension->ModeInfo + SuitableModeCount;
/* Is this mode acceptable? */ - if (BiosRegisters.Eax == VBE_SUCCESS && + if (VBE_GETRETURNCODE(BiosRegisters.Eax) == VBE_SUCCESS && VbeModeInfo->XResolution >= 640 && VbeModeInfo->YResolution >= 480 && (VbeModeInfo->MemoryModel == VBE_MEMORYMODEL_PACKEDPIXEL || @@ -626,9 +626,9 @@ VBEDeviceExtension->Int10Interface.Context, &BiosRegisters);
- if (BiosRegisters.Eax == VBE_NOT_SUPPORTED) + if ( VBE_GETRETURNCODE(BiosRegisters.Eax) == VBE_NOT_SUPPORTED) return ERROR_DEV_NOT_EXIST; - if (BiosRegisters.Eax != VBE_SUCCESS) + if (VBE_GETRETURNCODE(BiosRegisters.Eax) != VBE_SUCCESS) return ERROR_INVALID_FUNCTION;
/* @@ -644,7 +644,7 @@ VBEDeviceExtension->Int10Interface.Context, &BiosRegisters);
- if (BiosRegisters.Eax == VBE_SUCCESS) + if (VBE_GETRETURNCODE(BiosRegisters.Eax) == VBE_SUCCESS) { VideoPowerControl->DPMSVersion = BiosRegisters.Ebx & 0xFF; switch (BiosRegisters.Ebx >> 8) @@ -708,9 +708,9 @@ VBEDeviceExtension->Int10Interface.Context, &BiosRegisters);
- if (BiosRegisters.Eax == VBE_NOT_SUPPORTED) + if (VBE_GETRETURNCODE(BiosRegisters.Eax) == VBE_NOT_SUPPORTED) return ERROR_DEV_NOT_EXIST; - if (BiosRegisters.Eax != VBE_SUCCESS) + if (VBE_GETRETURNCODE(BiosRegisters.Eax) != VBE_SUCCESS) return ERROR_INVALID_FUNCTION;
return VBE_SUCCESS; @@ -742,7 +742,7 @@ DeviceExtension->Int10Interface.Context, &BiosRegisters);
- if (BiosRegisters.Eax == VBE_SUCCESS) + if (VBE_GETRETURNCODE(BiosRegisters.Eax) == VBE_SUCCESS) { DeviceExtension->CurrentMode = RequestedMode->RequestedMode; } @@ -752,7 +752,7 @@ DeviceExtension->CurrentMode = -1; }
- return BiosRegisters.Eax == VBE_SUCCESS; + return VBE_GETRETURNCODE(BiosRegisters.Eax) == VBE_SUCCESS; }
/* @@ -776,7 +776,7 @@ DeviceExtension->Int10Interface.Context, &BiosRegisters);
- return BiosRegisters.Eax == VBE_SUCCESS; + return VBE_GETRETURNCODE(BiosRegisters.Eax) == VBE_SUCCESS; }
/* @@ -1080,6 +1080,6 @@ DeviceExtension->Int10Interface.Context, &BiosRegisters);
- return BiosRegisters.Eax == VBE_SUCCESS; - } -} + return VBE_GETRETURNCODE(BiosRegisters.Eax) == VBE_SUCCESS; + } +}
Modified: trunk/reactos/drivers/video/miniport/vbe/vbemp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vbe/... ============================================================================== --- trunk/reactos/drivers/video/miniport/vbe/vbemp.h [iso-8859-1] (original) +++ trunk/reactos/drivers/video/miniport/vbe/vbemp.h [iso-8859-1] Wed May 21 08:47:22 2008 @@ -104,6 +104,8 @@ #define VBE_NOT_SUPPORTED 0x24F #define VBE_FUNCTION_INVALID 0x34F
+#define VBE_GETRETURNCODE(x) (x & 0xFFFF) + /* * VBE specification defined structure for general adapter info * returned by function VBE_GET_CONTROLLER_INFORMATION command.