Changeset 24053 in vbox
- Timestamp:
- Oct 23, 2009 6:54:16 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.h
r23985 r24053 458 458 int VBVAUpdateDisplay (PVGASTATE pVGAState); 459 459 void VBVAReset (PVGASTATE pVGAState); 460 void HGSMIReset (PHGSMIINSTANCE pIns); 460 461 461 462 # ifdef VBOX_WITH_VIDEOHWACCEL … … 463 464 int vbvaVHWAConstruct (PVGASTATE pVGAState); 464 465 int vbvaVHWADisable (PVGASTATE pVGAState); 466 int vbvaVHWAReset (PVGASTATE pVGAState); 465 467 466 468 int vboxVBVASaveStatePrep (PPDMDEVINS pDevIns, PSSMHANDLE pSSM); -
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r23793 r24053 945 945 } 946 946 947 int vbvaVHWAReset (PVGASTATE pVGAState) 948 { 949 /* ensure we have all pending cmds processed and h->g cmds disabled */ 950 VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(pVGAState, VBOXVHWACMD_TYPE_DISABLE, 0); 951 Assert(pCmd); 952 if(pCmd) 953 { 954 int rc = vbvaVHWAHHCommandPost(pVGAState, pCmd); 955 Assert(RT_SUCCESS(rc)); 956 if(RT_SUCCESS(rc)) 957 { 958 rc = pCmd->rc; 959 Assert(RT_SUCCESS(rc)); 960 vbvaVHWAHHCommandRelease(pCmd); 961 } 962 return rc; 963 } 964 return VERR_OUT_OF_RESOURCES; 965 } 966 947 967 /* @todo call this also on reset? */ 948 968 int vbvaVHWADisable (PVGASTATE pVGAState) … … 1346 1366 VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext (pVGAState->pHGSMI); 1347 1367 1368 #ifdef VBOX_WITH_VIDEOHWACCEL 1369 vbvaVHWAReset (pVGAState); 1370 #endif 1371 1372 HGSMIReset (pVGAState->pHGSMI); 1373 1348 1374 if (pCtx) 1349 1375 { … … 1357 1383 } 1358 1384 } 1385 1359 1386 } 1360 1387 -
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
r24044 r24053 346 346 } 347 347 348 349 /* The the guest has finished processing of a buffer previously submitted by the host. 350 * Called from HGSMI_IO_HOST write handler. 351 * @thread EMT 352 */ 353 void HGSMIHostWrite (HGSMIINSTANCE *pIns, 354 HGSMIOFFSET offBuffer) 355 { 356 LogFlowFunc(("pIns %p offBuffer 0x%x\n", pIns, offBuffer)); 357 348 static bool hgsmiProcessHostCmdCompletion (HGSMIINSTANCE *pIns, 349 HGSMIOFFSET offBuffer, 350 bool bCompleteFirst) 351 { 358 352 VM_ASSERT_EMT(pIns->pVM); 359 353 … … 369 363 Assert(pEntry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_READ)); 370 364 371 if ( pEntry->offBuffer == offBuffer)365 if (bCompleteFirst || pEntry->offBuffer == offBuffer) 372 366 { 373 367 break; … … 386 380 LogFlowFunc(("read list entry: %p.\n", pEntry)); 387 381 388 Assert(pEntry );382 Assert(pEntry || bCompleteFirst); 389 383 390 384 if (pEntry) … … 409 403 hgsmiHostCommandFreeCallback(pEntry); 410 404 #endif 411 } 412 else 413 { 414 hgsmiFIFOUnlock(pIns); 405 return true; 406 } 407 408 hgsmiFIFOUnlock(pIns); 409 if(!bCompleteFirst) 415 410 LogRel(("HGSMI[%s]: ignored invalid write to the host FIFO: 0x%08X!!!\n", pIns->pszName, offBuffer)); 416 } 417 } 411 } 412 return false; 413 } 414 415 /* The the guest has finished processing of a buffer previously submitted by the host. 416 * Called from HGSMI_IO_HOST write handler. 417 * @thread EMT 418 */ 419 void HGSMIHostWrite (HGSMIINSTANCE *pIns, 420 HGSMIOFFSET offBuffer) 421 { 422 LogFlowFunc(("pIns %p offBuffer 0x%x\n", pIns, offBuffer)); 423 424 hgsmiProcessHostCmdCompletion (pIns, offBuffer, false); 418 425 } 419 426 … … 1531 1538 } 1532 1539 1540 void HGSMIReset (PHGSMIINSTANCE pIns) 1541 { 1542 while(hgsmiProcessHostCmdCompletion (pIns, 0, true)) {} 1543 1544 HGSMIHeapSetupUnitialized (&pIns->hostHeap); 1545 } 1546 1533 1547 void HGSMIDestroy (PHGSMIINSTANCE pIns) 1534 1548 {
Note:
See TracChangeset
for help on using the changeset viewer.