- 時間撮記:
- 2010-5-21 下午03:58:56 (15 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r28800 r29742 1244 1244 PVGASTATE pVGAState = PPDMIDISPLAYVBVACALLBACKS_2_PVGASTATE(pInterface); 1245 1245 PHGSMIINSTANCE pIns = pVGAState->pHGSMI; 1246 VBVAHOSTCMD *pHostCmd; 1247 // Assert(0); 1248 1249 int32_t iDisplay = pCmd->iDisplay; 1246 1250 1247 Assert(pCmd->Flags & VBOXVHWACMD_FLAG_HG_ASYNCH); 1251 if(pCmd->Flags & VBOXVHWACMD_FLAG_GH_ASYNCH_EVENT) 1252 { 1253 rc = HGSMIHostCommandAlloc (pIns, 1254 (void**)&pHostCmd, 1255 VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDEVENT)), 1256 HGSMI_CH_VBVA, 1257 VBVAHG_EVENT); 1248 #ifdef VBOXVDMA 1249 if (pVGAState->fGuestCaps & VBVACAPS_COMPLETEGCMD_BY_IOREAD) 1250 { 1251 rc = HGSMICompleteGuestCommand(pIns, pCmd, !!(pCmd->Flags & VBOXVHWACMD_FLAG_GH_ASYNCH_IRQ)); 1258 1252 AssertRC(rc); 1259 if(RT_SUCCESS(rc))1260 {1261 memset(pHostCmd, 0 , VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDEVENT)));1262 pHostCmd->iDstID = pCmd->iDisplay;1263 pHostCmd->customOpCode = 0;1264 VBVAHOSTCMDEVENT *pBody = VBVAHOSTCMD_BODY(pHostCmd, VBVAHOSTCMDEVENT);1265 pBody->pEvent = pCmd->GuestVBVAReserved1;1266 }1267 1253 } 1268 1254 else 1269 { 1270 HGSMIOFFSET offCmd = HGSMIPointerToOffsetHost (pIns, pCmd); 1271 Assert(offCmd != HGSMIOFFSET_VOID); 1272 if(offCmd != HGSMIOFFSET_VOID) 1255 #endif 1256 { 1257 VBVAHOSTCMD *pHostCmd; 1258 int32_t iDisplay = pCmd->iDisplay; 1259 1260 if(pCmd->Flags & VBOXVHWACMD_FLAG_GH_ASYNCH_EVENT) 1273 1261 { 1274 1262 rc = HGSMIHostCommandAlloc (pIns, 1275 (void**)&pHostCmd,1276 VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDVHWACMDCOMPLETE)),1277 HGSMI_CH_VBVA,1278 VBVAHG_DISPLAY_CUSTOM);1263 (void**)&pHostCmd, 1264 VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDEVENT)), 1265 HGSMI_CH_VBVA, 1266 VBVAHG_EVENT); 1279 1267 AssertRC(rc); 1280 1268 if(RT_SUCCESS(rc)) 1281 1269 { 1282 memset(pHostCmd, 0 , VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMD VHWACMDCOMPLETE)));1270 memset(pHostCmd, 0 , VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDEVENT))); 1283 1271 pHostCmd->iDstID = pCmd->iDisplay; 1284 pHostCmd->customOpCode = VBVAHG_DCUSTOM_VHWA_CMDCOMPLETE;1285 VBVAHOSTCMD VHWACMDCOMPLETE *pBody = VBVAHOSTCMD_BODY(pHostCmd, VBVAHOSTCMDVHWACMDCOMPLETE);1286 pBody-> offCmd = offCmd;1272 pHostCmd->customOpCode = 0; 1273 VBVAHOSTCMDEVENT *pBody = VBVAHOSTCMD_BODY(pHostCmd, VBVAHOSTCMDEVENT); 1274 pBody->pEvent = pCmd->GuestVBVAReserved1; 1287 1275 } 1288 1276 } 1289 1277 else 1290 1278 { 1291 rc = VERR_INVALID_PARAMETER; 1292 } 1293 } 1294 1295 if(RT_SUCCESS(rc)) 1296 { 1297 rc = HGSMIHostCommandProcessAndFreeAsynch(pIns, pHostCmd, (pCmd->Flags & VBOXVHWACMD_FLAG_GH_ASYNCH_IRQ) != 0); 1298 AssertRC(rc); 1279 HGSMIOFFSET offCmd = HGSMIPointerToOffsetHost (pIns, pCmd); 1280 Assert(offCmd != HGSMIOFFSET_VOID); 1281 if(offCmd != HGSMIOFFSET_VOID) 1282 { 1283 rc = HGSMIHostCommandAlloc (pIns, 1284 (void**)&pHostCmd, 1285 VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDVHWACMDCOMPLETE)), 1286 HGSMI_CH_VBVA, 1287 VBVAHG_DISPLAY_CUSTOM); 1288 AssertRC(rc); 1289 if(RT_SUCCESS(rc)) 1290 { 1291 memset(pHostCmd, 0 , VBVAHOSTCMD_SIZE(sizeof(VBVAHOSTCMDVHWACMDCOMPLETE))); 1292 pHostCmd->iDstID = pCmd->iDisplay; 1293 pHostCmd->customOpCode = VBVAHG_DCUSTOM_VHWA_CMDCOMPLETE; 1294 VBVAHOSTCMDVHWACMDCOMPLETE *pBody = VBVAHOSTCMD_BODY(pHostCmd, VBVAHOSTCMDVHWACMDCOMPLETE); 1295 pBody->offCmd = offCmd; 1296 } 1297 } 1298 else 1299 { 1300 rc = VERR_INVALID_PARAMETER; 1301 } 1302 } 1303 1299 1304 if(RT_SUCCESS(rc)) 1300 1305 { 1301 return rc; 1302 } 1303 HGSMIHostCommandFree (pIns, pHostCmd); 1306 rc = HGSMIHostCommandProcessAndFreeAsynch(pIns, pHostCmd, (pCmd->Flags & VBOXVHWACMD_FLAG_GH_ASYNCH_IRQ) != 0); 1307 AssertRC(rc); 1308 if(RT_SUCCESS(rc)) 1309 { 1310 return rc; 1311 } 1312 HGSMIHostCommandFree (pIns, pHostCmd); 1313 } 1304 1314 } 1305 1315 } … … 1621 1631 #endif 1622 1632 1633 #ifdef VBOXVDMA 1634 case VBVA_INFO_CAPS: 1635 { 1636 if (cbBuffer < sizeof (VBVACAPS)) 1637 { 1638 rc = VERR_INVALID_PARAMETER; 1639 break; 1640 } 1641 1642 VBVACAPS *pCaps = (VBVACAPS*)pvBuffer; 1643 pVGAState->fGuestCaps = pCaps->fCaps; 1644 pCaps->rc = VINF_SUCCESS; 1645 } break; 1646 #endif 1623 1647 default: 1624 1648 Log(("Unsupported VBVA guest command %d!!!\n",
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器