mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- Implemented IOCTL_VIDEO_MAP_VIDEO_MEMORY/IOCTL_VIDEO_UNMAP_VIDEO_MEMORY.
svn path=/trunk/; revision=8766
This commit is contained in:
parent
bf87266d08
commit
32a05a4377
1 changed files with 38 additions and 8 deletions
|
@ -34,7 +34,8 @@ VGATimer(PVOID DeviceExtension);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Mandatory IoControl routines */
|
/* Mandatory IoControl routines */
|
||||||
VOID VGAMapVideoMemory(IN PVIDEO_MEMORY RequestedAddress,
|
VOID VGAMapVideoMemory(IN PVOID DeviceExtension,
|
||||||
|
IN PVIDEO_MEMORY RequestedAddress,
|
||||||
OUT PVIDEO_MEMORY_INFORMATION MapInformation,
|
OUT PVIDEO_MEMORY_INFORMATION MapInformation,
|
||||||
OUT PSTATUS_BLOCK StatusBlock);
|
OUT PSTATUS_BLOCK StatusBlock);
|
||||||
VOID VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes,
|
VOID VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes,
|
||||||
|
@ -53,7 +54,8 @@ VOID VGASetCurrentMode(IN PVIDEO_MODE RequestedMode,
|
||||||
VOID VGAShareVideoMemory(IN PVIDEO_SHARE_MEMORY RequestedMemory,
|
VOID VGAShareVideoMemory(IN PVIDEO_SHARE_MEMORY RequestedMemory,
|
||||||
OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory,
|
OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory,
|
||||||
OUT PSTATUS_BLOCK StatusBlock);
|
OUT PSTATUS_BLOCK StatusBlock);
|
||||||
VOID VGAUnmapVideoMemory(IN PVIDEO_MEMORY MemoryToUnmap,
|
VOID VGAUnmapVideoMemory(IN PVOID DeviceExtension,
|
||||||
|
IN PVIDEO_MEMORY MemoryToUnmap,
|
||||||
OUT PSTATUS_BLOCK StatusBlock);
|
OUT PSTATUS_BLOCK StatusBlock);
|
||||||
VOID VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare,
|
VOID VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare,
|
||||||
OUT PSTATUS_BLOCK StatusBlock);
|
OUT PSTATUS_BLOCK StatusBlock);
|
||||||
|
@ -219,7 +221,8 @@ VGAStartIO(PVOID DeviceExtension,
|
||||||
switch (RequestPacket->IoControlCode)
|
switch (RequestPacket->IoControlCode)
|
||||||
{
|
{
|
||||||
case IOCTL_VIDEO_MAP_VIDEO_MEMORY:
|
case IOCTL_VIDEO_MAP_VIDEO_MEMORY:
|
||||||
VGAMapVideoMemory((PVIDEO_MEMORY) RequestPacket->InputBuffer,
|
VGAMapVideoMemory(DeviceExtension,
|
||||||
|
(PVIDEO_MEMORY) RequestPacket->InputBuffer,
|
||||||
(PVIDEO_MEMORY_INFORMATION)
|
(PVIDEO_MEMORY_INFORMATION)
|
||||||
RequestPacket->OutputBuffer,
|
RequestPacket->OutputBuffer,
|
||||||
RequestPacket->StatusBlock);
|
RequestPacket->StatusBlock);
|
||||||
|
@ -261,7 +264,8 @@ VGAStartIO(PVOID DeviceExtension,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IOCTL_VIDEO_UNMAP_VIDEO_MEMORY:
|
case IOCTL_VIDEO_UNMAP_VIDEO_MEMORY:
|
||||||
VGAUnmapVideoMemory((PVIDEO_MEMORY) RequestPacket->InputBuffer,
|
VGAUnmapVideoMemory(DeviceExtension,
|
||||||
|
(PVIDEO_MEMORY) RequestPacket->InputBuffer,
|
||||||
RequestPacket->StatusBlock);
|
RequestPacket->StatusBlock);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -389,11 +393,34 @@ VGATimer(PVOID DeviceExtension)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VOID VGAMapVideoMemory(IN PVIDEO_MEMORY RequestedAddress,
|
VOID VGAMapVideoMemory(IN PVOID DeviceExtension,
|
||||||
|
IN PVIDEO_MEMORY RequestedAddress,
|
||||||
OUT PVIDEO_MEMORY_INFORMATION MapInformation,
|
OUT PVIDEO_MEMORY_INFORMATION MapInformation,
|
||||||
OUT PSTATUS_BLOCK StatusBlock)
|
OUT PSTATUS_BLOCK StatusBlock)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
ULONG ReturnedLength;
|
||||||
|
PVOID ReturnedAddress;
|
||||||
|
ULONG IoSpace;
|
||||||
|
PHYSICAL_ADDRESS FrameBufferBase;
|
||||||
|
ReturnedAddress = RequestedAddress->RequestedVirtualAddress;
|
||||||
|
ReturnedLength = 256 * 1024;
|
||||||
|
FrameBufferBase.QuadPart = 0xA0000;
|
||||||
|
IoSpace = VIDEO_MEMORY_SPACE_MEMORY;
|
||||||
|
StatusBlock->Status = VideoPortMapMemory(DeviceExtension,
|
||||||
|
FrameBufferBase,
|
||||||
|
&ReturnedLength,
|
||||||
|
&IoSpace,
|
||||||
|
&ReturnedAddress);
|
||||||
|
if (StatusBlock->Status != 0)
|
||||||
|
{
|
||||||
|
StatusBlock->Information = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MapInformation->VideoRamBase = MapInformation->FrameBufferBase =
|
||||||
|
ReturnedAddress;
|
||||||
|
MapInformation->VideoRamLength = MapInformation->FrameBufferLength =
|
||||||
|
ReturnedLength;
|
||||||
|
StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes,
|
VOID VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes,
|
||||||
|
@ -474,10 +501,13 @@ VOID VGAShareVideoMemory(IN PVIDEO_SHARE_MEMORY RequestedMemory,
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID VGAUnmapVideoMemory(IN PVIDEO_MEMORY MemoryToUnmap,
|
VOID VGAUnmapVideoMemory(IN PVOID DeviceExtension,
|
||||||
|
IN PVIDEO_MEMORY MemoryToUnmap,
|
||||||
OUT PSTATUS_BLOCK StatusBlock)
|
OUT PSTATUS_BLOCK StatusBlock)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
VideoPortUnmapMemory(DeviceExtension,
|
||||||
|
MemoryToUnmap->RequestedVirtualAddress,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare,
|
VOID VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare,
|
||||||
|
|
Loading…
Reference in a new issue