Changeset 66685 in vbox for trunk/include
- Timestamp:
- Apr 27, 2017 8:30:52 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 115077
- Location:
- trunk/include/VBox/Graphics
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/Graphics/VBoxVideoGuest.h
r66544 r66685 30 30 #define ___VBox_Graphics_VBoxVideoGuest_h___ 31 31 32 #include <HGSMI.h> 33 #include <HGSMIChSetup.h> 32 #include <HGSMIBuffers.h> 34 33 #include <VBoxVideo.h> 35 34 #include <VBoxVideoIPRT.h> 36 35 37 #ifdef VBOX_WDDM_MINIPORT38 # include "wddm/VBoxMPShgsmi.h"39 typedef VBOXSHGSMI HGSMIGUESTCMDHEAP;40 # define HGSMIGUESTCMDHEAP_GET(_p) (&(_p)->Heap)41 #else42 typedef HGSMIHEAP HGSMIGUESTCMDHEAP;43 # define HGSMIGUESTCMDHEAP_GET(_p) (_p)44 #endif45 46 36 RT_C_DECLS_BEGIN 47 48 /**49 * Structure grouping the context needed for submitting commands to the host50 * via HGSMI51 */52 typedef struct HGSMIGUESTCOMMANDCONTEXT53 {54 /** Information about the memory heap located in VRAM from which data55 * structures to be sent to the host are allocated. */56 HGSMIGUESTCMDHEAP heapCtx;57 /** The I/O port used for submitting commands to the host by writing their58 * offsets into the heap. */59 RTIOPORT port;60 } HGSMIGUESTCOMMANDCONTEXT, *PHGSMIGUESTCOMMANDCONTEXT;61 62 63 /**64 * Structure grouping the context needed for receiving commands from the host65 * via HGSMI66 */67 typedef struct HGSMIHOSTCOMMANDCONTEXT68 {69 /** Information about the memory area located in VRAM in which the host70 * places data structures to be read by the guest. */71 HGSMIAREA areaCtx;72 /** Convenience structure used for matching host commands to handlers. */73 /** @todo handlers are registered individually in code rather than just74 * passing a static structure in order to gain extra flexibility. There is75 * currently no expected usage case for this though. Is the additional76 * complexity really justified? */77 HGSMICHANNELINFO channels;78 /** Flag to indicate that one thread is currently processing the command79 * queue. */80 volatile bool fHostCmdProcessing;81 /* Pointer to the VRAM location where the HGSMI host flags are kept. */82 volatile HGSMIHOSTFLAGS *pfHostFlags;83 /** The I/O port used for receiving commands from the host as offsets into84 * the memory area and sending back confirmations (command completion,85 * IRQ acknowlegement). */86 RTIOPORT port;87 } HGSMIHOSTCOMMANDCONTEXT, *PHGSMIHOSTCOMMANDCONTEXT;88 89 37 90 38 /** … … 112 60 * @{ */ 113 61 114 /** Acknowlege an IRQ. */115 DECLINLINE(void) VBoxHGSMIClearIrq(PHGSMIHOSTCOMMANDCONTEXT pCtx)116 {117 VBVO_PORT_WRITE_U32(pCtx->port, HGSMIOFFSET_VOID);118 }119 120 DECLHIDDEN(void) VBoxHGSMIHostCmdComplete(PHGSMIHOSTCOMMANDCONTEXT pCtx,121 void *pvMem);122 DECLHIDDEN(void) VBoxHGSMIProcessHostQueue(PHGSMIHOSTCOMMANDCONTEXT pCtx);123 62 DECLHIDDEN(bool) VBoxHGSMIIsSupported(void); 124 DECLHIDDEN(void *) VBoxHGSMIBufferAlloc(PHGSMIGUESTCOMMANDCONTEXT pCtx,125 HGSMISIZE cbData,126 uint8_t u8Ch,127 uint16_t u16Op);128 DECLHIDDEN(void) VBoxHGSMIBufferFree(PHGSMIGUESTCOMMANDCONTEXT pCtx,129 void *pvBuffer);130 DECLHIDDEN(int) VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,131 void *pvBuffer);132 63 DECLHIDDEN(void) VBoxHGSMIGetBaseMappingInfo(uint32_t cbVRAM, 133 64 uint32_t *poffVRAMBaseMapping, … … 140 71 DECLHIDDEN(int) VBoxHGSMISendCapsInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx, 141 72 uint32_t fCaps); 142 /** @todo we should provide a cleanup function too as part of the API */143 DECLHIDDEN(int) VBoxHGSMISetupGuestContext(PHGSMIGUESTCOMMANDCONTEXT pCtx,144 void *pvGuestHeapMemory,145 uint32_t cbGuestHeapMemory,146 uint32_t offVRAMGuestHeapMemory,147 const HGSMIENV *pEnv);148 73 DECLHIDDEN(void) VBoxHGSMIGetHostAreaMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx, 149 74 uint32_t cbVRAM, … … 151 76 uint32_t *poffVRAMHostArea, 152 77 uint32_t *pcbHostArea); 153 DECLHIDDEN(void) VBoxHGSMISetupHostContext(PHGSMIHOSTCOMMANDCONTEXT pCtx,154 void *pvBaseMapping,155 uint32_t offHostFlags,156 void *pvHostAreaMapping,157 uint32_t offVRAMHostArea,158 uint32_t cbHostArea);159 78 DECLHIDDEN(int) VBoxHGSMISendHostCtxInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx, 160 79 HGSMIOFFSET offVRAMFlagsLocation,
Note:
See TracChangeset
for help on using the changeset viewer.