Changeset 60369 in vbox
- Timestamp:
- Apr 7, 2016 12:14:52 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r60175 r60369 1148 1148 pThis->pDrv->pfnLFBModeChange(pThis->pDrv, (val & VBE_DISPI_ENABLED) != 0); 1149 1149 #ifdef VBOX_WITH_HGSMI 1150 VBVA Pause(pThis, (val & VBE_DISPI_ENABLED) == 0);1150 VBVAOnVBEChanged(pThis); 1151 1151 #endif /* VBOX_WITH_HGSMI */ 1152 1152 … … 5234 5234 AssertRC(rc); 5235 5235 5236 /* This method only works if the VGA device is in a VBE mode. */ 5237 if ((pThis->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) == 0) 5236 /* This method only works if the VGA device is in a VBE mode or not paused VBVA mode. 5237 * VGA modes are reported to the caller by returning VERR_INVALID_STATE. 5238 * 5239 * If VBE_DISPI_ENABLED is set, then it is a VBE or VBE compatible VBVA mode. Both of them can be handled. 5240 * 5241 * If VBE_DISPI_ENABLED is clear, then it is either a VGA mode or a VBVA mode set by guest additions 5242 * which have VBVACAPS_USE_VBVA_ONLY capability. 5243 * When VBE_DISPI_ENABLED is being cleared and VBVACAPS_USE_VBVA_ONLY is not set (i.e. guest wants a VGA mode), 5244 * then VBVAOnVBEChanged makes sure that VBVA is paused. 5245 * That is a not paused VBVA means that the video mode can be handled even if VBE_DISPI_ENABLED is clear. 5246 */ 5247 if ( (pThis->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) == 0 5248 && VBVAIsPaused(pThis)) 5238 5249 { 5239 5250 PDMCritSectLeave(&pThis->CritSect); … … 5639 5650 #ifdef VBOX_WITH_HGSMI 5640 5651 PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE); 5641 VBVAPause(pThis, (pThis->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) == 0);5642 5652 rc = vboxVBVALoadStateDone(pDevIns, pSSM); 5643 5653 AssertRCReturn(rc, rc); … … 5646 5656 AssertRCReturn(rc, rc); 5647 5657 # endif 5658 /* Now update the current VBVA state which depends on VBE registers. vboxVBVALoadStateDone cleared the state. */ 5659 VBVAOnVBEChanged(pThis); 5648 5660 #endif 5649 5661 #ifdef VBOX_WITH_VMSVGA -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r57518 r60369 682 682 void VBVAReset (PVGASTATE pVGAState); 683 683 void VBVAPause (PVGASTATE pVGAState, bool fPause); 684 684 void VBVAOnVBEChanged(PVGASTATE pVGAState); 685 686 bool VBVAIsPaused(PVGASTATE pVGAState); 685 687 bool VBVAIsEnabled(PVGASTATE pVGAState); 686 688 -
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r59307 r60369 2765 2765 } 2766 2766 2767 bool VBVAIsPaused(PVGASTATE pVGAState) 2768 { 2769 if (pVGAState && pVGAState->pHGSMI) 2770 { 2771 const VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext(pVGAState->pHGSMI); 2772 if (pCtx && pCtx->cViews) 2773 { 2774 /* If VBVA is enabled at all. */ 2775 const VBVAVIEW *pView = &pCtx->aViews[0]; 2776 if (pView->vbva.guest.pVBVA) 2777 return pCtx->fPaused; 2778 } 2779 } 2780 /* VBVA is disabled. */ 2781 return true; 2782 } 2783 2784 void VBVAOnVBEChanged(PVGASTATE pVGAState) 2785 { 2786 /* The guest does not depend on host handling the VBE registers. */ 2787 if (pVGAState->fGuestCaps & VBVACAPS_USE_VBVA_ONLY) 2788 { 2789 return; 2790 } 2791 2792 VBVAPause(pVGAState, (pVGAState->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) == 0); 2793 } 2794 2767 2795 void VBVAReset (PVGASTATE pVGAState) 2768 2796 {
Note:
See TracChangeset
for help on using the changeset viewer.