VirtualBox

Changeset 24931 in vbox for trunk/src


Ignore:
Timestamp:
Nov 25, 2009 10:19:40 AM (15 years ago)
Author:
vboxsync
Message:

DisplayImpl: VBVA lock (xTracker 4463).

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r24924 r24931  
    13221322        mpVbvaMemory->indexRecordFree = 0;
    13231323
     1324#ifdef VBOX_WITH_OLD_VBVA_LOCK
     1325        mfu32PendingVideoAccelDisable = false;
     1326#endif /* VBOX_WITH_OLD_VBVA_LOCK */
     1327
    13241328        LogRel(("VBVA: Enabled.\n"));
    13251329    }
     
    22812285}
    22822286
     2287#ifdef VBOX_WITH_OLD_VBVA_LOCK
     2288int Display::DrawToScreenEMT(Display *pDisplay, BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height)
     2289{
     2290    int rc;
     2291    pDisplay->vbvaLock();
     2292    rc = pDisplay->mpDrv->pUpPort->pfnDisplayBlt(pDisplay->mpDrv->pUpPort, address, x, y, width, height);
     2293    pDisplay->vbvaUnlock();
     2294    return rc;
     2295}
     2296#endif /* VBOX_WITH_OLD_VBVA_LOCK */
    22832297
    22842298STDMETHODIMP Display::DrawToScreen (BYTE *address, ULONG x, ULONG y,
     
    23142328     */
    23152329#ifdef VBOX_WITH_OLD_VBVA_LOCK
    2316     int rcVBox = 0;
    2317 // @todo vbva   int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)Display::DrawToScreenEMT, 6,
    2318 //                                  this, address, x, y, width, height);
     2330    int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)Display::DrawToScreenEMT, 6,
     2331                                 this, address, x, y, width, height);
    23192332#else
    23202333    int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)mpDrv->pUpPort->pfnDisplayBlt, 6,
     
    23472360}
    23482361
     2362#ifdef VBOX_WITH_OLD_VBVA_LOCK
     2363void Display::InvalidateAndUpdateEMT(Display *pDisplay)
     2364{
     2365    pDisplay->vbvaLock();
     2366    pDisplay->mpDrv->pUpPort->pfnUpdateDisplayAll(pDisplay->mpDrv->pUpPort);
     2367    pDisplay->vbvaUnlock();
     2368}
     2369#endif /* VBOX_WITH_OLD_VBVA_LOCK */
     2370
    23492371/**
    23502372 * Does a full invalidation of the VM display and instructs the VM
     
    23762398    /* pdm.h says that this has to be called from the EMT thread */
    23772399#ifdef VBOX_WITH_OLD_VBVA_LOCK
    2378     int rcVBox = 0;
    2379 // #todo vbva    int rcVBox = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Display::InvalidateAndUpdateEMT,
    2380 //                                     1, this);
     2400    int rcVBox = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Display::InvalidateAndUpdateEMT,
     2401                                     1, this);
    23812402#else
    23822403    int rcVBox = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY,
     
    27092730                /* No VBVA do a display update. */
    27102731                DISPLAYFBINFO *pFBInfo = &pDisplay->maFramebuffers[VBOX_VIDEO_PRIMARY_SCREEN];
    2711                 if (!pFBInfo->pFramebuffer.isNull())
     2732                if (!pFBInfo->pFramebuffer.isNull() && pFBInfo->u32ResizeStatus == ResizeStatus_Void)
    27122733                {
    27132734                    Assert(pDrv->Connector.pu8Data);
    2714                     Assert(pFBInfo->u32ResizeStatus == ResizeStatus_Void);
     2735                    pDisplay->vbvaLock();
    27152736                    pDrv->pUpPort->pfnUpdateDisplay(pDrv->pUpPort);
     2737                    pDisplay->vbvaUnlock();
    27162738                }
    27172739            }
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r24924 r24931  
    351351
    352352private:
     353    static void InvalidateAndUpdateEMT(Display *pDisplay);
     354    static int DrawToScreenEMT(Display *pDisplay, BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height);
     355
    353356    int videoAccelRefreshProcess(void);
    354357
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette