Changeset 28382 in vbox for trunk/src/VBox
- Timestamp:
- Apr 15, 2010 6:03:53 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Miniport
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
r28322 r28382 2928 2928 2929 2929 BOOLEAN FASTCALL VBoxVideoSetCurrentModePerform(PDEVICE_EXTENSION DeviceExtension, 2930 USHORT width, USHORT height, USHORT bpp) 2930 USHORT width, USHORT height, USHORT bpp 2931 #ifdef VBOXWDDM 2932 , ULONG offDisplay 2933 #endif 2934 ) 2931 2935 { 2932 2936 /* set the mode characteristics */ … … 2940 2944 VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ENABLE); 2941 2945 VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED); 2946 #ifdef VBOXWDDM 2947 /* encode linear offDisplay to xOffset & yOffset to ensure offset fits USHORT */ 2948 ULONG cbLine = VBOXWDDM_ROUNDBOUND(((width * bpp) + 7) / 8, 4); 2949 ULONG xOffset = offDisplay % cbLine; 2950 ULONG yOffset = offDisplay / cbLine; 2951 Assert(xOffset <= 0xffff); 2952 Assert(yOffset <= 0xffff); 2953 VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_X_OFFSET); 2954 VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, (USHORT)xOffset); 2955 VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_Y_OFFSET); 2956 VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, (USHORT)yOffset); 2957 #endif 2942 2958 /** @todo read from the port to see if the mode switch was successful */ 2943 2959 -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h
r28228 r28382 86 86 #define VBE_DISPI_INDEX_VIRT_WIDTH 0x6 87 87 #define VBE_DISPI_INDEX_VIRT_HEIGHT 0x7 88 #define VBE_DISPI_INDEX_X_OFFSET 0x8 89 #define VBE_DISPI_INDEX_Y_OFFSET 0x9 88 90 #define VBE_DISPI_INDEX_VBOX_VIDEO 0xa 89 91 … … 736 738 737 739 BOOLEAN FASTCALL VBoxVideoSetCurrentModePerform(PDEVICE_EXTENSION DeviceExtension, 738 USHORT width, USHORT height, USHORT bpp); 740 USHORT width, USHORT height, USHORT bpp 741 #ifdef VBOXWDDM 742 , ULONG offDisplay 743 #endif 744 ); 739 745 740 746 BOOLEAN FASTCALL VBoxVideoSetCurrentMode( -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r28322 r28382 155 155 156 156 if (VBoxVideoSetCurrentModePerform(pDevExt, pAllocation->u.SurfInfo.width, 157 pAllocation->u.SurfInfo.height, pAllocation->u.SurfInfo.bpp)) 157 pAllocation->u.SurfInfo.height, pAllocation->u.SurfInfo.bpp, 158 (ULONG)pAllocation->offVram)) 158 159 return STATUS_SUCCESS; 159 160
Note:
See TracChangeset
for help on using the changeset viewer.