- Timestamp:
- Apr 11, 2017 10:15:57 AM (8 years ago)
- Location:
- trunk/src/VBox/Additions
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp
r65381 r66507 1825 1825 if (offCmd != HGSMIOFFSET_VOID) 1826 1826 { 1827 VB oxVideoCmnPortWriteUlong(VBoxCommonFromDeviceExt(pDevExt)->guestCtx.port, offCmd);1827 VBVO_PORT_WRITE_U32(VBoxCommonFromDeviceExt(pDevExt)->guestCtx.port, offCmd); 1828 1828 /* Make the compiler aware that the host has changed memory. */ 1829 1829 ASMCompilerBarrier(); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVbva.cpp
r63943 r66507 116 116 static int vboxCmdVbvaSubmitHgsmi(PHGSMIGUESTCOMMANDCONTEXT pHGSMICtx, HGSMIOFFSET offDr) 117 117 { 118 VB oxVideoCmnPortWriteUlong(pHGSMICtx->port, offDr);118 VBVO_PORT_WRITE_U32(pHGSMICtx->port, offDr); 119 119 /* Make the compiler aware that the host has changed memory. */ 120 120 ASMCompilerBarrier(); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVdma.cpp
r63566 r66507 1517 1517 { 1518 1518 RT_NOREF(pInfo); 1519 VB oxVideoCmnPortWriteUlong(VBoxCommonFromDeviceExt(pDevExt)->guestCtx.port, offDr);1519 VBVO_PORT_WRITE_U32(VBoxCommonFromDeviceExt(pDevExt)->guestCtx.port, offDr); 1520 1520 /* Make the compiler aware that the host has changed memory. */ 1521 1521 ASMCompilerBarrier(); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r65467 r66507 739 739 pHwResources->cbVRAM = VBE_DISPI_TOTAL_VIDEO_MEMORY_BYTES; 740 740 741 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID);742 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, VBE_DISPI_ID2);743 DispiId = VB oxVideoCmnPortReadUshort(VBE_DISPI_IOPORT_DATA);741 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID); 742 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, VBE_DISPI_ID2); 743 DispiId = VBVO_PORT_READ_U16(VBE_DISPI_IOPORT_DATA); 744 744 if (DispiId == VBE_DISPI_ID2) 745 745 { … … 754 754 * an ULONG from the data port without setting an index before. 755 755 */ 756 pHwResources->cbVRAM = VB oxVideoCmnPortReadUlong(VBE_DISPI_IOPORT_DATA);756 pHwResources->cbVRAM = VBVO_PORT_READ_U32(VBE_DISPI_IOPORT_DATA); 757 757 if (VBoxHGSMIIsSupported ()) 758 758 { … … 1538 1538 { 1539 1539 /* read the command offset */ 1540 HGSMIOFFSET offCmd = VB oxVideoCmnPortReadUlong(VBoxCommonFromDeviceExt(pDevExt)->guestCtx.port);1540 HGSMIOFFSET offCmd = VBVO_PORT_READ_U32(VBoxCommonFromDeviceExt(pDevExt)->guestCtx.port); 1541 1541 if (offCmd == HGSMIOFFSET_VOID) 1542 1542 { … … 1674 1674 { 1675 1675 /* read the command offset */ 1676 HGSMIOFFSET offCmd = VB oxVideoCmnPortReadUlong(VBoxCommonFromDeviceExt(pDevExt)->guestCtx.port);1676 HGSMIOFFSET offCmd = VBVO_PORT_READ_U32(VBoxCommonFromDeviceExt(pDevExt)->guestCtx.port); 1677 1677 Assert(offCmd != HGSMIOFFSET_VOID); 1678 1678 if (offCmd != HGSMIOFFSET_VOID) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPIOCTL.cpp
r65381 r66507 292 292 for (entry=pClut->FirstEntry; entry<pClut->FirstEntry+pClut->NumEntries; ++entry) 293 293 { 294 VB oxVideoCmnPortWriteUchar(VBE_DISPI_IOPORT_DAC_WRITE_INDEX, (UCHAR)entry);295 VB oxVideoCmnPortWriteUchar(VBE_DISPI_IOPORT_DAC_DATA, pClut->LookupTable[entry].RgbArray.Red);296 VB oxVideoCmnPortWriteUchar(VBE_DISPI_IOPORT_DAC_DATA, pClut->LookupTable[entry].RgbArray.Green);297 VB oxVideoCmnPortWriteUchar(VBE_DISPI_IOPORT_DAC_DATA, pClut->LookupTable[entry].RgbArray.Blue);294 VBVO_PORT_WRITE_U8(VBE_DISPI_IOPORT_DAC_WRITE_INDEX, (UCHAR)entry); 295 VBVO_PORT_WRITE_U8(VBE_DISPI_IOPORT_DAC_DATA, pClut->LookupTable[entry].RgbArray.Red); 296 VBVO_PORT_WRITE_U8(VBE_DISPI_IOPORT_DAC_DATA, pClut->LookupTable[entry].RgbArray.Green); 297 VBVO_PORT_WRITE_U8(VBE_DISPI_IOPORT_DAC_DATA, pClut->LookupTable[entry].RgbArray.Blue); 298 298 } 299 299 -
trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp
r66506 r66507 25 25 static void HGSMINotifyHostCmdComplete(PHGSMIHOSTCOMMANDCONTEXT pCtx, HGSMIOFFSET offt) 26 26 { 27 VB oxVideoCmnPortWriteUlong(pCtx->port, offt);27 VBVO_PORT_WRITE_U32(pCtx->port, offt); 28 28 } 29 29 … … 67 67 static HGSMIOFFSET hgsmiGetHostBuffer(PHGSMIHOSTCOMMANDCONTEXT pCtx) 68 68 { 69 return VB oxVideoCmnPortReadUlong(pCtx->port);69 return VBVO_PORT_READ_U32(pCtx->port); 70 70 } 71 71 … … 98 98 uint16_t DispiId; 99 99 100 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID);101 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, VBE_DISPI_ID_HGSMI);102 103 DispiId = VB oxVideoCmnPortReadUshort(VBE_DISPI_IOPORT_DATA);100 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID); 101 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, VBE_DISPI_ID_HGSMI); 102 103 DispiId = VBVO_PORT_READ_U16(VBE_DISPI_IOPORT_DATA); 104 104 105 105 return (DispiId == VBE_DISPI_ID_HGSMI); … … 163 163 { 164 164 /* Submit the buffer to the host. */ 165 VB oxVideoCmnPortWriteUlong(pCtx->port, offBuffer);165 VBVO_PORT_WRITE_U32(pCtx->port, offBuffer); 166 166 /* Make the compiler aware that the host has changed memory. */ 167 167 ASMCompilerBarrier(); -
trunk/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
r66506 r66507 52 52 { 53 53 /** @note A 32bit read on this port returns the VRAM size. */ 54 return VB oxVideoCmnPortReadUlong(VBE_DISPI_IOPORT_DATA);54 return VBVO_PORT_READ_U32(VBE_DISPI_IOPORT_DATA); 55 55 } 56 56 … … 65 65 { 66 66 unsigned DispiId; 67 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID);68 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, VBE_DISPI_ID_ANYX);69 DispiId = VB oxVideoCmnPortReadUshort(VBE_DISPI_IOPORT_DATA);67 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID); 68 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, VBE_DISPI_ID_ANYX); 69 DispiId = VBVO_PORT_READ_U16(VBE_DISPI_IOPORT_DATA); 70 70 return (DispiId == VBE_DISPI_ID_ANYX); 71 71 } … … 131 131 { 132 132 /* set the mode characteristics */ 133 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_XRES);134 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, cWidth);135 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_YRES);136 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, cHeight);137 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,133 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_XRES); 134 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, cWidth); 135 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_YRES); 136 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, cHeight); 137 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, 138 138 VBE_DISPI_INDEX_VIRT_WIDTH); 139 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, cVirtWidth);140 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_BPP);141 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, cBPP);139 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, cVirtWidth); 140 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_BPP); 141 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, cBPP); 142 142 /* enable the mode */ 143 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,143 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, 144 144 VBE_DISPI_INDEX_ENABLE); 145 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA,145 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, 146 146 fFlags | VBE_DISPI_ENABLED); 147 147 /* Panning registers */ 148 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,148 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, 149 149 VBE_DISPI_INDEX_X_OFFSET); 150 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, cx);151 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,150 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, cx); 151 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, 152 152 VBE_DISPI_INDEX_Y_OFFSET); 153 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, cy);153 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, cy); 154 154 /** @todo read from the port to see if the mode switch was successful */ 155 155 } … … 175 175 uint16_t fFlags; 176 176 177 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,177 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, 178 178 VBE_DISPI_INDEX_ENABLE); 179 fFlags = VB oxVideoCmnPortReadUshort(VBE_DISPI_IOPORT_DATA);179 fFlags = VBVO_PORT_READ_U16(VBE_DISPI_IOPORT_DATA); 180 180 if (pcWidth) 181 181 { 182 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,182 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, 183 183 VBE_DISPI_INDEX_XRES); 184 *pcWidth = VB oxVideoCmnPortReadUshort(VBE_DISPI_IOPORT_DATA);184 *pcWidth = VBVO_PORT_READ_U16(VBE_DISPI_IOPORT_DATA); 185 185 } 186 186 if (pcHeight) 187 187 { 188 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,188 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, 189 189 VBE_DISPI_INDEX_YRES); 190 *pcHeight = VB oxVideoCmnPortReadUshort(VBE_DISPI_IOPORT_DATA);190 *pcHeight = VBVO_PORT_READ_U16(VBE_DISPI_IOPORT_DATA); 191 191 } 192 192 if (pcVirtWidth) 193 193 { 194 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,194 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, 195 195 VBE_DISPI_INDEX_VIRT_WIDTH); 196 *pcVirtWidth = VB oxVideoCmnPortReadUshort(VBE_DISPI_IOPORT_DATA);196 *pcVirtWidth = VBVO_PORT_READ_U16(VBE_DISPI_IOPORT_DATA); 197 197 } 198 198 if (pcBPP) 199 199 { 200 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,200 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, 201 201 VBE_DISPI_INDEX_BPP); 202 *pcBPP = VB oxVideoCmnPortReadUshort(VBE_DISPI_IOPORT_DATA);202 *pcBPP = VBVO_PORT_READ_U16(VBE_DISPI_IOPORT_DATA); 203 203 } 204 204 if (pfFlags) … … 213 213 DECLHIDDEN(void) VBoxVideoDisableVBE(void) 214 214 { 215 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX,215 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_INDEX, 216 216 VBE_DISPI_INDEX_ENABLE); 217 VB oxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, 0);217 VBVO_PORT_WRITE_U16(VBE_DISPI_IOPORT_DATA, 0); 218 218 } 219 219 -
trunk/src/VBox/Additions/linux/drm/VBoxVideoIPRT.h
r66506 r66507 83 83 * @{ */ 84 84 /** Write an 8-bit value to an I/O port. */ 85 #define VB oxVideoCmnPortWriteUchar(Port, Value) \85 #define VBVO_PORT_WRITE_U8(Port, Value) \ 86 86 outb(Value, Port) 87 87 /** Write a 16-bit value to an I/O port. */ 88 #define VB oxVideoCmnPortWriteUshort(Port, Value) \88 #define VBVO_PORT_WRITE_U16(Port, Value) \ 89 89 outw(Value, Port) 90 90 /** Write a 32-bit value to an I/O port. */ 91 #define VB oxVideoCmnPortWriteUlong(Port, Value) \91 #define VBVO_PORT_WRITE_U32(Port, Value) \ 92 92 outl(Value, Port) 93 93 /** Read an 8-bit value from an I/O port. */ 94 #define VB oxVideoCmnPortReadUchar(Port) \94 #define VBVO_PORT_READ_U8(Port) \ 95 95 inb(Port) 96 96 /** Read a 16-bit value from an I/O port. */ 97 #define VB oxVideoCmnPortReadUshort(Port) \97 #define VBVO_PORT_READ_U16(Port) \ 98 98 inw(Port) 99 99 /** Read a 32-bit value from an I/O port. */ 100 #define VB oxVideoCmnPortReadUlong(Port) \100 #define VBVO_PORT_READ_U32(Port) \ 101 101 inl(Port) 102 102
Note:
See TracChangeset
for help on using the changeset viewer.