[VIDEOPRT] Handle VIDEO_MEMORY_SPACE_P6CACHE flag

JIRA issue: CORE-20298
This commit is contained in:
Hervé Poussineau
2025-11-09 09:30:19 +01:00
parent c28500c0d9
commit 59ae6b3e15
+7 -7
View File
@@ -297,11 +297,6 @@ IntVideoPortMapMemory(
INFO_(VIDEOPRT, "- InIoSpace: %x\n", InIoSpace);
InIoSpace &= ~VIDEO_MEMORY_SPACE_DENSE;
if ((InIoSpace & VIDEO_MEMORY_SPACE_P6CACHE) != 0)
{
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)
{
@@ -345,7 +340,7 @@ IntVideoPortMapMemory(
}
AddressSpace = (ULONG)InIoSpace;
AddressSpace &= ~VIDEO_MEMORY_SPACE_USER_MODE;
AddressSpace &= ~(VIDEO_MEMORY_SPACE_USER_MODE | VIDEO_MEMORY_SPACE_P6CACHE);
if (HalTranslateBusAddress(
DeviceExtension->AdapterInterfaceType,
DeviceExtension->SystemIoBusNumber,
@@ -373,11 +368,16 @@ IntVideoPortMapMemory(
if ((InIoSpace & VIDEO_MEMORY_SPACE_USER_MODE) != 0)
{
NTSTATUS NtStatus;
ULONG Protect;
if (InIoSpace & VIDEO_MEMORY_SPACE_P6CACHE)
Protect = PAGE_READWRITE | PAGE_WRITECOMBINE;
else
Protect = PAGE_READWRITE | PAGE_NOCACHE;
MappedAddress = NULL;
NtStatus = IntVideoPortMapPhysicalMemory(ProcessHandle,
TranslatedAddress,
NumberOfUchars,
PAGE_READWRITE/* | PAGE_WRITECOMBINE*/,
Protect,
&MappedAddress);
if (!NT_SUCCESS(NtStatus))
{