diff --git a/reactos/win32ss/drivers/miniport/vga_new/modeset.c b/reactos/win32ss/drivers/miniport/vga_new/modeset.c index 691f0653edd..43aa0f837cb 100644 --- a/reactos/win32ss/drivers/miniport/vga_new/modeset.c +++ b/reactos/win32ss/drivers/miniport/vga_new/modeset.c @@ -470,7 +470,7 @@ Return Value: if (pRequestedMode->hres == 320) { - VideoPortDebugPrint(0, "ModeX not support!!!\n"); + VideoDebugPrint(0, "ModeX not support!!!\n"); return ERROR_INVALID_PARAMETER; } // eVb: 2.7 [END] @@ -481,7 +481,7 @@ Return Value: if (!(pRequestedMode->fbType & VIDEO_MODE_GRAPHICS)) { // eVb: 2.8 [TODO] - This code path is not implemented yet - VideoPortDebugPrint(0, "Text-mode not support!!!\n"); + VideoDebugPrint(0, "Text-mode not support!!!\n"); return ERROR_INVALID_PARAMETER; // eVb: 2.8 [END] } diff --git a/reactos/win32ss/drivers/miniport/vga_new/vbe.c b/reactos/win32ss/drivers/miniport/vga_new/vbe.c index 689fc9203aa..20dc9c1491c 100644 --- a/reactos/win32ss/drivers/miniport/vga_new/vbe.c +++ b/reactos/win32ss/drivers/miniport/vga_new/vbe.c @@ -44,7 +44,7 @@ IsVesaBiosOk(IN PVIDEO_PORT_INT10_INTERFACE Interface, CHAR Version[21]; /* If the broken VESA bios found, turn VESA off */ - VideoPortDebugPrint(0, "Vendor: %s Product: %s Revision: %s (%lx)\n", Vendor, Product, Revision, OemRevision); + VideoDebugPrint(0, "Vendor: %s Product: %s Revision: %s (%lx)\n", Vendor, Product, Revision, OemRevision); for (i = 0; i < (sizeof(BrokenVesaBiosList) / sizeof(PCHAR)); i++) { if (!strncmp(Product, BrokenVesaBiosList[i], strlen(BrokenVesaBiosList[i]))) return FALSE; @@ -69,7 +69,7 @@ IsVesaBiosOk(IN PVIDEO_PORT_INT10_INTERFACE Interface, } /* VESA ok */ - //VideoPortDebugPrint(0, "Vesa ok\n"); + VideoDebugPrint(0, "Vesa ok\n"); return TRUE; } @@ -153,7 +153,7 @@ VbeSetColorLookup(IN PHW_DEVICE_EXTENSION VgaExtension, Entries = ClutBuffer->NumEntries; - VideoPortDebugPrint(0, "Setting %lu entries.\n", Entries); + VideoDebugPrint(0, "Setting %lu entries.\n", Entries); /* * For Vga compatible modes, write them directly. @@ -209,7 +209,7 @@ VbeSetColorLookup(IN PHW_DEVICE_EXTENSION VgaExtension, Status = VgaExtension->Int10Interface.Int10CallBios(Context, &BiosArguments); if (Status != NO_ERROR) return ERROR_INVALID_PARAMETER; VideoPortFreePool(VgaExtension, VesaClut); - VideoPortDebugPrint(Error, "VBE Status: %lx\n", BiosArguments.Eax); + VideoDebugPrint(Error, "VBE Status: %lx\n", BiosArguments.Eax); if (VBE_GETRETURNCODE(BiosArguments.Eax) == VBE_SUCCESS) return NO_ERROR; return ERROR_INVALID_PARAMETER; diff --git a/reactos/win32ss/drivers/miniport/vga_new/vbemodes.c b/reactos/win32ss/drivers/miniport/vga_new/vbemodes.c index e3f9250a9b8..63c55bacc75 100644 --- a/reactos/win32ss/drivers/miniport/vga_new/vbemodes.c +++ b/reactos/win32ss/drivers/miniport/vga_new/vbemodes.c @@ -98,11 +98,14 @@ VbeSetMode(IN PHW_DEVICE_EXTENSION VgaDeviceExtension, ModeIndex = VgaMode->Mode; BiosArguments.Eax = VBE_SET_VBE_MODE; BiosArguments.Ebx = HIWORD(ModeIndex); - VideoPortDebugPrint(0, "Switching to %lx %lx\n", BiosArguments.Eax, BiosArguments.Ebx); + VideoDebugPrint(0, "Switching to %lx %lx\n", BiosArguments.Eax, BiosArguments.Ebx); Status = VideoPortInt10(VgaDeviceExtension, &BiosArguments); if (Status != NO_ERROR) return Status; if(VBE_GETRETURNCODE(BiosArguments.Eax) != VBE_SUCCESS) - VideoPortDebugPrint(0, "Changing VBE mode failed, Eax %lx", BiosArguments.Eax); + { + VideoDebugPrint(0, "Changing VBE mode failed, Eax %lx", BiosArguments.Eax); + return ERROR_INVALID_PARAMETER; + } /* Check for VESA mode */ if (ModeIndex >> 16) @@ -199,7 +202,7 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) } /* Add ref */ - VideoPortDebugPrint(0, "have int10 iface\n"); + VideoDebugPrint(0, "have int10 iface\n"); VgaExtension->Int10Interface.InterfaceReference(VgaExtension->Int10Interface.Context); Context = VgaExtension->Int10Interface.Context; @@ -214,7 +217,7 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) if (!VbeInfo) return; /* Init VBE data and write to card buffer */ - VideoPortDebugPrint(0, "have int10 data\n"); + VideoDebugPrint(0, "have int10 data\n"); VbeInfo->ModeArray[128] = 0xFFFF; VbeInfo->Info.Signature = VBE2_MAGIC; Status = VgaExtension->Int10Interface.Int10WriteMemory(Context, @@ -233,7 +236,7 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) if (Status != NO_ERROR) return; if(VBE_GETRETURNCODE(BiosArguments.Eax) != VBE_SUCCESS) { - VideoPortDebugPrint(0, "BiosArguments.Eax %lx\n", BiosArguments.Eax); + VideoDebugPrint(0, "BiosArguments.Eax %lx\n", BiosArguments.Eax); return; } Status = VgaExtension->Int10Interface.Int10ReadMemory(Context, @@ -244,21 +247,21 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) if (Status != NO_ERROR) return; /* Check correct VBE BIOS */ - VideoPortDebugPrint(0, "have vbe data\n"); + VideoDebugPrint(0, "have vbe data\n"); TotalMemory = VbeInfo->Info.TotalMemory << 16; VbeVersion = VbeInfo->Info.Version; - VideoPortDebugPrint(0, "vbe version %lx memory %lx\n", VbeVersion, TotalMemory); + VideoDebugPrint(0, "vbe version %lx memory %lx\n", VbeVersion, TotalMemory); if (!ValidateVbeInfo(VgaExtension, VbeInfo)) return; /* Read modes */ - VideoPortDebugPrint(0, "read modes from %p\n", VbeInfo->Info.VideoModePtr); + VideoDebugPrint(0, "read modes from %p\n", VbeInfo->Info.VideoModePtr); Status = VgaExtension->Int10Interface.Int10ReadMemory(Context, HIWORD(VbeInfo->Info.VideoModePtr), LOWORD(VbeInfo->Info.VideoModePtr), VbeInfo->ModeArray, 128 * sizeof(USHORT)); if (Status != NO_ERROR) return; - VideoPortDebugPrint(0, "Read modes at: %p\n", VbeInfo->ModeArray); + VideoDebugPrint(0, "Read modes at: %p\n", VbeInfo->ModeArray); /* Count modes, check for new 4bpp SVGA modes */ ThisMode = VbeInfo->ModeArray; @@ -266,7 +269,7 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) while (ModeResult != 0xFFFF) { Mode = ModeResult & 0x1FF; - VideoPortDebugPrint(0, "Mode found: %lx\n", Mode); + VideoDebugPrint(0, "Mode found: %lx\n", Mode); if ((Mode == 0x102) || (Mode == 0x6A)) FourBppModeFound = TRUE; ModeResult = *++ThisMode; NewModes++; @@ -284,19 +287,19 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) /* Apply fixup for Intel Brookdale */ if (g_bIntelBrookdaleBIOS) { - VideoPortDebugPrint(0, "Intel Brookdale-G Video BIOS Not Support!\n"); + VideoDebugPrint(0, "Intel Brookdale-G Video BIOS Not Support!\n"); while (TRUE); } /* Scan SVGA modes */ - VideoPortDebugPrint(0, "Static modes: %d\n", NumVideoModes); + VideoDebugPrint(0, "Static modes: %d\n", NumVideoModes); VgaMode = &VgaModeList[NumVideoModes]; ThisMode = VbeInfo->ModeArray; - VideoPortDebugPrint(0, "new modes: %d\n", NewModes); + VideoDebugPrint(0, "new modes: %d\n", NewModes); while (NewModes--) { /* Get info on mode */ - VideoPortDebugPrint(0, "Getting info of mode %lx.\n", *ThisMode); + VideoDebugPrint(0, "Getting info of mode %lx.\n", *ThisMode); VideoPortZeroMemory(&BiosArguments, sizeof(BiosArguments)); BiosArguments.Eax = VBE_GET_MODE_INFORMATION; BiosArguments.Ecx = *ThisMode; @@ -313,7 +316,7 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) if (Status != NO_ERROR) goto Next; /* Parse graphics modes only if linear framebuffer support */ - VideoPortDebugPrint(0, "attr: %lx\n", VbeModeInfo->ModeAttributes); + VideoDebugPrint(0, "attr: %lx\n", VbeModeInfo->ModeAttributes); if (!(VbeModeInfo->ModeAttributes & (VBE_MODEATTR_VALID | VBE_MODEATTR_GRAPHICS))) goto Next; LinearAddressing = ((VbeVersion >= 0x200) && @@ -322,7 +325,7 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) TRUE : FALSE; /* Check SVGA modes if 8bpp or higher */ - VideoPortDebugPrint(0, "PhysBase: %lx\n", VbeModeInfo->PhysBasePtr); + VideoDebugPrint(0, "PhysBase: %lx\n", VbeModeInfo->PhysBasePtr); if ((VbeModeInfo->XResolution >= 640) && (VbeModeInfo->YResolution >= 480) && (VbeModeInfo->NumberOfPlanes >= 1) && @@ -336,7 +339,7 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) VgaMode->Frequency = 1; VgaMode->Mode = (*ThisMode << 16) | VBE_SET_VBE_MODE; VgaMode->Granularity = VbeModeInfo->WinGranularity << 10; - VideoPortDebugPrint(0, "Mode %lx (Granularity %d)\n", VgaMode->Mode, VgaMode->Granularity); + VideoDebugPrint(0, "Mode %lx (Granularity %d)\n", VgaMode->Mode, VgaMode->Granularity); /* Set flags */ if (VbeModeInfo->ModeAttributes & VBE_MODEATTR_COLOR) VgaMode->fbType |= VIDEO_MODE_COLOR; @@ -346,12 +349,12 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) /* If no char data, say 80x25 */ VgaMode->col = VbeModeInfo->XCharSize ? VbeModeInfo->XResolution / VbeModeInfo->XCharSize : 80; VgaMode->row = VbeModeInfo->YCharSize ? VbeModeInfo->YResolution / VbeModeInfo->YCharSize : 25; - VideoPortDebugPrint(0, "%d by %d rows\n", VgaMode->col, VgaMode->row); + VideoDebugPrint(0, "%d by %d rows\n", VgaMode->col, VgaMode->row); /* Check RGB555 (15bpp only) */ VgaMode->bitsPerPlane = VbeModeInfo->BitsPerPixel / VbeModeInfo->NumberOfPlanes; if ((VgaMode->bitsPerPlane == 16) && (VbeModeInfo->GreenMaskSize == 5)) VgaMode->bitsPerPlane = 15; - VideoPortDebugPrint(0, "BPP: %d\n", VgaMode->bitsPerPlane); + VideoDebugPrint(0, "BPP: %d\n", VgaMode->bitsPerPlane); /* Do linear or banked frame buffers */ VgaMode->FrameBufferBase = 0; @@ -361,18 +364,18 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) ScreenStride = RaiseToPower2(VbeModeInfo->BytesPerScanLine); //ASSERT(ScreenStride <= MAX_USHORT); VgaMode->wbytes = (USHORT)ScreenStride; - VideoPortDebugPrint(0, "ScanLines: %lx Stride: %lx\n", VbeModeInfo->BytesPerScanLine, VgaMode->wbytes); + VideoDebugPrint(0, "ScanLines: %lx Stride: %lx\n", VbeModeInfo->BytesPerScanLine, VgaMode->wbytes); /* Size of frame buffer is Height X ScanLine, align to bank/page size */ ScreenSize = VgaMode->hres * ScreenStride; - VideoPortDebugPrint(0, "Size: %lx\n", ScreenSize); + VideoDebugPrint(0, "Size: %lx\n", ScreenSize); Size = (ScreenSize + ((64 * 1024) - 1)) & ((64 * 1024) - 1); - VideoPortDebugPrint(0, "Size: %lx\n", ScreenSize); + VideoDebugPrint(0, "Size: %lx\n", ScreenSize); if (Size > TotalMemory) Size = (Size + ((4 * 1024) - 1)) & ((4 * 1024) - 1); - VideoPortDebugPrint(0, "Size: %lx\n", ScreenSize); + VideoDebugPrint(0, "Size: %lx\n", ScreenSize); /* Banked VGA at 0xA0000 (64K) */ - VideoPortDebugPrint(0, "Final size: %lx\n", Size); + VideoDebugPrint(0, "Final size: %lx\n", Size); VgaMode->fbType |= VIDEO_MODE_BANKED; VgaMode->sbytes = Size; VgaMode->PhysSize = 64 * 1024; @@ -384,20 +387,20 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension) else { /* VBE 3.00+ has specific field, read legacy field if not */ - VideoPortDebugPrint(0, "LINEAR MODE!!!\n"); + VideoDebugPrint(0, "LINEAR MODE!!!\n"); ScreenStride = (VbeVersion >= 0x300) ? VbeModeInfo->LinBytesPerScanLine : 0; if (!ScreenStride) ScreenStride = VbeModeInfo->BytesPerScanLine; //ASSERT(ScreenStride <= MAX_USHORT); VgaMode->wbytes = (USHORT)ScreenStride; - VideoPortDebugPrint(0, "ScanLines: %lx Stride: %lx\n", VbeModeInfo->BytesPerScanLine, VgaMode->wbytes); + VideoDebugPrint(0, "ScanLines: %lx Stride: %lx\n", VbeModeInfo->BytesPerScanLine, VgaMode->wbytes); /* Size of frame buffer is Height X ScanLine, align to page size */ ScreenSize = VgaMode->hres * LOWORD(VgaMode->wbytes); - VideoPortDebugPrint(0, "Size: %lx\n", ScreenSize); + VideoDebugPrint(0, "Size: %lx\n", ScreenSize); Size = RaiseToPower2Ulong(ScreenSize); - VideoPortDebugPrint(0, "Size: %lx\n", ScreenSize); + VideoDebugPrint(0, "Size: %lx\n", ScreenSize); if (Size > TotalMemory) Size = (Size + ((4 * 1024) - 1)) & ((4 * 1024) - 1); - VideoPortDebugPrint(0, "Size: %lx\n", ScreenSize); + VideoDebugPrint(0, "Size: %lx\n", ScreenSize); /* Linear VGA must read settings from VBE */ VgaMode->fbType |= VIDEO_MODE_LINEAR; @@ -428,7 +431,7 @@ Next: } /* Check if last mode was color to do test */ - VideoPortDebugPrint(0, "mode scan complete. Total modes: %d\n", ModeCount); + VideoDebugPrint(0, "mode scan complete. Total modes: %d\n", ModeCount); if (--VgaMode->fbType & VIDEO_MODE_COLOR) { /* Try map physical buffer and free if worked */ diff --git a/reactos/win32ss/drivers/miniport/vga_new/vga.c b/reactos/win32ss/drivers/miniport/vga_new/vga.c index c333d5016b7..e35444bcb69 100644 --- a/reactos/win32ss/drivers/miniport/vga_new/vga.c +++ b/reactos/win32ss/drivers/miniport/vga_new/vga.c @@ -478,7 +478,7 @@ Return Value: return ERROR_INVALID_PARAMETER; } - VideoPortDebugPrint(0, "vga mapped at %x\n", hwDeviceExtension->VideoMemoryAddress); + VideoDebugPrint(0, "vga mapped at %x\n", hwDeviceExtension->VideoMemoryAddress); #endif // eVb: 1.7 [VDM] - Disable VDM for now ConfigInfo->VdmPhysicalVideoMemoryAddress.QuadPart = 0; @@ -1508,7 +1508,7 @@ Return Value: --*/ { - VideoPortDebugPrint(Error, "Detected internal VGA chip on embedded board, todo\n"); + VideoDebugPrint(Error, "Detected internal VGA chip on embedded board, todo\n"); while (TRUE); return NO_ERROR;