Merge remote-tracking branch 'remotes/qxl-wddm-next/work'

Conflicts:
	qxldod/BaseObject.cpp
	qxldod/QxlDod.cpp
	qxldod/QxlDod.h
	qxldod/callVisualStudio.bat
	qxldod/checkWin8Tools.bat
	qxldod/driver.cpp
	qxldod/driver.h
	qxldod/getVisualStudioCmdLine.vbs
	qxldod/qxldod.vcxproj
	qxldod/qxldod.vcxproj.filters
This commit is contained in:
Vadim Rozenfeld 2015-04-10 15:30:05 +10:00
commit 89e4d5dd6f
12 changed files with 379 additions and 327 deletions

0
README Normal file
View File

View File

@ -18,13 +18,14 @@ void* __cdecl operator new(size_t Size, POOL_TYPE PoolType)
void* pObject = ExAllocatePoolWithTag(PoolType, Size, QXLTAG);
#if DBG
if (pObject != NULL)
{
#if DBG
RtlFillMemory(pObject, Size, 0xCD);
}
#else
RtlZeroMemory(pObject, Size);
#endif // DBG
}
return pObject;
}
@ -39,13 +40,14 @@ void* __cdecl operator new[](size_t Size, POOL_TYPE PoolType)
void* pObject = ExAllocatePoolWithTag(PoolType, Size, QXLTAG);
#if DBG
if (pObject != NULL)
{
#if DBG
RtlFillMemory(pObject, Size, 0xCD);
}
#else
RtlZeroMemory(pObject, Size);
#endif // DBG
}
return pObject;
}

View File

@ -64,11 +64,9 @@ QxlDod::QxlDod(_In_ DEVICE_OBJECT* pPhysicalDeviceObject) : m_pPhysicalDevice(pP
QxlDod::~QxlDod(void)
{
PAGED_CODE();
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
CleanUp();
delete m_pHWDevice;
m_pHWDevice = NULL;
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
}
NTSTATUS QxlDod::CheckHardware()
@ -99,8 +97,7 @@ NTSTATUS QxlDod::CheckHardware()
Status = STATUS_GRAPHICS_DRIVER_MISMATCH;
if (Header.VendorID == REDHAT_PCI_VENDOR_ID &&
Header.DeviceID == 0x0100 &&
Header.RevisionID == 4 &&
m_VgaCompatible == 0)
Header.RevisionID == 4)
{
Status = STATUS_SUCCESS;
}
@ -114,8 +111,8 @@ NTSTATUS QxlDod::StartDevice(_In_ DXGK_START_INFO* pDxgkStartInfo,
_Out_ ULONG* pNumberOfViews,
_Out_ ULONG* pNumberOfChildren)
{
PHYSICAL_ADDRESS PhysicAddress;
PAGED_CODE();
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s\n", __FUNCTION__));
QXL_ASSERT(pDxgkStartInfo != NULL);
QXL_ASSERT(pDxgkInterface != NULL);
QXL_ASSERT(pNumberOfViews != NULL);
@ -137,11 +134,18 @@ NTSTATUS QxlDod::StartDevice(_In_ DXGK_START_INFO* pDxgkStartInfo,
Status = CheckHardware();
if (NT_SUCCESS(Status))
{
m_pHWDevice = new(PagedPool) QxlDevice(this);
m_pHWDevice = new(NonPagedPoolNx) QxlDevice(this);
}
else
{
m_pHWDevice = new(PagedPool) VgaDevice(this);
m_pHWDevice = new(NonPagedPoolNx) VgaDevice(this);
}
if (!m_pHWDevice)
{
Status = STATUS_NO_MEMORY;
DbgPrint(TRACE_LEVEL_ERROR, ("HWInit failed to allocate memory\n"));
return Status;
}
Status = m_pHWDevice->HWInit(m_DeviceInfo.TranslatedResourceList, &m_CurrentModes[0].DispInfo);
@ -159,6 +163,7 @@ NTSTATUS QxlDod::StartDevice(_In_ DXGK_START_INFO* pDxgkStartInfo,
return Status;
}
PhysicAddress.QuadPart = m_CurrentModes[0].DispInfo.PhysicAddress.QuadPart;
if (m_pHWDevice->GetId() == 0)
{
Status = m_DxgkInterface.DxgkCbAcquirePostDisplayOwnership(m_DxgkInterface.DeviceHandle, &(m_CurrentModes[0].DispInfo));
@ -178,6 +183,10 @@ NTSTATUS QxlDod::StartDevice(_In_ DXGK_START_INFO* pDxgkStartInfo,
m_CurrentModes[0].DispInfo.Pitch = BPPFromPixelFormat(D3DDDIFMT_R8G8B8) / 8;
m_CurrentModes[0].DispInfo.ColorFormat = D3DDDIFMT_R8G8B8;
m_CurrentModes[0].DispInfo.TargetId = 0;
if (PhysicAddress.QuadPart != 0L) {
m_CurrentModes[0].DispInfo.PhysicAddress.QuadPart = PhysicAddress.QuadPart;
}
}
*pNumberOfViews = MAX_VIEWS;
@ -190,16 +199,13 @@ NTSTATUS QxlDod::StartDevice(_In_ DXGK_START_INFO* pDxgkStartInfo,
NTSTATUS QxlDod::StopDevice(VOID)
{
PAGED_CODE();
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s\n", __FUNCTION__));
m_Flags.DriverStarted = FALSE;
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
return STATUS_SUCCESS;
}
VOID QxlDod::CleanUp(VOID)
{
PAGED_CODE();
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
for (UINT Source = 0; Source < MAX_VIEWS; ++Source)
{
if (m_CurrentModes[Source].FrameBuffer.Ptr)
@ -402,19 +408,15 @@ NTSTATUS QxlDod::QueryAdapterInfo(_In_ CONST DXGKARG_QUERYADAPTERINFO* pQueryAda
}
DXGK_DRIVERCAPS* pDriverCaps = (DXGK_DRIVERCAPS*)pQueryAdapterInfo->pOutputData;
RtlZeroMemory(pDriverCaps, pQueryAdapterInfo->OutputDataSize/*sizeof(DXGK_DRIVERCAPS)*/);
pDriverCaps->WDDMVersion = DXGKDDI_WDDMv1_2;
pDriverCaps->HighestAcceptableAddress.QuadPart = -1;
pDriverCaps->SupportNonVGA = TRUE;
if (m_pHWDevice->EnablePointer() && m_PointerCaps) {
if (m_pHWDevice->EnablePointer()) {
pDriverCaps->MaxPointerWidth = POINTER_SIZE;
pDriverCaps->MaxPointerHeight = POINTER_SIZE;
pDriverCaps->PointerCaps.Monochrome = m_PointerCaps & 0x00000001;
pDriverCaps->PointerCaps.Color = m_PointerCaps & 0x00000002;
pDriverCaps->PointerCaps.MaskedColor = m_PointerCaps & 0x00000004;
pDriverCaps->PointerCaps.Monochrome = 1;
pDriverCaps->PointerCaps.Color = 1;
}
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s 1\n", __FUNCTION__));
return STATUS_SUCCESS;
@ -552,7 +554,7 @@ NTSTATUS QxlDod::QueryInterface(_In_ CONST PQUERY_INTERFACE pQueryInterface)
DbgPrint(TRACE_LEVEL_VERBOSE, ("<---> %s Version = %d\n", __FUNCTION__, pQueryInterface->Version));
return STATUS_NOT_IMPLEMENTED;
return STATUS_NOT_SUPPORTED;
}
NTSTATUS QxlDod::StopDeviceAndReleasePostDisplayOwnership(_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID TargetId,
@ -738,7 +740,7 @@ NTSTATUS QxlDod::AddSingleSourceMode(_In_ CONST DXGK_VIDPNSOURCEMODESET_INTERFAC
if (Status != STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET)
{
DbgPrint(TRACE_LEVEL_ERROR, ("pfnAddMode failed with Status = 0x%X, hVidPnSourceModeSet = 0x%I64x, pVidPnSourceModeInfo = 0x%I64x", Status, hVidPnSourceModeSet, pVidPnSourceModeInfo));
DbgPrint(TRACE_LEVEL_ERROR, ("pfnAddMode failed with Status = 0x%X, hVidPnSourceModeSet = 0x%I64x, pVidPnSourceModeInfo = %p", Status, hVidPnSourceModeSet, pVidPnSourceModeInfo));
return Status;
}
}
@ -760,7 +762,6 @@ NTSTATUS QxlDod::AddSingleTargetMode(_In_ CONST DXGK_VIDPNTARGETMODESET_INTERFAC
D3DKMDT_VIDPN_TARGET_MODE* pVidPnTargetModeInfo = NULL;
NTSTATUS Status = STATUS_SUCCESS;
//FIXME !!!!!!
for (UINT ModeIndex = 0; ModeIndex < m_pHWDevice->GetModeCount(); ++ModeIndex)
{
PVIDEO_MODE_INFORMATION pModeInfo = m_pHWDevice->GetModeInfo(SourceId);
@ -769,7 +770,7 @@ NTSTATUS QxlDod::AddSingleTargetMode(_In_ CONST DXGK_VIDPNTARGETMODESET_INTERFAC
if (!NT_SUCCESS(Status))
{
// If failed to create a new mode info, mode doesn't need to be released since it was never created
DbgPrint(TRACE_LEVEL_ERROR, ("pfnCreateNewModeInfo failed with Status = 0x%I64x, hVidPnTargetModeSet = 0x%I64x", Status, hVidPnTargetModeSet));
DbgPrint(TRACE_LEVEL_ERROR, ("pfnCreateNewModeInfo failed with Status = 0x%X, hVidPnTargetModeSet = 0x%I64x", Status, hVidPnTargetModeSet));
return Status;
}
pVidPnTargetModeInfo->VideoSignalInfo.VideoStandard = D3DKMDT_VSS_OTHER;
@ -790,7 +791,7 @@ NTSTATUS QxlDod::AddSingleTargetMode(_In_ CONST DXGK_VIDPNTARGETMODESET_INTERFAC
{
if (Status != STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET)
{
DbgPrint(TRACE_LEVEL_ERROR, ("pfnAddMode failed with Status = 0x%I64x, hVidPnTargetModeSet = 0x%I64x, pVidPnTargetModeInfo = 0x%I64x", Status, hVidPnTargetModeSet, pVidPnTargetModeInfo));
DbgPrint(TRACE_LEVEL_ERROR, ("pfnAddMode failed with Status = 0x%X, hVidPnTargetModeSet = 0x%I64x, pVidPnTargetModeInfo = %p", Status, hVidPnTargetModeSet, pVidPnTargetModeInfo));
}
// If adding the mode failed, release the mode, if this doesn't work there is nothing that can be done, some memory will get leaked
@ -874,7 +875,7 @@ NTSTATUS QxlDod::AddSingleMonitorMode(_In_ CONST DXGKARG_RECOMMENDMONITORMODES*
if (!NT_SUCCESS(Status))
{
// If failed to create a new mode info, mode doesn't need to be released since it was never created
DbgPrint(TRACE_LEVEL_ERROR, ("pfnCreateNewModeInfo failed with Status = 0x%I64x, hMonitorSourceModeSet = 0x%I64x", Status, pRecommendMonitorModes->hMonitorSourceModeSet));
DbgPrint(TRACE_LEVEL_ERROR, ("pfnCreateNewModeInfo failed with Status = 0x%X, hMonitorSourceModeSet = 0x%I64x", Status, pRecommendMonitorModes->hMonitorSourceModeSet));
return Status;
}
@ -892,11 +893,11 @@ NTSTATUS QxlDod::AddSingleMonitorMode(_In_ CONST DXGKARG_RECOMMENDMONITORMODES*
pMonitorSourceMode->VideoSignalInfo.HSyncFreq.Numerator = D3DKMDT_FREQUENCY_NOTSPECIFIED;
pMonitorSourceMode->VideoSignalInfo.HSyncFreq.Denominator = D3DKMDT_FREQUENCY_NOTSPECIFIED;
pMonitorSourceMode->VideoSignalInfo.PixelRate = D3DKMDT_FREQUENCY_NOTSPECIFIED;
pMonitorSourceMode->VideoSignalInfo.ScanLineOrdering = D3DDDI_VSSLO_PROGRESSIVE; //???
pMonitorSourceMode->VideoSignalInfo.ScanLineOrdering = D3DDDI_VSSLO_PROGRESSIVE;
pMonitorSourceMode->Origin = D3DKMDT_MCO_DRIVER; // ????
pMonitorSourceMode->Preference = D3DKMDT_MP_NOTPREFERRED; // TODO...
pMonitorSourceMode->ColorBasis = D3DKMDT_CB_SRGB; // ????
pMonitorSourceMode->Origin = D3DKMDT_MCO_DRIVER;
pMonitorSourceMode->Preference = D3DKMDT_MP_NOTPREFERRED;
pMonitorSourceMode->ColorBasis = D3DKMDT_CB_SRGB;
pMonitorSourceMode->ColorCoeffDynamicRanges.FirstChannel = 8;
pMonitorSourceMode->ColorCoeffDynamicRanges.SecondChannel = 8;
pMonitorSourceMode->ColorCoeffDynamicRanges.ThirdChannel = 8;
@ -907,7 +908,7 @@ NTSTATUS QxlDod::AddSingleMonitorMode(_In_ CONST DXGKARG_RECOMMENDMONITORMODES*
{
if (Status != STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET)
{
DbgPrint(TRACE_LEVEL_ERROR, ("pfnAddMode failed with Status = 0x%I64x, hMonitorSourceModeSet = 0x%I64x, pMonitorSourceMode = 0x%I64x",
DbgPrint(TRACE_LEVEL_ERROR, ("pfnAddMode failed with Status = 0x%X, hMonitorSourceModeSet = 0x%I64x, pMonitorSourceMode = 0x%p",
Status, pRecommendMonitorModes->hMonitorSourceModeSet, pMonitorSourceMode));
}
@ -937,7 +938,7 @@ NTSTATUS QxlDod::EnumVidPnCofuncModality(_In_ CONST DXGKARG_ENUMVIDPNCOFUNCMODAL
CONST DXGK_VIDPNSOURCEMODESET_INTERFACE* pVidPnSourceModeSetInterface = NULL;
CONST DXGK_VIDPNTARGETMODESET_INTERFACE* pVidPnTargetModeSetInterface = NULL;
CONST D3DKMDT_VIDPN_PRESENT_PATH* pVidPnPresentPath = NULL;
CONST D3DKMDT_VIDPN_PRESENT_PATH* pVidPnPresentPathTemp = NULL; // Used for AcquireNextPathInfo
CONST D3DKMDT_VIDPN_PRESENT_PATH* pVidPnPresentPathTemp = NULL;
CONST D3DKMDT_VIDPN_SOURCE_MODE* pVidPnPinnedSourceModeInfo = NULL;
CONST D3DKMDT_VIDPN_TARGET_MODE* pVidPnPinnedTargetModeInfo = NULL;
@ -1112,7 +1113,7 @@ NTSTATUS QxlDod::EnumVidPnCofuncModality(_In_ CONST DXGKARG_ENUMVIDPNCOFUNCMODAL
Status = pVidPnTargetModeSetInterface->pfnReleaseModeInfo(hVidPnTargetModeSet, pVidPnPinnedTargetModeInfo);
if (!NT_SUCCESS(Status))
{
DbgPrint(TRACE_LEVEL_ERROR, ("pfnReleaseModeInfo failed with Status = 0x%X, hVidPnTargetModeSet = 0x%I64x, pVidPnPinnedTargetModeInfo = 0x%I64x",
DbgPrint(TRACE_LEVEL_ERROR, ("pfnReleaseModeInfo failed with Status = 0x%X, hVidPnTargetModeSet = 0x%I64x, pVidPnPinnedTargetModeInfo = %p",
Status, hVidPnTargetModeSet, pVidPnPinnedTargetModeInfo));
break;
}
@ -1136,7 +1137,7 @@ NTSTATUS QxlDod::EnumVidPnCofuncModality(_In_ CONST DXGKARG_ENUMVIDPNCOFUNCMODAL
Status = pVidPnSourceModeSetInterface->pfnReleaseModeInfo(hVidPnSourceModeSet, pVidPnPinnedSourceModeInfo);
if (!NT_SUCCESS(Status))
{
DbgPrint(TRACE_LEVEL_ERROR, ("pfnReleaseModeInfo failed with Status = 0x%X, hVidPnSourceModeSet = 0x%I64x, pVidPnPinnedSourceModeInfo = 0x%I64x",
DbgPrint(TRACE_LEVEL_ERROR, ("pfnReleaseModeInfo failed with Status = 0x%X, hVidPnSourceModeSet = 0x%I64x, pVidPnPinnedSourceModeInfo = %p",
Status, hVidPnSourceModeSet, pVidPnPinnedSourceModeInfo));
break;
}
@ -1210,7 +1211,7 @@ NTSTATUS QxlDod::EnumVidPnCofuncModality(_In_ CONST DXGKARG_ENUMVIDPNCOFUNCMODAL
Status = pVidPnTopologyInterface->pfnAcquireNextPathInfo(hVidPnTopology, pVidPnPresentPathTemp, &pVidPnPresentPath);
if (!NT_SUCCESS(Status))
{
DbgPrint(TRACE_LEVEL_ERROR, ("pfnAcquireNextPathInfo failed with Status = 0x%X, hVidPnTopology = 0x%I64x, pVidPnPresentPathTemp = 0x%I64x", Status, hVidPnTopology, pVidPnPresentPathTemp));
DbgPrint(TRACE_LEVEL_ERROR, ("pfnAcquireNextPathInfo failed with Status = 0x%X, hVidPnTopology = 0x%I64x, pVidPnPresentPathTemp = %p", Status, hVidPnTopology, pVidPnPresentPathTemp));
break;
}
@ -1218,7 +1219,7 @@ NTSTATUS QxlDod::EnumVidPnCofuncModality(_In_ CONST DXGKARG_ENUMVIDPNCOFUNCMODAL
NTSTATUS TempStatus = pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pVidPnPresentPathTemp);
if (!NT_SUCCESS(TempStatus))
{
DbgPrint(TRACE_LEVEL_ERROR, ("pfnReleasePathInfo failed with Status = 0x%X, hVidPnTopology = 0x%I64x, pVidPnPresentPathTemp = 0x%I64x", TempStatus, hVidPnTopology, pVidPnPresentPathTemp));
DbgPrint(TRACE_LEVEL_ERROR, ("pfnReleasePathInfo failed with Status = 0x%X, hVidPnTopology = 0x%I64x, pVidPnPresentPathTemp = %p", TempStatus, hVidPnTopology, pVidPnPresentPathTemp));
Status = TempStatus;
break;
}
@ -1283,7 +1284,7 @@ NTSTATUS QxlDod::EnumVidPnCofuncModality(_In_ CONST DXGKARG_ENUMVIDPNCOFUNCMODAL
NTSTATUS QxlDod::SetVidPnSourceVisibility(_In_ CONST DXGKARG_SETVIDPNSOURCEVISIBILITY* pSetVidPnSourceVisibility)
{
PAGED_CODE();
// DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
QXL_ASSERT(pSetVidPnSourceVisibility != NULL);
QXL_ASSERT((pSetVidPnSourceVisibility->VidPnSourceId < MAX_VIEWS) ||
(pSetVidPnSourceVisibility->VidPnSourceId == D3DDDI_ID_ALL));
@ -1306,7 +1307,7 @@ NTSTATUS QxlDod::SetVidPnSourceVisibility(_In_ CONST DXGKARG_SETVIDPNSOURCEVISIB
m_CurrentModes[SourceId].Flags.SourceNotVisible = !(pSetVidPnSourceVisibility->Visible);
}
// DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
return STATUS_SUCCESS;
}
@ -1461,7 +1462,7 @@ NTSTATUS QxlDod::CommitVidPn(_In_ CONST DXGKARG_COMMITVIDPN* CONST pCommitVidPn)
Status = pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pVidPnPresentPath);
if (!NT_SUCCESS(Status))
{
DbgPrint(TRACE_LEVEL_ERROR, ("pfnReleasePathInfo failed with Status = 0x%X, hVidPnTopoogy = 0x%I64x, pVidPnPresentPath = 0x%I64x",
DbgPrint(TRACE_LEVEL_ERROR, ("pfnReleasePathInfo failed with Status = 0x%X, hVidPnTopoogy = 0x%I64x, pVidPnPresentPath = %p",
Status, hVidPnTopology, pVidPnPresentPath));
goto CommitVidPnExit;
}
@ -1505,7 +1506,6 @@ NTSTATUS QxlDod::SetSourceModeAndPath(CONST D3DKMDT_VIDPN_SOURCE_MODE* pSourceMo
CONST D3DKMDT_VIDPN_PRESENT_PATH* pPath)
{
PAGED_CODE();
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s SourceId = %d\n", __FUNCTION__, pPath->VidPnSourceId));
NTSTATUS Status = STATUS_SUCCESS;
@ -1541,8 +1541,6 @@ NTSTATUS QxlDod::SetSourceModeAndPath(CONST D3DKMDT_VIDPN_SOURCE_MODE* pSourceMo
for (USHORT ModeIndex = 0; ModeIndex < m_pHWDevice->GetModeCount(); ++ModeIndex)
{
PVIDEO_MODE_INFORMATION pModeInfo = m_pHWDevice->GetModeInfo(ModeIndex);
DbgPrint(TRACE_LEVEL_INFORMATION, ("%d\t%d x %d\t%d x %d\n", ModeIndex, pCurrentBddMode->DispInfo.Width, pCurrentBddMode->DispInfo.Height,
pModeInfo->VisScreenWidth, pModeInfo->VisScreenHeight));
if (pCurrentBddMode->DispInfo.Width == pModeInfo->VisScreenWidth &&
pCurrentBddMode->DispInfo.Height == pModeInfo->VisScreenHeight )
{
@ -1556,7 +1554,6 @@ NTSTATUS QxlDod::SetSourceModeAndPath(CONST D3DKMDT_VIDPN_SOURCE_MODE* pSourceMo
}
}
DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s\n", __FUNCTION__));
return Status;
}
@ -1785,7 +1782,7 @@ VOID QxlDod::SystemDisplayWrite(_In_reads_bytes_(SourceHeight * SourceStride) VO
BltBits(&DstBltInfo,
&SrcBltInfo,
1, // NumRects
1,
&Rect);
}
@ -1842,7 +1839,6 @@ NTSTATUS QxlDod::RegisterHWInfo(ULONG Id)
NTSTATUS Status;
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
// TODO: Replace these strings with proper information
PCSTR StrHWInfoChipType = "QEMU QXL";
PCSTR StrHWInfoDacType = "QXL 1B36";
PCSTR StrHWInfoAdapterString = "QXL";
@ -1852,7 +1848,7 @@ NTSTATUS QxlDod::RegisterHWInfo(ULONG Id)
Status = IoOpenDeviceRegistryKey(m_pPhysicalDevice, PLUGPLAY_REGKEY_DRIVER, KEY_SET_VALUE, &DevInstRegKeyHandle);
if (!NT_SUCCESS(Status))
{
DbgPrint(TRACE_LEVEL_ERROR, ("IoOpenDeviceRegistryKey failed for PDO: 0x%I64x, Status: 0x%I64x", m_pPhysicalDevice, Status));
DbgPrint(TRACE_LEVEL_ERROR, ("IoOpenDeviceRegistryKey failed for PDO: 0x%I64x, Status: 0x%X", m_pPhysicalDevice, Status));
return Status;
}
@ -2006,7 +2002,7 @@ MapFrameBuffer(
(Length == 0) ||
(VirtualAddress == NULL))
{
DbgPrint(TRACE_LEVEL_ERROR, ("One of PhysicalAddress.QuadPart (0x%I64x), Length (0x%I64x), VirtualAddress (0x%I64x) is NULL or 0",
DbgPrint(TRACE_LEVEL_ERROR, ("One of PhysicalAddress.QuadPart (0x%I64x), Length (%lu), VirtualAddress (%p) is NULL or 0\n",
PhysicalAddress.QuadPart, Length, VirtualAddress));
return STATUS_INVALID_PARAMETER;
}
@ -2024,7 +2020,7 @@ MapFrameBuffer(
MmNonCached);
if (*VirtualAddress == NULL)
{
DbgPrint(TRACE_LEVEL_ERROR, ("MmMapIoSpace returned a NULL buffer when trying to allocate 0x%I64x bytes", Length));
DbgPrint(TRACE_LEVEL_ERROR, ("MmMapIoSpace returned a NULL buffer when trying to allocate %lu bytes", Length));
return STATUS_NO_MEMORY;
}
}
@ -2050,7 +2046,7 @@ UnmapFrameBuffer(
}
else if ((VirtualAddress == NULL) || (Length == 0))
{
DbgPrint(TRACE_LEVEL_ERROR, ("Only one of Length (0x%I64x), VirtualAddress (0x%I64x) is NULL or 0",
DbgPrint(TRACE_LEVEL_ERROR, ("Only one of Length (%lu), VirtualAddress (%p) is NULL or 0",
Length, VirtualAddress));
return STATUS_INVALID_PARAMETER;
}
@ -2346,6 +2342,7 @@ VgaDevice::VgaDevice(_In_ QxlDod* pQxlDod)
VgaDevice::~VgaDevice(void)
{
HWClose();
delete [] reinterpret_cast<BYTE*>(m_ModeInfo);
delete [] reinterpret_cast<BYTE*>(m_ModeNumbers);
m_ModeInfo = NULL;
@ -2362,7 +2359,7 @@ BOOL VgaDevice::SetVideoModeInfo(UINT Idx, PVBE_MODEINFO pModeInfo)
pMode = &m_ModeInfo[Idx];
pMode->Length = sizeof(VIDEO_MODE_INFORMATION);
pMode->ModeIndex = Idx;//m_ModeNumbers[Idx];
pMode->ModeIndex = Idx;
pMode->VisScreenWidth = pModeInfo->XResolution;
pMode->VisScreenHeight = pModeInfo->YResolution;
pMode->ScreenStride = pModeInfo->LinBytesPerScanLine;
@ -2409,7 +2406,6 @@ NTSTATUS VgaDevice::GetModeList(DXGK_DISPLAY_INFORMATION* pDispInfo)
UINT BitsPerPixel = BPPFromPixelFormat(pDispInfo->ColorFormat);
NTSTATUS Status = STATUS_SUCCESS;
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
//Get VBE Mode List
Length = 0x400;
Status = x86BiosAllocateBuffer (&Length, &m_Segment, &m_Offset);
if (!NT_SUCCESS (Status))
@ -2478,8 +2474,29 @@ NTSTATUS VgaDevice::GetModeList(DXGK_DISPLAY_INFORMATION* pDispInfo)
DbgPrint(TRACE_LEVEL_INFORMATION, ("ModeCount %d\n", ModeCount));
delete [] reinterpret_cast<BYTE*>(m_ModeInfo);
delete [] reinterpret_cast<BYTE*>(m_ModeNumbers);
m_ModeInfo = NULL;
m_ModeNumbers = NULL;
m_ModeInfo = reinterpret_cast<PVIDEO_MODE_INFORMATION> (new (PagedPool) BYTE[sizeof (VIDEO_MODE_INFORMATION) * ModeCount]);
if (!m_ModeInfo)
{
Status = STATUS_NO_MEMORY;
DbgPrint(TRACE_LEVEL_ERROR, ("VgaDevice::GetModeList failed to allocate m_ModeInfo memory\n"));
return Status;
}
RtlZeroMemory(m_ModeInfo, sizeof (VIDEO_MODE_INFORMATION) * ModeCount);
m_ModeNumbers = reinterpret_cast<PUSHORT> (new (PagedPool) BYTE [sizeof (USHORT) * ModeCount]);
if (!m_ModeNumbers)
{
Status = STATUS_NO_MEMORY;
DbgPrint(TRACE_LEVEL_ERROR, ("VgaDevice::GetModeList failed to allocate m_ModeNumbers memory\n"));
return Status;
}
RtlZeroMemory(m_ModeNumbers, sizeof (USHORT) * ModeCount);
m_CurrentMode = 0;
DbgPrint(TRACE_LEVEL_INFORMATION, ("m_ModeInfo = 0x%p, m_ModeNumbers = 0x%p\n", m_ModeInfo, m_ModeNumbers));
if (Width == 0 || Height == 0 || BitsPerPixel != VGA_BPP)
@ -2569,7 +2586,6 @@ NTSTATUS VgaDevice::QueryCurrentMode(PVIDEO_MODE RequestedMode)
NTSTATUS Status = STATUS_SUCCESS;
UNREFERENCED_PARAMETER(RequestedMode);
// PVBE_MODEINFO VBEMode = &m_ModeInfo[m_CurrentMode];
return Status;
}
@ -2706,7 +2722,6 @@ VgaDevice::ExecutePresentDisplayOnly(
RtlZeroMemory(ctx,size);
// const CURRENT_BDD_MODE* pModeCur = &m_CurrentModes[0];
ctx->DstAddr = DstAddr;
ctx->DstBitPerPixel = DstBitPerPixel;
ctx->DstStride = pModeCur->DispInfo.Pitch;
@ -2719,8 +2734,6 @@ VgaDevice::ExecutePresentDisplayOnly(
ctx->Moves = Moves;
ctx->NumDirtyRects = NumDirtyRects;
ctx->DirtyRect = DirtyRect;
// ctx->SourceID = m_SourceId;
// ctx->hAdapter = m_DevExt;
ctx->Mdl = NULL;
ctx->DisplaySource = this;
@ -2787,10 +2800,6 @@ VgaDevice::ExecutePresentDisplayOnly(
ctx->DirtyRect = reinterpret_cast<RECT*>(rects);
}
// HwExecutePresentDisplayOnly((PVOID)ctx);
// Set up destination blt info
BLT_INFO DstBltInfo;
DstBltInfo.pBits = ctx->DstAddr;
@ -2826,12 +2835,7 @@ VgaDevice::ExecutePresentDisplayOnly(
// Copy all the scroll rects from source image to video frame buffer.
for (UINT i = 0; i < ctx->NumMoves; i++)
{
// POINT* pSourcePoint = &ctx->Moves[i].SourcePoint;
RECT* pDestRect = &ctx->Moves[i].DestRect;
// DbgPrint(TRACE_LEVEL_FATAL, ("--- %d SourcePoint.x = %ld, SourcePoint.y = %ld, DestRect.bottom = %ld, DestRect.left = %ld, DestRect.right = %ld, DestRect.top = %ld\n",
// i , pSourcePoint->x, pSourcePoint->y, pDestRect->bottom, pDestRect->left, pDestRect->right, pDestRect->top));
BltBits(&DstBltInfo,
&SrcBltInfo,
1, // NumRects
@ -2842,9 +2846,6 @@ VgaDevice::ExecutePresentDisplayOnly(
for (UINT i = 0; i < ctx->NumDirtyRects; i++)
{
RECT* pDirtyRect = &ctx->DirtyRect[i];
// DbgPrint(TRACE_LEVEL_FATAL, ("--- %d pDirtyRect->bottom = %ld, pDirtyRect->left = %ld, pDirtyRect->right = %ld, pDirtyRect->top = %ld\n",
// i, pDirtyRect->bottom, pDirtyRect->left, pDirtyRect->right, pDirtyRect->top));
BltBits(&DstBltInfo,
&SrcBltInfo,
1, // NumRects
@ -2960,6 +2961,7 @@ QxlDevice::QxlDevice(_In_ QxlDod* pQxlDod)
QxlDevice::~QxlDevice(void)
{
HWClose();
delete [] reinterpret_cast<BYTE*>(m_ModeInfo);
delete [] reinterpret_cast<BYTE*>(m_ModeNumbers);
m_ModeInfo = NULL;
@ -2976,7 +2978,7 @@ BOOL QxlDevice::SetVideoModeInfo(UINT Idx, QXLMode* pModeInfo)
pMode = &m_ModeInfo[Idx];
pMode->Length = sizeof(VIDEO_MODE_INFORMATION);
pMode->ModeIndex = Idx;//m_ModeNumbers[Idx];
pMode->ModeIndex = Idx;
pMode->VisScreenWidth = pModeInfo->x_res;
pMode->VisScreenHeight = pModeInfo->y_res;
pMode->ScreenStride = pModeInfo->stride;
@ -3041,11 +3043,30 @@ NTSTATUS QxlDevice::GetModeList(DXGK_DISPLAY_INFORMATION* pDispInfo)
return STATUS_UNSUCCESSFUL;
}
DbgPrint(TRACE_LEVEL_INFORMATION, ("%s: ModeCount = %d\n", __FUNCTION__, ModeCount));
delete [] reinterpret_cast<BYTE*>(m_ModeInfo);
delete [] reinterpret_cast<BYTE*>(m_ModeNumbers);
m_ModeInfo = NULL;
m_ModeNumbers = NULL;
ModeCount += 2;
m_ModeInfo = reinterpret_cast<PVIDEO_MODE_INFORMATION> (new (PagedPool) BYTE[sizeof (VIDEO_MODE_INFORMATION) * ModeCount]);
if (!m_ModeInfo)
{
Status = STATUS_NO_MEMORY;
DbgPrint(TRACE_LEVEL_ERROR, ("QxlDevice::GetModeList failed to allocate m_ModeInfo memory\n"));
return Status;
}
RtlZeroMemory(m_ModeInfo, sizeof (VIDEO_MODE_INFORMATION) * ModeCount);
m_ModeNumbers = reinterpret_cast<PUSHORT> (new (PagedPool) BYTE [sizeof (USHORT) * ModeCount]);
if (!m_ModeNumbers)
{
Status = STATUS_NO_MEMORY;
DbgPrint(TRACE_LEVEL_ERROR, ("QxlDevice::GetModeList failed to allocate m_ModeNumbers memory\n"));
return Status;
}
RtlZeroMemory(m_ModeNumbers, sizeof (USHORT) * ModeCount);
m_CurrentMode = 0;
UINT Height = pDispInfo->Height;
@ -3071,7 +3092,7 @@ NTSTATUS QxlDevice::GetModeList(DXGK_DISPLAY_INFORMATION* pDispInfo)
tmpModeInfo->y_res >= Height &&
tmpModeInfo->bits == QXL_BPP)
{
m_ModeNumbers[SuitableModeCount] = SuitableModeCount;//CurrentMode;
m_ModeNumbers[SuitableModeCount] = SuitableModeCount;
SetVideoModeInfo(SuitableModeCount, tmpModeInfo);
if (tmpModeInfo->x_res == MIN_WIDTH_SIZE &&
tmpModeInfo->y_res == MIN_HEIGHT_SIZE)
@ -3121,7 +3142,7 @@ NTSTATUS QxlDevice::QueryCurrentMode(PVIDEO_MODE RequestedMode)
NTSTATUS QxlDevice::SetCurrentMode(ULONG Mode)
{
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s Mode = %x\n", __FUNCTION__, Mode));
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s Mode = %x\n", __FUNCTION__, Mode));
for (ULONG idx = 0; idx < GetModeCount(); idx++)
{
if (Mode == m_ModeNumbers[idx])
@ -3162,7 +3183,6 @@ NTSTATUS QxlDevice::SetPowerState(_In_ DEVICE_POWER_STATE DevicePowerState, DXGK
NTSTATUS QxlDevice::HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION* pDispInfo)
{
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
// NTSTATUS Status = STATUS_SUCCESS;
PDXGKRNL_INTERFACE pDxgkInterface = m_pQxlDod->GetDxgkInterrface();
UINT pci_range = QXL_RAM_RANGE_INDEX;
for (ULONG i = 0; i < pResList->Count; ++i)
@ -3178,7 +3198,7 @@ NTSTATUS QxlDevice::HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION*
PVOID IoBase = NULL;
ULONG IoLength = pResDescriptor->u.Port.Length;
NTSTATUS Status = STATUS_SUCCESS;
DbgPrint(TRACE_LEVEL_INFORMATION, ("IO Port Info [%08I64X-%08I64X]\n",
DbgPrint(TRACE_LEVEL_VERBOSE, ("IO Port Info [%08I64X-%08I64X]\n",
pResDescriptor->u.Port.Start.QuadPart,
pResDescriptor->u.Port.Start.QuadPart +
pResDescriptor->u.Port.Length));
@ -3200,7 +3220,7 @@ NTSTATUS QxlDevice::HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION*
}
else
{
DbgPrint(TRACE_LEVEL_INFORMATION, ("DxgkCbMapMemor failed with status 0x%X\n", Status));
DbgPrint(TRACE_LEVEL_ERROR, ("DxgkCbMapMemor (CmResourceTypePort) failed with status 0x%X\n", Status));
}
}
else
@ -3208,7 +3228,7 @@ NTSTATUS QxlDevice::HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION*
m_IoBase = (PUCHAR)(ULONG_PTR)pResDescriptor->u.Port.Start.QuadPart;
m_IoSize = pResDescriptor->u.Port.Length;
}
DbgPrint(TRACE_LEVEL_INFORMATION, ("io_base [%X-%X]\n",
DbgPrint(TRACE_LEVEL_VERBOSE, ("io_base [%X-%X]\n",
m_IoBase,
m_IoBase +
m_IoSize));
@ -3224,7 +3244,7 @@ NTSTATUS QxlDevice::HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION*
PVOID MemBase = NULL;
ULONG MemLength = pResDescriptor->u.Memory.Length;
NTSTATUS Status = STATUS_SUCCESS;
DbgPrint( TRACE_LEVEL_INFORMATION, ("Memory mapped: (%x:%x) Length:(%x)\n",
DbgPrint( TRACE_LEVEL_VERBOSE, ("Memory mapped: (%x:%x) Length:(%x)\n",
pResDescriptor->u.Memory.Start.LowPart,
pResDescriptor->u.Memory.Start.HighPart,
pResDescriptor->u.Memory.Length));
@ -3264,6 +3284,11 @@ NTSTATUS QxlDevice::HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION*
break;
}
}
else
{
DbgPrint(TRACE_LEVEL_INFORMATION, ("DxgkCbMapMemor (CmResourceTypeMemory) failed with status 0x%X\n", Status));
}
}
break;
case CmResourceTypeDma:
@ -3289,6 +3314,7 @@ NTSTATUS QxlDevice::HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION*
m_RamHdr->magic != QXL_RAM_MAGIC)
{
UnmapMemory();
DbgPrint(TRACE_LEVEL_ERROR, ("%s failed asslocateing HW resources\n", __FUNCTION__));
return STATUS_UNSUCCESSFUL;
}
@ -3307,6 +3333,7 @@ NTSTATUS QxlDevice::QxlInit(DXGK_DISPLAY_INFORMATION* pDispInfo)
if (!InitMemSlots()) {
DestroyMemSlots();
DbgPrint(TRACE_LEVEL_ERROR, ("%s failed init mem slots\n", __FUNCTION__));
return STATUS_UNSUCCESSFUL;
}
@ -3320,7 +3347,7 @@ NTSTATUS QxlDevice::QxlInit(DXGK_DISPLAY_INFORMATION* pDispInfo)
WRITE_PORT_UCHAR((PUCHAR)(m_IoBase + QXL_IO_RESET), 0);
CreateRings();
m_RamHdr->int_mask = QXL_INTERRUPT_MASK;
m_RamHdr->int_mask = ~0;
CreateMemSlots();
InitDeviceMemoryResources();
return Status;
@ -3476,32 +3503,20 @@ BOOL QxlDevice::CreateRings()
void QxlDevice::AsyncIo(UCHAR Port, UCHAR Value)
{
LARGE_INTEGER timeout;
KeWaitForSingleObject
(
&m_IoLock,
Executive,
KernelMode,
FALSE,
NULL
);
BOOLEAN locked = FALSE;
locked = WaitForObject(&m_IoLock, NULL);
WRITE_PORT_UCHAR(m_IoBase + Port, Value);
timeout.QuadPart = -60000L * 1000 * 10;
WAIT_FOR_EVENT(m_IoCmdEvent, &timeout);
KeReleaseMutex(&m_IoLock,FALSE);
WaitForObject(&m_IoCmdEvent, &timeout);
ReleaseMutex(&m_IoLock, locked);
}
void QxlDevice::SyncIo(UCHAR Port, UCHAR Value)
{
KeWaitForSingleObject
(
&m_IoLock,
Executive,
KernelMode,
FALSE,
NULL
);
BOOLEAN locked = FALSE;
locked = WaitForObject(&m_IoLock, NULL);
WRITE_PORT_UCHAR(m_IoBase + Port, Value);
KeReleaseMutex(&m_IoLock,FALSE);
ReleaseMutex(&m_IoLock, locked);
}
UINT8 QxlDevice::SetupMemSlot(UINT8 Idx, UINT64 pastart, UINT64 paend, UINT64 vastart, UINT64 vaend)
@ -3606,7 +3621,6 @@ QxlDevice::ExecutePresentDisplayOnly(
RtlZeroMemory(ctx,size);
// const CURRENT_BDD_MODE* pModeCur = &m_CurrentModes[0];
ctx->DstAddr = DstAddr;
ctx->DstBitPerPixel = DstBitPerPixel;
ctx->DstStride = pModeCur->DispInfo.Pitch;
@ -3619,8 +3633,6 @@ QxlDevice::ExecutePresentDisplayOnly(
ctx->Moves = Moves;
ctx->NumDirtyRects = NumDirtyRects;
ctx->DirtyRect = DirtyRect;
// ctx->SourceID = m_SourceId;
// ctx->hAdapter = m_DevExt;
ctx->Mdl = NULL;
ctx->DisplaySource = this;
@ -3730,7 +3742,7 @@ QxlDevice::ExecutePresentDisplayOnly(
BltBits(&DstBltInfo,
&SrcBltInfo,
1, // NumRects
1,
pDestRect);
}
@ -3743,7 +3755,7 @@ QxlDevice::ExecutePresentDisplayOnly(
BltBits(&DstBltInfo,
&SrcBltInfo,
1, // NumRects
1,
pDirtyRect);
}
@ -3781,7 +3793,7 @@ void QxlDevice::WaitForReleaseRing(void)
}
timeout.QuadPart = -30 * 1000 * 10; //30ms
WAIT_FOR_EVENT(m_DisplayEvent, &timeout);
WaitForObject(&m_DisplayEvent, &timeout);
if (SPICE_RING_IS_EMPTY(m_ReleaseRing)) {
SyncIo(QXL_IO_NOTIFY_OOM, 0);
@ -3823,18 +3835,12 @@ void QxlDevice::FlushReleaseRing()
void QxlDevice::EmptyReleaseRing()
{
KeWaitForSingleObject
(
&m_MemLock,
Executive,
KernelMode,
FALSE,
NULL
);
BOOLEAN locked = FALSE;
locked = WaitForObject(&m_MemLock, NULL);
while (m_FreeOutputs || !SPICE_RING_IS_EMPTY(m_ReleaseRing)) {
FlushReleaseRing();
}
KeReleaseMutex(&m_MemLock,FALSE);
ReleaseMutex(&m_MemLock, locked);
}
UINT64 QxlDevice::ReleaseOutput(UINT64 output_id)
@ -3859,6 +3865,7 @@ UINT64 QxlDevice::ReleaseOutput(UINT64 output_id)
void *QxlDevice::AllocMem(UINT32 mspace_type, size_t size, BOOL force)
{
PVOID ptr;
BOOLEAN locked = FALSE;
ASSERT(m_MSInfo[mspace_type]._mspace);
DbgPrint(TRACE_LEVEL_VERBOSE, ("--->%s: %p(%d) size %u\n", __FUNCTION__,
@ -3869,14 +3876,7 @@ void *QxlDevice::AllocMem(UINT32 mspace_type, size_t size, BOOL force)
mspace_malloc_stats(m_MSInfo[mspace_type]._mspace);
#endif
KeWaitForSingleObject
(
&m_MemLock,
Executive,
KernelMode,
FALSE,
NULL
);
locked = WaitForObject(&m_MemLock, NULL);
while (1) {
/* Release lots of queued resources, before allocating, as we
@ -3902,7 +3902,7 @@ void *QxlDevice::AllocMem(UINT32 mspace_type, size_t size, BOOL force)
break;
}
}
KeReleaseMutex(&m_MemLock,FALSE);
ReleaseMutex(&m_MemLock, locked);
ASSERT((!ptr && !force) || (ptr >= m_MSInfo[mspace_type].mspace_start &&
ptr < m_MSInfo[mspace_type].mspace_end));
@ -3923,16 +3923,10 @@ void QxlDevice::FreeMem(UINT32 mspace_type, void *ptr)
m_MSInfo[mspace_type].mspace_end, mspace_type));
}
#endif
KeWaitForSingleObject
(
&m_MemLock,
Executive,
KernelMode,
FALSE,
NULL
);
BOOLEAN locked = FALSE;
locked = WaitForObject(&m_MemLock, NULL);
mspace_free(m_MSInfo[mspace_type]._mspace, ptr);
KeReleaseMutex(&m_MemLock,FALSE);
ReleaseMutex(&m_MemLock, locked);
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
}
@ -4116,20 +4110,14 @@ void QxlDevice::PushDrawable(QXLDrawable *drawable) {
QXLCommand *cmd;
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
KeWaitForSingleObject
(
&m_CmdLock,
Executive,
KernelMode,
FALSE,
NULL
);
BOOLEAN locked = FALSE;
locked = WaitForObject(&m_CmdLock, NULL);
WaitForCmdRing();
cmd = SPICE_RING_PROD_ITEM(m_CommandRing);
cmd->type = QXL_CMD_DRAW;
cmd->data = PA(drawable, m_MainMemSlot);
PushCmd();
KeReleaseMutex(&m_CmdLock,FALSE);
ReleaseMutex(&m_CmdLock, locked);
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
}
@ -4139,20 +4127,14 @@ void QxlDevice::PushCursorCmd(QXLCursorCmd *cursor_cmd)
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
KeWaitForSingleObject
(
&m_CrsLock,
Executive,
KernelMode,
FALSE,
NULL
);
BOOLEAN locked = FALSE;
locked = WaitForObject(&m_CrsLock, NULL);
WaitForCursorRing();
cmd = SPICE_RING_PROD_ITEM(m_CursorRing);
cmd->type = QXL_CMD_CURSOR;
cmd->data = PA(cursor_cmd, m_MainMemSlot);
PushCursor();
KeReleaseMutex(&m_CrsLock,FALSE);
ReleaseMutex(&m_CrsLock, locked);
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
}
@ -4199,7 +4181,6 @@ VOID QxlDevice::BltBits (
}
CONST RECT* pRect = &pRects[0];
// UpdateArea(pRect, 0);
drawable->u.copy.scale_mode = SPICE_IMAGE_SCALE_MODE_NEAREST;
drawable->u.copy.mask.bitmap = 0;
drawable->u.copy.rop_descriptor = SPICE_ROPD_OP_PUT;
@ -4281,7 +4262,6 @@ VOID QxlDevice::PutBytesAlign(QXLDataChunk **chunk_ptr, UINT8 **now_ptr,
QXLDataChunk *chunk = *chunk_ptr;
UINT8 *now = *now_ptr;
UINT8 *end = *end_ptr;
// int offset;
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
while (size) {
@ -4319,8 +4299,6 @@ VOID QxlDevice::BlackOutScreen(CURRENT_BDD_MODE* pCurrentBddMod)
QXLDrawable *drawable;
RECT Rect;
PAGED_CODE();
DbgPrint(TRACE_LEVEL_FATAL, ("---> %s\n", __FUNCTION__));
if (pCurrentBddMod->Flags.FrameBufferIsActive)
{
Rect.bottom = pCurrentBddMod->SrcModeHeight;
@ -4341,15 +4319,12 @@ VOID QxlDevice::BlackOutScreen(CURRENT_BDD_MODE* pCurrentBddMod)
drawable->u.fill.mask.bitmap = 0;
PushDrawable(drawable);
}
DbgPrint(TRACE_LEVEL_FATAL, ("<--- %s\n", __FUNCTION__));
}
NTSTATUS QxlDevice::HWClose(void)
{
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
QxlClose();
UnmapMemory();
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
return STATUS_SUCCESS;
}
@ -4373,7 +4348,6 @@ NTSTATUS QxlDevice::SetPointerShape(_In_ CONST DXGKARG_SETPOINTERSHAPE* pSetPoi
QXLCursor *cursor;
Resource *res;
QXLDataChunk *chunk;
// ULONG unique;
UINT8 *src;
UINT8 *src_end;
UINT8 *now;
@ -4468,12 +4442,12 @@ NTSTATUS QxlDevice::Escape(_In_ CONST DXGKARG_ESCAPE* pEscap)
UINT bpp;
if (pEscap->PrivateDriverDataSize != sizeof(QXLEscapeSetCustomDisplay)) {
DbgPrint(TRACE_LEVEL_FATAL, ("<--> %s Incorrect buffer size %d instead of %d\n", __FUNCTION__, pEscap->PrivateDriverDataSize, sizeof(QXLEscapeSetCustomDisplay)));
DbgPrint(TRACE_LEVEL_ERROR, ("<--> %s Incorrect buffer size %d instead of %d\n", __FUNCTION__, pEscap->PrivateDriverDataSize, sizeof(QXLEscapeSetCustomDisplay)));
return STATUS_INVALID_BUFFER_SIZE;
}
custom_display = (QXLEscapeSetCustomDisplay*)pEscap->pPrivateDriverData;
xres = custom_display->xres;
yres = custom_display->yres;
xres = custom_display->xres & ~0x3;
yres = custom_display->yres & ~0x3;
bpp = custom_display->bpp;
if (bpp != QXL_BPP)
{
@ -4481,7 +4455,7 @@ NTSTATUS QxlDevice::Escape(_In_ CONST DXGKARG_ESCAPE* pEscap)
}
if (xres < MIN_WIDTH_SIZE || yres < MIN_HEIGHT_SIZE)
{
DbgPrint(TRACE_LEVEL_FATAL, ("%s: xres = %d, yres = %d\n", __FUNCTION__, xres, yres));
DbgPrint(TRACE_LEVEL_ERROR, ("%s: xres = %d, yres = %d\n", __FUNCTION__, xres, yres));
return ERROR_INVALID_DATA;
}
@ -4491,9 +4465,9 @@ NTSTATUS QxlDevice::Escape(_In_ CONST DXGKARG_ESCAPE* pEscap)
m_CustomMode = (USHORT)(m_ModeCount - 1);
if ((xres * yres * bpp / 8) > m_RomHdr->surface0_area_size) {
DbgPrint(TRACE_LEVEL_FATAL, ("%s: Mode (%dx%d#%d) doesn't fit in memory (%d)\n",
DbgPrint(TRACE_LEVEL_ERROR, ("%s: Mode (%dx%d#%d) doesn't fit in memory (%d)\n",
__FUNCTION__, xres, yres, bpp, m_RomHdr->surface0_area_size));
return ERROR_NOT_ENOUGH_MEMORY;
return STATUS_INVALID_PARAMETER;
}
UpdateVideoModeInfo(m_CustomMode, xres, yres, bpp);
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
@ -4511,7 +4485,7 @@ VOID QxlDevice::WaitForCmdRing()
if (!wait) {
break;
}
WAIT_FOR_EVENT(m_DisplayEvent, NULL);
WaitForObject(&m_DisplayEvent, NULL);
}
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
}
@ -4541,7 +4515,7 @@ VOID QxlDevice::WaitForCursorRing(VOID)
LARGE_INTEGER timeout; // 1 => 100 nanoseconds
timeout.QuadPart = -1 * (1000 * 1000 * 10); //negative => relative // 1s
WAIT_FOR_EVENT(m_CursorEvent, &timeout);
WaitForObject(&m_CursorEvent, &timeout);
if (SPICE_RING_IS_FULL(m_CursorRing)) {
DbgPrint(TRACE_LEVEL_ERROR, ("%s: timeout\n", __FUNCTION__));
@ -4572,13 +4546,13 @@ BOOLEAN QxlDevice::InterruptRoutine(_In_ PDXGKRNL_INTERFACE pDxgkInterface, _In_
m_Pending |= m_RamHdr->int_pending;
m_RamHdr->int_pending = 0;
DXGKARGCB_NOTIFY_INTERRUPT_DATA notifyInt;// = {0};
DXGKARGCB_NOTIFY_INTERRUPT_DATA notifyInt;
notifyInt.InterruptType = DXGK_INTERRUPT_DISPLAYONLY_PRESENT_PROGRESS;
notifyInt.DisplayOnlyPresentProgress.VidPnSourceId = 0;//FIXME pPath->VidPnSourceId;
notifyInt.DisplayOnlyPresentProgress.VidPnSourceId = 0;
pDxgkInterface->DxgkCbNotifyInterrupt(pDxgkInterface->DeviceHandle,&notifyInt);
if (!pDxgkInterface->DxgkCbQueueDpc(pDxgkInterface->DeviceHandle)) {
m_RamHdr->int_mask = QXL_INTERRUPT_MASK;
m_RamHdr->int_mask = ~0;
WRITE_PORT_UCHAR((PUCHAR)(m_IoBase + QXL_IO_UPDATE_IRQ), 0);
DbgPrint(TRACE_LEVEL_FATAL, ("---> %s DxgkCbQueueDpc failed\n", __FUNCTION__));
}
@ -4613,7 +4587,7 @@ VOID QxlDevice::DpcRoutine(PVOID ptr)
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s m_IoCmdEvent\n", __FUNCTION__));
KeSetEvent (&m_IoCmdEvent, IO_NO_INCREMENT, FALSE);
}
m_RamHdr->int_mask = QXL_INTERRUPT_MASK;
m_RamHdr->int_mask = ~0;
WRITE_PORT_UCHAR((PUCHAR)(m_IoBase + QXL_IO_UPDATE_IRQ), 0);
DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s\n", __FUNCTION__));

View File

@ -48,7 +48,6 @@ typedef struct
ULONG OemProductNamePtr;
ULONG OemProductRevPtr;
CHAR Reserved[222];
// CHAR OemData[256];
} VBE_INFO, *PVBE_INFO;
typedef struct
@ -215,6 +214,7 @@ class QxlDod;
class HwDeviceIntrface {
public:
virtual ~HwDeviceIntrface() {;}
virtual NTSTATUS QueryCurrentMode(PVIDEO_MODE RequestedMode) = 0;
virtual NTSTATUS SetCurrentMode(ULONG Mode) = 0;
virtual NTSTATUS GetCurrentMode(ULONG* Mode) = 0;
@ -265,7 +265,7 @@ class VgaDevice :
{
public:
VgaDevice(_In_ QxlDod* pQxlDod);
virtual ~VgaDevice(void);
~VgaDevice(void);
NTSTATUS QueryCurrentMode(PVIDEO_MODE RequestedMode);
NTSTATUS SetCurrentMode(ULONG Mode);
NTSTATUS GetCurrentMode(ULONG* Mode);
@ -356,20 +356,38 @@ struct Resource {
#define TIMEOUT_TO_MS ((LONGLONG) 1 * 10 * 1000)
#define WAIT_FOR_EVENT(event, timeout) do { \
NTSTATUS status; \
status = KeWaitForSingleObject ( \
&event, \
Executive, \
KernelMode, \
FALSE, \
timeout); \
ASSERT(NT_SUCCESS(status)); \
} while (0);
BOOLEAN
FORCEINLINE
WaitForObject(
PVOID Object,
PLARGE_INTEGER Timeout)
{
NTSTATUS status;
status = KeWaitForSingleObject (
Object,
Executive,
KernelMode,
FALSE,
Timeout);
ASSERT(NT_SUCCESS(status));
return (status == STATUS_SUCCESS);
}
#define QXL_SLEEP(msec) do { \
LARGE_INTEGER timeout; \
timeout.QuadPart = -msec * TIMEOUT_TO_MS; \
VOID
FORCEINLINE
ReleaseMutex(
PKMUTEX Mutex,
BOOLEAN locked)
{
if (locked)
{
KeReleaseMutex(Mutex, FALSE);
}
}
#define QXL_SLEEP(msec) do { \
LARGE_INTEGER timeout; \
timeout.QuadPart = -msec * TIMEOUT_TO_MS; \
KeDelayExecutionThread (KernelMode, FALSE, &timeout);\
} while (0);
@ -420,15 +438,15 @@ class QxlDevice :
{
public:
QxlDevice(_In_ QxlDod* pQxlDod);
virtual ~QxlDevice(void);
~QxlDevice(void);
NTSTATUS QueryCurrentMode(PVIDEO_MODE RequestedMode);
NTSTATUS SetCurrentMode(ULONG Mode);
NTSTATUS GetCurrentMode(ULONG* Mode);
ULONG GetModeCount(void) {return m_ModeCount/* - 2*/;}
ULONG GetModeCount(void) {return m_ModeCount;}
NTSTATUS SetPowerState(DEVICE_POWER_STATE DevicePowerState, DXGK_DISPLAY_INFORMATION* pDispInfo);
NTSTATUS HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION* pDispInfo);
NTSTATUS HWClose(void);
BOOLEAN EnablePointer(void) { return TRUE; }
BOOLEAN EnablePointer(void) { return FALSE; }
NTSTATUS ExecutePresentDisplayOnly(_In_ BYTE* DstAddr,
_In_ UINT DstBitPerPixel,
_In_ BYTE* SrcAddr,

View File

@ -1,28 +1,28 @@
@echo off
call %~dp0\checkWin8Tools.bat
for /f "tokens=*" %%a in (
'cscript.exe /nologo "%~dp0\getVisualStudioCmdLine.vbs" %*'
) do (
set vs_cmd=%%a
)
IF NOT DEFINED vs_cmd (
echo Visual Studio not found
EXIT /b 1
)
SET vs_cmd_no_quotes="%vs_cmd:"=%"
IF "vs_cmd_no_quotes" == "" (
echo Visual Studio not found
EXIT /b 2
)
call %vs_cmd%
if %ERRORLEVEL% GEQ 1 (
echo Build with Visual Studio FAILED
exit /b %ERRORLEVEL%
)
exit /b 0
@echo off
call %~dp0\checkWin8Tools.bat
for /f "tokens=*" %%a in (
'cscript.exe /nologo "%~dp0\getVisualStudioCmdLine.vbs" %*'
) do (
set vs_cmd=%%a
)
IF NOT DEFINED vs_cmd (
echo Visual Studio not found
EXIT /b 1
)
SET vs_cmd_no_quotes="%vs_cmd:"=%"
IF "vs_cmd_no_quotes" == "" (
echo Visual Studio not found
EXIT /b 2
)
call %vs_cmd%
if %ERRORLEVEL% GEQ 1 (
echo Build with Visual Studio FAILED
exit /b %ERRORLEVEL%
)
exit /b 0

View File

@ -9,7 +9,7 @@
// Driver Entry point
//
int nDebugLevel = TRACE_LEVEL_INFORMATION;
int nDebugLevel = TRACE_LEVEL_ERROR;
extern "C"
@ -22,9 +22,6 @@ DriverEntry(
DbgPrint(TRACE_LEVEL_FATAL, ("---> KMDOD build on on %s %s\n", __DATE__, __TIME__));
#ifdef DBG
// KdBreakPoint();
#endif
// Initialize DDI function pointers and dxgkrnl
KMDDOD_INITIALIZATION_DATA InitialData = {0};
@ -252,7 +249,7 @@ DodQueryDeviceDescriptor(
// The first call queues a worker thread item indicating that it now has a child device, the second queues a worker thread
// item that it no longer has any child device. This function gets called based on the first worker thread item, but after
// the driver has been stopped. Therefore instead of asserting like other functions, we only warn.
DbgPrint(TRACE_LEVEL_WARNING, ("QXL (0x%I64x) is being called when not active!", pQxl));
DbgPrint(TRACE_LEVEL_WARNING, ("QXL (%p) is being called when not active!", pQxl));
return STATUS_UNSUCCESSFUL;
}
return pQxl->QueryDeviceDescriptor(ChildUid, pDeviceDescriptor);
@ -290,7 +287,7 @@ DodSetPointerPosition(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->SetPointerPosition(pSetPointerPosition);
@ -309,7 +306,7 @@ DodSetPointerShape(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->SetPointerShape(pSetPointerShape);
@ -357,7 +354,7 @@ DodPresentDisplayOnly(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->PresentDisplayOnly(pPresentDisplayOnly);
@ -394,7 +391,7 @@ DodIsSupportedVidPn(
// This path might hit because win32k/dxgport doesn't check that an adapter is active when taking the adapter lock.
// The adapter lock is the main thing QXL Fallback relies on to not be called while it's inactive. It is still a rare
// timing issue around PnpStart/Stop and isn't expected to have any effect on the stability of the system.
DbgPrint(TRACE_LEVEL_WARNING, ("QXL (0x%I64x) is being called when not active!", pQxl));
DbgPrint(TRACE_LEVEL_WARNING, ("QXL (%p) is being called when not active!", pQxl));
return STATUS_UNSUCCESSFUL;
}
return pQxl->IsSupportedVidPn(pIsSupportedVidPn);
@ -413,7 +410,7 @@ DodRecommendFunctionalVidPn(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->RecommendFunctionalVidPn(pRecommendFunctionalVidPn);
@ -432,7 +429,7 @@ DodRecommendVidPnTopology(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->RecommendVidPnTopology(pRecommendVidPnTopology);
@ -451,7 +448,7 @@ DodRecommendMonitorModes(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->RecommendMonitorModes(pRecommendMonitorModes);
@ -470,7 +467,7 @@ DodEnumVidPnCofuncModality(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->EnumVidPnCofuncModality(pEnumCofuncModality);
@ -489,7 +486,7 @@ DodSetVidPnSourceVisibility(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->SetVidPnSourceVisibility(pSetVidPnSourceVisibility);
@ -508,7 +505,7 @@ DodCommitVidPn(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->CommitVidPn(pCommitVidPn);
@ -527,7 +524,7 @@ DodUpdateActiveVidPnPresentPath(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->UpdateActiveVidPnPresentPath(pUpdateActiveVidPnPresentPath);
@ -546,7 +543,7 @@ DodQueryVidPnHWCapability(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return STATUS_UNSUCCESSFUL;
}
return pQxl->QueryVidPnHWCapability(pVidPnHWCaps);
@ -569,7 +566,7 @@ DodDpcRoutine(
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
if (!pQxl->IsDriverActive())
{
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
QXL_LOG_ASSERTION1("QXL (%p) is being called when not active!", pQxl);
return;
}
pQxl->DpcRoutine();

View File

@ -207,8 +207,6 @@ DodSystemDisplayWrite(
_In_ UINT PositionX,
_In_ UINT PositionY);
#if DBG
extern int nDebugLevel;

View File

@ -1,28 +1,28 @@
' $1 - Visual studio version to run (10 or 11)
' $2 ... Parameters to pass
Dim strCmdLine, strTemp
Set WshShell = Wscript.CreateObject("Wscript.Shell")
On Error Resume Next
strCmdLine = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\VisualStudio\" + Wscript.Arguments(0) + ".0\InstallDir")
' In case of error assume WoW64 case
If Err <> 0 Then
On Error Goto 0
strCmdLine = WshShell.RegRead("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\" + Wscript.Arguments(0) + ".0\InstallDir")
End If
On Error Goto 0
strCmdLine = chr(34) + strCmdLine + "devenv.com" + chr(34)
For i = 0 to (Wscript.Arguments.Count - 1)
If i > 0 Then
strTemp = Wscript.Arguments(i)
If InStr(strTemp, " ") Or InStr(strTemp, "|") Then
strCmdLine = strCmdLine + " " + chr(34) + strTemp + chr(34)
Else
strCmdLine = strCmdLine + " " + strTemp
End If
End If
Next
WScript.Echo strCmdLine + vbCrLf
' $1 - Visual studio version to run (10 or 11)
' $2 ... Parameters to pass
Dim strCmdLine, strTemp
Set WshShell = Wscript.CreateObject("Wscript.Shell")
On Error Resume Next
strCmdLine = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\VisualStudio\" + Wscript.Arguments(0) + ".0\InstallDir")
' In case of error assume WoW64 case
If Err <> 0 Then
On Error Goto 0
strCmdLine = WshShell.RegRead("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\" + Wscript.Arguments(0) + ".0\InstallDir")
End If
On Error Goto 0
strCmdLine = chr(34) + strCmdLine + "devenv.com" + chr(34)
For i = 0 to (Wscript.Arguments.Count - 1)
If i > 0 Then
strTemp = Wscript.Arguments(i)
If InStr(strTemp, " ") Or InStr(strTemp, "|") Then
strCmdLine = strCmdLine + " " + chr(34) + strTemp + chr(34)
Else
strCmdLine = strCmdLine + " " + strTemp
End If
End If
Next
WScript.Echo strCmdLine + vbCrLf

14
qxldod/include/qxl_windows.h Executable file
View File

@ -0,0 +1,14 @@
#ifndef _H_QXL_WINDOWS
#define _H_QXL_WINDOWS
enum {
QXL_ESCAPE_SET_CUSTOM_DISPLAY = 0x10001,
};
typedef struct QXLEscapeSetCustomDisplay {
uint32_t xres;
uint32_t yres;
uint32_t bpp;
} QXLEscapeSetCustomDisplay;
#endif /* _H_QXL_WINDOWS */

BIN
qxldod/qxldod.inx Executable file

Binary file not shown.

View File

@ -55,21 +55,25 @@
<TargetVersion>WindowsV6.3</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'" Label="Configuration">
<TargetVersion>Windows8</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|Win32'">
<TargetVersion>WindowsV6.3</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'" Label="Configuration">
<TargetVersion>Windows8</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">
<TargetVersion>WindowsV6.3</TargetVersion>
@ -90,6 +94,7 @@
<TargetVersion>Windows8</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -157,6 +162,11 @@
<PostBuildEvent>
<Command>Inf2Cat /driver:$(OutDir) /os:8_X86,6_3_X86</Command>
</PostBuildEvent>
<Inf>
<EnableVerbose>true</EnableVerbose>
<KmdfVersionNumber />
<UmdfVersionNumber />
</Inf>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">
<Link>
@ -173,6 +183,15 @@
<PostBuildEvent>
<Command>Inf2Cat /driver:$(OutDir) /os:8_X86,6_3_X86</Command>
</PostBuildEvent>
<Inf>
<KmdfVersionNumber />
</Inf>
<Inf>
<UmdfVersionNumber />
</Inf>
<Inf>
<EnableVerbose>true</EnableVerbose>
</Inf>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|Win32'">
<Link>
@ -188,6 +207,11 @@
<PostBuildEvent>
<Command>Inf2Cat /driver:$(OutDir) /os:8_X86,6_3_X86</Command>
</PostBuildEvent>
<Inf>
<EnableVerbose>true</EnableVerbose>
<KmdfVersionNumber />
<UmdfVersionNumber />
</Inf>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">
<Link>
@ -203,6 +227,11 @@
<PostBuildEvent>
<Command>Inf2Cat /driver:$(OutDir) /os:8_X86,6_3_X86</Command>
</PostBuildEvent>
<Inf>
<EnableVerbose>true</EnableVerbose>
<KmdfVersionNumber />
<UmdfVersionNumber />
</Inf>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">
<Link>
@ -217,6 +246,11 @@
<PostBuildEvent>
<Command>Inf2Cat /driver:$(OutDir) /os:8_X64,Server8_X64,Server6_3_X64,6_3_X64</Command>
</PostBuildEvent>
<Inf>
<EnableVerbose>true</EnableVerbose>
<KmdfVersionNumber />
<UmdfVersionNumber />
</Inf>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">
<Link>
@ -231,6 +265,11 @@
<PostBuildEvent>
<Command>Inf2Cat /driver:$(OutDir) /os:8_X64,Server8_X64,Server6_3_X64,6_3_X64</Command>
</PostBuildEvent>
<Inf>
<EnableVerbose>true</EnableVerbose>
<KmdfVersionNumber />
<UmdfVersionNumber />
</Inf>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">
<Link>
@ -246,6 +285,11 @@
<PostBuildEvent>
<Command>Inf2Cat /driver:$(OutDir) /os:8_X64,Server8_X64,Server6_3_X64,6_3_X64</Command>
</PostBuildEvent>
<Inf>
<EnableVerbose>true</EnableVerbose>
<KmdfVersionNumber />
<UmdfVersionNumber />
</Inf>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
<Link>
@ -261,10 +305,12 @@
<PostBuildEvent>
<Command>Inf2Cat /driver:$(OutDir) /os:8_X64,Server8_X64,Server6_3_X64,6_3_X64</Command>
</PostBuildEvent>
<Inf>
<EnableVerbose>true</EnableVerbose>
<KmdfVersionNumber />
<UmdfVersionNumber />
</Inf>
</ItemDefinitionGroup>
<ItemGroup>
<Inf Include="qxldod.inf" />
</ItemGroup>
<ItemGroup>
<FilesToPackage Include="$(TargetPath)" />
<FilesToPackage Include="@(Inf->'%(CopyOutput)')" Condition="'@(Inf)'!=''" />
@ -284,7 +330,10 @@
<ItemGroup>
<ResourceCompile Include="qxldod.rc" />
</ItemGroup>
<ItemGroup>
<Inf Include="qxldod.inx" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -1,59 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Driver Files">
<UniqueIdentifier>{8E41214B-6785-4CFE-B992-037D68949A14}</UniqueIdentifier>
<Extensions>inf;inv;inx;mof;mc;</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<Inf Include="qxldod.inf">
<Filter>Driver Files</Filter>
</Inf>
</ItemGroup>
<ItemGroup>
<ClInclude Include="BaseObject.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="driver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="QxlDod.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="BaseObject.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="driver.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="QxlDod.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mspace.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="qxldod.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Driver Files">
<UniqueIdentifier>{8E41214B-6785-4CFE-B992-037D68949A14}</UniqueIdentifier>
<Extensions>inf;inv;inx;mof;mc;</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="BaseObject.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="driver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="QxlDod.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="BaseObject.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="driver.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="QxlDod.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mspace.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="qxldod.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Inf Include="qxldod.inx">
<Filter>Driver Files</Filter>
</Inf>
</ItemGroup>
</Project>