mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 03:43:36 +00:00
[VIDEOPRT] Handle VIDEO_MEMORY_SPACE_P6CACHE flag
JIRA issue: CORE-20298
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user