VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoShgsmi.h@ 27055

Last change on this file since 27055 was 26556, checked in by vboxsync, 15 years ago

wddm: more impl

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1/*
2 * Copyright (C) 2010 Sun Microsystems, Inc.
3 *
4 * This file is part of VirtualBox Open Source Edition (OSE), as
5 * available from http://www.virtualbox.org. This file is free software;
6 * you can redistribute it and/or modify it under the terms of the GNU
7 * General Public License (GPL) as published by the Free Software
8 * Foundation, in version 2 as it comes in the "COPYING" file of the
9 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
10 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
11 *
12 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
13 * Clara, CA 95054 USA or visit http://www.sun.com if you need
14 * additional information or have any questions.
15 */
16#ifndef ___VBoxVideoShgsmi_h___
17#define ___VBoxVideoShgsmi_h___
18
19#include <iprt/cdefs.h>
20#include <VBox/VBoxVideo.h>
21
22typedef DECLCALLBACK(void) FNVBOXSHGSMICMDCOMPLETION(struct _HGSMIHEAP * pHeap, void *pvCmd, void *pvContext);
23typedef FNVBOXSHGSMICMDCOMPLETION *PFNVBOXSHGSMICMDCOMPLETION;
24
25typedef DECLCALLBACK(void) FNVBOXSHGSMICMDCOMPLETION_IRQ(struct _HGSMIHEAP * pHeap, void *pvCmd, void *pvContext,
26 PFNVBOXSHGSMICMDCOMPLETION *ppfnCompletion, void **ppvCompletion);
27typedef FNVBOXSHGSMICMDCOMPLETION_IRQ *PFNVBOXSHGSMICMDCOMPLETION_IRQ;
28
29typedef struct VBOXSHGSMILIST_ENTRY
30{
31 struct VBOXSHGSMILIST_ENTRY *pNext;
32} VBOXSHGSMILIST_ENTRY, *PVBOXSHGSMILIST_ENTRY;
33
34typedef struct VBOXSHGSMILIST
35{
36 PVBOXSHGSMILIST_ENTRY pFirst;
37 PVBOXSHGSMILIST_ENTRY pLast;
38} VBOXSHGSMILIST, *PVBOXSHGSMILIST;
39
40DECLINLINE(bool) vboxSHGSMIListIsEmpty(PVBOXSHGSMILIST pList)
41{
42 return !pList->pFirst;
43}
44
45DECLINLINE(void) vboxSHGSMIListInit(PVBOXSHGSMILIST pList)
46{
47 pList->pFirst = pList->pLast = NULL;
48}
49
50DECLINLINE(void) vboxSHGSMIListPut(PVBOXSHGSMILIST pList, PVBOXSHGSMILIST_ENTRY pFirst, PVBOXSHGSMILIST_ENTRY pLast)
51{
52 Assert(pFirst);
53 Assert(pLast);
54 if (pList->pLast)
55 {
56 Assert(pList->pFirst);
57 pList->pLast->pNext = pFirst;
58 pList->pLast = pLast;
59 pLast->pNext = NULL;
60 }
61 else
62 {
63 Assert(!pList->pFirst);
64 pList->pFirst = pFirst;
65 pList->pLast = pLast;
66 }
67}
68
69DECLINLINE(void) vboxSHGSMIListCat(PVBOXSHGSMILIST pList1, PVBOXSHGSMILIST pList2)
70{
71 vboxSHGSMIListPut(pList1, pList2->pFirst, pList2->pLast);
72 pList2->pFirst = pList2->pLast = NULL;
73}
74
75DECLINLINE(void) vboxSHGSMICmdListDetach(PVBOXSHGSMILIST pList, PVBOXSHGSMILIST_ENTRY *ppFirst, PVBOXSHGSMILIST_ENTRY *ppLast)
76{
77 *ppFirst = pList->pFirst;
78 if (ppLast)
79 *ppLast = pList->pLast;
80 pList->pFirst = NULL;
81 pList->pLast = NULL;
82}
83
84DECLINLINE(void) vboxSHGSMICmdListDetach2List(PVBOXSHGSMILIST pList, PVBOXSHGSMILIST pDstList)
85{
86 vboxSHGSMICmdListDetach(pList, &pDstList->pFirst, &pDstList->pLast);
87}
88
89void VBoxSHGSMICommandSubmitAsynch (struct _HGSMIHEAP *pHeap, PVOID pvBuff, FNVBOXSHGSMICMDCOMPLETION pfnCompletion, PVOID pvCompletion, uint32_t fFlags);
90void VBoxSHGSMICommandSubmitAsynchIrq (struct _HGSMIHEAP * pHeap, PVOID pvBuff, PFNVBOXSHGSMICMDCOMPLETION_IRQ pfnCompletion, PVOID pvCompletion, uint32_t fFlags);
91void VBoxSHGSMICommandSubmitAsynchEvent (struct _HGSMIHEAP * pHeap, PVOID pvBuff, RTSEMEVENT hEventSem);
92int VBoxSHGSMICommandSubmitSynch (struct _HGSMIHEAP * pHeap, PVOID pCmd);
93int VBoxSHGSMICommandSubmitSynchCompletion (struct _HGSMIHEAP * pHeap, PVOID pCmd);
94void* VBoxSHGSMICommandAlloc (struct _HGSMIHEAP * pHeap, HGSMISIZE cbData, uint8_t u8Channel, uint16_t u16ChannelInfo);
95void VBoxSHGSMICommandFree (struct _HGSMIHEAP * pHeap, void *pvBuffer);
96int VBoxSHGSMICommandProcessCompletion (struct _HGSMIHEAP * pHeap, HGSMIOFFSET offCmd, bool bIrq, PVBOXSHGSMILIST pPostProcessList);
97int VBoxSHGSMICommandPostprocessCompletion (struct _HGSMIHEAP * pHeap, PVBOXSHGSMILIST pPostProcessList);
98
99void vboxSHGSMICbCommandWrite(struct _HGSMIHEAP * pHeap, HGSMIOFFSET data);
100
101#endif /* #ifndef ___VBoxVideoShgsmi_h___ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette