Changeset 67145 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- May 30, 2017 3:11:29 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 115821
- Location:
- trunk/src/VBox/Additions/common/VBoxVideo
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp
r67066 r67145 29 29 #include <VBoxVideoVBE.h> 30 30 #include <VBoxVideoIPRT.h> 31 32 /**33 * Submit a command descriptor allocated by @a VBoxHGSMIBufferAlloc.34 *35 * @param pCtx the context containing the heap used36 * @param pvBuffer the pointer returned by @a VBoxHGSMIBufferAlloc37 */38 DECLHIDDEN(int) VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,39 void *pvBuffer)40 {41 /* Initialize the buffer and get the offset for port IO. */42 HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (HGSMIGUESTCMDHEAP_GET(&pCtx->heapCtx), pvBuffer);43 44 Assert(offBuffer != HGSMIOFFSET_VOID);45 if (offBuffer != HGSMIOFFSET_VOID)46 {47 /* Submit the buffer to the host. */48 VBVO_PORT_WRITE_U32(pCtx->port, offBuffer);49 /* Make the compiler aware that the host has changed memory. */50 ASMCompilerBarrier();51 return VINF_SUCCESS;52 }53 54 return VERR_INVALID_PARAMETER;55 }56 57 31 58 32 /** Detect whether HGSMI is supported by the host. */ -
trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp
r67144 r67145 97 97 #endif 98 98 } 99 100 /** 101 * Submit a command descriptor allocated by @a VBoxHGSMIBufferAlloc. 102 * 103 * @param pCtx the context containing the heap used 104 * @param pvBuffer the pointer returned by @a VBoxHGSMIBufferAlloc 105 */ 106 DECLHIDDEN(int) VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx, 107 void *pvBuffer) 108 { 109 /* Initialize the buffer and get the offset for port IO. */ 110 HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (HGSMIGUESTCMDHEAP_GET(&pCtx->heapCtx), pvBuffer); 111 112 Assert(offBuffer != HGSMIOFFSET_VOID); 113 if (offBuffer != HGSMIOFFSET_VOID) 114 { 115 /* Submit the buffer to the host. */ 116 VBVO_PORT_WRITE_U32(pCtx->port, offBuffer); 117 /* Make the compiler aware that the host has changed memory. */ 118 ASMCompilerBarrier(); 119 return VINF_SUCCESS; 120 } 121 122 return VERR_INVALID_PARAMETER; 123 }
Note:
See TracChangeset
for help on using the changeset viewer.