vbox.c revision d1bf0617b0c08b530ed5dcdcc1d6dbd7eb2ed2fc
/* $Id$ */
/** @file
* Display - VirtualBox Win 2000/XP guest display driver, support functions.
*/
/*
* Copyright (C) 2006-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.
*/
#include "driver.h"
#include <VBox/VBoxGuest.h>
#include <iprt/asm-amd64-x86.h>
{
if (ppdev->bHGSMISupported)
{
ppdev->lDeltaScreen > 0
}
return;
}
#ifdef VBOX_WITH_VIDEOHWACCEL
{
if (!pHdr)
{
LogFunc(("HGSMIHeapAlloc failed\n"));
}
else
{
}
/* temporary hack */
return pHdr;
}
{
}
static DECLCALLBACK(void) vboxVHWACommandCompletionCallbackEvent(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext)
{
}
{
VBOXVHWACMD* pComplCmd = (VBOXVHWACMD*)HGSMIOffsetToPointer (&ppdev->guestCtx.heapCtx.area, pComplete->offCmd);
return 0;
}
{
int rc = VINF_SUCCESS;
switch(pCmd->customOpCode)
{
# ifdef VBOX_WITH_VIDEOHWACCEL /** @todo why is this ifdef nested within itself? */
{
break;
}
# endif
default:
{
Assert(0);
}
}
}
{
/* don't assert here, otherwise NT4 will be unhappy */
if(RT_SUCCESS(rc))
{
{
}
}
}
{
// Assert(0);
pCmd->GuestVBVAReserved2 = 0;
/* ensure the command is not removed until we're processing it */
/* complete it asynchronously by setting event */
{
/* the command is completed */
}
}
{
VBOXVP_STATUS rc = ppdev->VideoPortProcs.pfnCreateEvent(ppdev->pVideoPortContext, VBOXNOTIFICATION_EVENT, NULL, &pEvent);
/* don't assert here, otherwise NT4 will be unhappy */
if(rc == VBOXNO_ERROR)
{
NULL /*IN PLARGE_INTEGER pTimeOut*/
);
if(rc == VBOXNO_ERROR)
{
}
}
return rc == VBOXNO_ERROR;
}
/* do not wait for completion */
void vboxVHWACommandSubmitAsynch (PPDEV ppdev, VBOXVHWACMD* pCmd, PFNVBOXVHWACMDCOMPLETION pfnCompletion, void * pContext)
{
// Assert(0);
{
/* the command is completed */
}
}
static DECLCALLBACK(void) vboxVHWAFreeCmdCompletion(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext)
{
}
{
// Assert(0);
{
/* the command is completed */
}
}
{
}
{
}
{
VBOXVHWACMD* pCmd = vboxVHWACommandCreate (ppdev, VBOXVHWACMD_TYPE_QUERY_INFO1, sizeof(VBOXVHWACMD_QUERYINFO1));
if (!pCmd)
{
DISPDBG((0, "VBoxDISP::vboxVHWAQueryHostInfo1: vboxVHWACommandCreate failed\n"));
return NULL;
}
if (!pCmd)
{
DISPDBG((0, "VBoxDISP::vboxVHWAQueryHostInfo1: vboxVHWACommandCreate failed\n"));
return NULL;
}
{
{
}
}
return NULL;
}
{
VBOXVHWACMD* pCmd = vboxVHWACommandCreate (ppdev, VBOXVHWACMD_TYPE_QUERY_INFO2, VBOXVHWAINFO2_SIZE(numFourCC));
if (!pCmd)
{
DISPDBG((0, "VBoxDISP::vboxVHWAQueryHostInfo2: vboxVHWACommandCreate failed\n"));
return NULL;
}
{
{
{
return pInfo2;
}
}
}
return NULL;
}
{
if (!ppdev->bHGSMISupported)
return VERR_NOT_SUPPORTED;
if(!pInfo)
{
return VERR_OUT_OF_RESOURCES;
}
return VINF_SUCCESS;
}
{
int rc = VINF_SUCCESS;
if (!ppdev->bHGSMISupported)
return VERR_NOT_SUPPORTED;
if(!pInfo)
return VERR_OUT_OF_RESOURCES;
{
}
else
{
Assert(0);
}
return rc;
}
{
int rc = VERR_GENERAL_FAILURE;
if (!ppdev->bHGSMISupported)
return VERR_NOT_SUPPORTED;
if (!pCmd)
{
DISPDBG((0, "VBoxDISP::vboxVHWAEnable: vboxVHWACommandCreate failed\n"));
return rc;
}
{
{
rc = VINF_SUCCESS;
}
}
return rc;
}
{
int rc = VERR_GENERAL_FAILURE;
if (!ppdev->bHGSMISupported)
return VERR_NOT_SUPPORTED;
if (!pCmd)
{
DISPDBG((0, "VBoxDISP::vboxVHWADisable: vboxVHWACommandCreate failed\n"));
return rc;
}
{
{
rc = VINF_SUCCESS;
}
}
return rc;
}
{
NULL,
0,
&info,
sizeof(info),
if(!err)
{
}
else
}
#endif
{
}