1 | /*
|
---|
2 | * Copyright (C) 2010 Oracle Corporation
|
---|
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 | #ifndef ___VBoxVideoVdma_h___
|
---|
13 | #define ___VBoxVideoVdma_h___
|
---|
14 |
|
---|
15 | #include <iprt/cdefs.h>
|
---|
16 | #include <VBox/VBoxVideo.h>
|
---|
17 | #include "../VBoxVideo.h"
|
---|
18 |
|
---|
19 | #if 0
|
---|
20 | typedef DECLCALLBACK(int) FNVBOXVDMASUBMIT(struct _DEVICE_EXTENSION* pDevExt, struct VBOXVDMAINFO * pInfo, HGSMIOFFSET offDr, PVOID pvContext);
|
---|
21 | typedef FNVBOXVDMASUBMIT *PFNVBOXVDMASUBMIT;
|
---|
22 |
|
---|
23 | typedef struct VBOXVDMASUBMIT
|
---|
24 | {
|
---|
25 | PFNVBOXVDMASUBMIT pfnSubmit;
|
---|
26 | PVOID pvContext;
|
---|
27 | } VBOXVDMASUBMIT, *PVBOXVDMASUBMIT;
|
---|
28 | #endif
|
---|
29 |
|
---|
30 | /* DMA commands are currently submitted over HGSMI */
|
---|
31 | typedef struct VBOXVDMAINFO
|
---|
32 | {
|
---|
33 | HGSMIHEAP CmdHeap;
|
---|
34 | UINT uLastCompletedPagingBufferCmdFenceId;
|
---|
35 | BOOL fEnabled;
|
---|
36 | #if 0
|
---|
37 | VBOXVDMASUBMIT Submitter;
|
---|
38 | #endif
|
---|
39 | } VBOXVDMAINFO, *PVBOXVDMAINFO;
|
---|
40 |
|
---|
41 | int vboxVdmaCreate (struct _DEVICE_EXTENSION* pDevExt, VBOXVDMAINFO *pInfo, ULONG offBuffer, ULONG cbBuffer
|
---|
42 | #if 0
|
---|
43 | , PFNVBOXVDMASUBMIT pfnSubmit, PVOID pvContext
|
---|
44 | #endif
|
---|
45 | );
|
---|
46 | int vboxVdmaDisable (struct _DEVICE_EXTENSION* pDevExt, PVBOXVDMAINFO pInfo);
|
---|
47 | int vboxVdmaEnable (struct _DEVICE_EXTENSION* pDevExt, PVBOXVDMAINFO pInfo);
|
---|
48 | int vboxVdmaFlush (struct _DEVICE_EXTENSION* pDevExt, PVBOXVDMAINFO pInfo);
|
---|
49 | int vboxVdmaDestroy (struct _DEVICE_EXTENSION* pDevExt, PVBOXVDMAINFO pInfo);
|
---|
50 | int vboxVdmaCBufDrSubmit (struct _DEVICE_EXTENSION* pDevExt, PVBOXVDMAINFO pInfo, PVBOXVDMACBUF_DR pDr);
|
---|
51 | struct VBOXVDMACBUF_DR* vboxVdmaCBufDrCreate (PVBOXVDMAINFO pInfo, uint32_t cbTrailingData);
|
---|
52 | void vboxVdmaCBufDrFree (PVBOXVDMAINFO pInfo, struct VBOXVDMACBUF_DR* pDr);
|
---|
53 |
|
---|
54 | #define VBOXVDMACBUF_DR_DATA_OFFSET() (sizeof (VBOXVDMACBUF_DR))
|
---|
55 | #define VBOXVDMACBUF_DR_SIZE(_cbData) (VBOXVDMACBUF_DR_DATA_OFFSET() + (_cbData))
|
---|
56 | #define VBOXVDMACBUF_DR_DATA(_pDr) ( ((uint8_t*)(_pDr)) + VBOXVDMACBUF_DR_DATA_OFFSET() )
|
---|
57 | #endif /* #ifndef ___VBoxVideoVdma_h___ */
|
---|