Changeset 67066 in vbox for trunk/include/VBox/Graphics/HGSMIBase.h
- Timestamp:
- May 24, 2017 1:37:42 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 115725
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/Graphics/HGSMIBase.h
r67065 r67066 25 25 26 26 27 #ifndef ___VBox_Graphics_HGSMIB uffers_h___28 #define ___VBox_Graphics_HGSMIB uffers_h___27 #ifndef ___VBox_Graphics_HGSMIBase_h___ 28 #define ___VBox_Graphics_HGSMIBase_h___ 29 29 30 30 #include <HGSMI.h> 31 #include <HGSMIC hSetup.h>31 #include <HGSMIContext.h> 32 32 #include <VBoxVideoIPRT.h> 33 33 34 #ifdef VBOX_WDDM_MINIPORT35 # include "wddm/VBoxMPShgsmi.h"36 typedef VBOXSHGSMI HGSMIGUESTCMDHEAP;37 # define HGSMIGUESTCMDHEAP_GET(_p) (&(_p)->Heap)38 #else39 typedef HGSMIHEAP HGSMIGUESTCMDHEAP;40 # define HGSMIGUESTCMDHEAP_GET(_p) (_p)41 #endif42 43 34 RT_C_DECLS_BEGIN 44 45 /**46 * Structure grouping the context needed for submitting commands to the host47 * via HGSMI48 */49 typedef struct HGSMIGUESTCOMMANDCONTEXT50 {51 /** Information about the memory heap located in VRAM from which data52 * structures to be sent to the host are allocated. */53 HGSMIGUESTCMDHEAP heapCtx;54 /** The I/O port used for submitting commands to the host by writing their55 * offsets into the heap. */56 RTIOPORT port;57 } HGSMIGUESTCOMMANDCONTEXT, *PHGSMIGUESTCOMMANDCONTEXT;58 59 60 /**61 * Structure grouping the context needed for receiving commands from the host62 * via HGSMI63 */64 typedef struct HGSMIHOSTCOMMANDCONTEXT65 {66 /** Information about the memory area located in VRAM in which the host67 * places data structures to be read by the guest. */68 HGSMIAREA areaCtx;69 /** Convenience structure used for matching host commands to handlers. */70 /** @todo handlers are registered individually in code rather than just71 * passing a static structure in order to gain extra flexibility. There is72 * currently no expected usage case for this though. Is the additional73 * complexity really justified? */74 HGSMICHANNELINFO channels;75 /** Flag to indicate that one thread is currently processing the command76 * queue. */77 volatile bool fHostCmdProcessing;78 /* Pointer to the VRAM location where the HGSMI host flags are kept. */79 volatile HGSMIHOSTFLAGS *pfHostFlags;80 /** The I/O port used for receiving commands from the host as offsets into81 * the memory area and sending back confirmations (command completion,82 * IRQ acknowlegement). */83 RTIOPORT port;84 } HGSMIHOSTCOMMANDCONTEXT, *PHGSMIHOSTCOMMANDCONTEXT;85 35 86 36 /** @name Base HGSMI Buffer APIs … … 93 43 } 94 44 95 DECLHIDDEN(void) VBoxHGSMISetupHostContext(PHGSMIHOSTCOMMANDCONTEXT pCtx,96 void *pvBaseMapping,97 uint32_t offHostFlags,98 void *pvHostAreaMapping,99 uint32_t offVRAMHostArea,100 uint32_t cbHostArea);101 DECLHIDDEN(void) VBoxHGSMIHostCmdComplete(PHGSMIHOSTCOMMANDCONTEXT pCtx,102 void *pvMem);103 DECLHIDDEN(void) VBoxHGSMIProcessHostQueue(PHGSMIHOSTCOMMANDCONTEXT pCtx);104 /** @todo we should provide a cleanup function too as part of the API */105 DECLHIDDEN(int) VBoxHGSMISetupGuestContext(PHGSMIGUESTCOMMANDCONTEXT pCtx,106 void *pvGuestHeapMemory,107 uint32_t cbGuestHeapMemory,108 uint32_t offVRAMGuestHeapMemory,109 const HGSMIENV *pEnv);110 45 DECLHIDDEN(void *) VBoxHGSMIBufferAlloc(PHGSMIGUESTCOMMANDCONTEXT pCtx, 111 46 HGSMISIZE cbData,
Note:
See TracChangeset
for help on using the changeset viewer.