VBoxVideoVdma.h revision 3448d69ec2f383fbcb48c0c8e395cd8661103c3c
/*
* Copyright (C) 2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ___VBoxVideoVdma_h___
#define ___VBoxVideoVdma_h___
#include <VBox/VBoxVideo.h>
#include "../VBoxVideo.h"
/* ddi dma command queue handling */
typedef enum
{
typedef struct VBOXVDMADDI_CMD *PVBOXVDMADDI_CMD;
typedef DECLCALLBACK(VOID) FNVBOXVDMADDICMDCOMPLETE_DPC(PDEVICE_EXTENSION pDevExt, PVBOXVDMADDI_CMD pCmd, PVOID pvContext);
typedef struct VBOXVDMADDI_CMD
{
typedef struct VBOXVDMADDI_CMD_QUEUE
{
volatile uint32_t cQueuedCmds;
BOOLEAN vboxVdmaDdiCmdCompletedIrq(PDEVICE_EXTENSION pDevExt, PVBOXVDMADDI_CMD_QUEUE pQueue, PVBOXVDMADDI_CMD pCmd, DXGK_INTERRUPT_TYPE enmComplType);
NTSTATUS vboxVdmaDdiCmdCompleted(PDEVICE_EXTENSION pDevExt, PVBOXVDMADDI_CMD_QUEUE pQueue, PVBOXVDMADDI_CMD pCmd, DXGK_INTERRUPT_TYPE enmComplType);
NTSTATUS vboxVdmaDdiCmdSubmitted(PDEVICE_EXTENSION pDevExt, PVBOXVDMADDI_CMD_QUEUE pQueue, PVBOXVDMADDI_CMD pCmd);
{
}
NTSTATUS vboxVdmaDdiCmdFenceComplete(PDEVICE_EXTENSION pDevExt, PVBOXWDDM_CONTEXT pContext, uint32_t u32FenceId, DXGK_INTERRUPT_TYPE enmComplType);
DECLCALLBACK(VOID) vboxVdmaDdiCmdCompletionCbFree(PDEVICE_EXTENSION pDevExt, PVBOXVDMADDI_CMD pCmd, PVOID pvContext);
DECLINLINE(VOID) vboxVdmaDdiCmdGetCompletedListIsr(PVBOXVDMADDI_CMD_QUEUE pQueue, LIST_ENTRY *pList)
{
}
{
}
#define VBOXVDMADDI_CMD_FROM_ENTRY(_pEntry) ((PVBOXVDMADDI_CMD)(((uint8_t*)(_pEntry)) - RT_OFFSETOF(VBOXVDMADDI_CMD, QueueEntry)))
DECLINLINE(VOID) vboxVdmaDdiCmdHandleCompletedList(PDEVICE_EXTENSION pDevExt, PVBOXVDMADDI_CMD_QUEUE pQueue, LIST_ENTRY *pList)
{
{
if (pCmd->pfnComplete)
}
}
#ifdef VBOXWDDM_RENDER_FROM_SHADOW
NTSTATUS vboxVdmaHlpUpdatePrimary(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, RECT* pRect);
#endif
#if 0
typedef DECLCALLBACK(int) FNVBOXVDMASUBMIT(struct _DEVICE_EXTENSION* pDevExt, struct VBOXVDMAINFO * pInfo, HGSMIOFFSET offDr, PVOID pvContext);
typedef FNVBOXVDMASUBMIT *PFNVBOXVDMASUBMIT;
typedef struct VBOXVDMASUBMIT
{
#endif
/* start */
typedef enum
{
typedef struct VBOXVDMAPIPE
{
/* true iff the other end needs Event notification */
bool bNeedNotify;
typedef struct VBOXVDMAPIPE_CMD_HDR
{
#define VBOXVDMAPIPE_CMD_HDR_FROM_ENTRY(_pE) ( (PVBOXVDMAPIPE_CMD_HDR)((uint8_t *)(_pE) - RT_OFFSETOF(VBOXVDMAPIPE_CMD_HDR, ListEntry)) )
typedef enum
{
typedef struct VBOXVDMAPIPE_CMD_DR
{
#define VBOXVDMAPIPE_CMD_DR_FROM_ENTRY(_pE) ( (PVBOXVDMAPIPE_CMD_DR)VBOXVDMAPIPE_CMD_HDR_FROM_ENTRY(_pE) )
typedef struct VBOXWDDM_DMA_ALLOCINFO
{
typedef struct VBOXVDMAPIPE_RECTS
{
typedef struct VBOXVDMAPIPE_CMD_RECTSINFO
{
struct VBOXWDDM_SWAPCHAIN *pSwapchain;
typedef struct VBOXVDMAPIPE_FLAGS_DMACMD
{
union
{
struct
{
};
};
typedef struct VBOXVDMAPIPE_CMD_DMACMD
{
typedef struct VBOXVDMA_CLRFILL
{
typedef struct VBOXVDMAPIPE_CMD_DMACMD_CLRFILL
{
typedef struct VBOXVDMA_BLT
{
typedef struct VBOXVDMAPIPE_CMD_DMACMD_BLT
{
typedef struct VBOXVDMA_FLIP
{
typedef struct VBOXVDMAPIPE_CMD_DMACMD_FLIP
{
typedef struct VBOXVDMA_SHADOW2PRIMARY
{
typedef struct VBOXVDMAGG
{
} VBOXVDMAGG, *PVBOXVDMAGG;
/* DMA commands are currently submitted over HGSMI */
typedef struct VBOXVDMAINFO
{
#ifdef VBOX_WITH_VDMA
#endif
#if 0
#endif
/* dma-related commands list processed on the guest w/o host part involvement (guest-guest commands) */
#ifdef VBOX_WITH_VDMA
#endif
#if 0
#endif
);
#ifdef VBOX_WITH_VDMA
int vboxVdmaCBufDrSubmit (struct _DEVICE_EXTENSION* pDevExt, PVBOXVDMAINFO pInfo, PVBOXVDMACBUF_DR pDr);
#define VBOXVDMACBUF_DR_DATA_OFFSET() (sizeof (VBOXVDMACBUF_DR))
#define VBOXVDMACBUF_DR_FROM_DDI_CMD(_pCmd) ((PVBOXVDMACBUF_DR)(((uint_8*)(_pCmd)) - RT_OFFSETOF(VBOXVDMACBUF_DR, aGuestData)))
#endif
PVBOXVDMAPIPE_CMD_DR vboxVdmaGgCmdCreate(PVBOXVDMAGG pVdma, VBOXVDMAPIPE_CMD_TYPE enmType, uint32_t cbCmd);
#define VBOXVDMAPIPE_CMD_DR_FROM_DDI_CMD(_pCmd) ((PVBOXVDMAPIPE_CMD_DR)(((uint8_t*)(_pCmd)) - RT_OFFSETOF(VBOXVDMAPIPE_CMD_DR, DdiCmd)))
DECLCALLBACK(VOID) vboxVdmaGgDdiCmdDestroy(PDEVICE_EXTENSION pDevExt, PVBOXVDMADDI_CMD pCmd, PVOID pvContext);
#endif /* #ifndef ___VBoxVideoVdma_h___ */