VirtualBox

忽略:
時間撮記:
2010-9-6 上午04:52:56 (14 年 以前)
作者:
vboxsync
訊息:

wddm: 1. guest installler integration (uninstall needs additional fixing), 2. dev/vga saved state fixes, 3. better split video dma and wddm 4. separate wddm wine libs, 5. etc.

位置:
trunk/src/VBox/Devices/Graphics/HGSMI
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp

    r28800 r32241  
    148148    HGSMILIST hostFIFOProcessed;       /* Processed by the guest. */
    149149    HGSMILIST hostFIFOFree;            /* Buffers for reuse. */
    150 #ifdef VBOXVDMA
     150#ifdef VBOXWDDM
    151151    HGSMILIST guestCmdCompleted;       /* list of completed guest commands to be returned to the guest*/
    152152#endif
     
    210210static DECLCALLBACK(void) hgsmiHostCommandFreeCallback (void *pvCallback);
    211211
    212 #ifdef VBOXVDMA
     212#ifdef VBOXWDDM
    213213
    214214typedef struct _HGSMIGUESTCOMPLENTRY
     
    369369}
    370370
     371#ifdef VBOXWDDM
     372static HGSMIOFFSET hgsmiProcessGuestCmdCompletion(HGSMIINSTANCE *pIns)
     373{
     374    HGSMIOFFSET offCmd = HGSMIOFFSET_VOID;
     375    int rc = hgsmiFIFOLock(pIns);
     376    AssertRC(rc);
     377    if(RT_SUCCESS(rc))
     378    {
     379        /* Get the host FIFO head entry. */
     380        HGSMILISTENTRY *pHead = pIns->guestCmdCompleted.pHead;
     381        if(pHead)
     382            hgsmiListRemove (&pIns->guestCmdCompleted, pHead, NULL);
     383
     384        if(!pIns->guestCmdCompleted.pHead)
     385            pIns->pHGFlags->u32HostFlags &= (~HGSMIHOSTFLAGS_GCOMMAND_COMPLETED);
     386
     387        hgsmiFIFOUnlock(pIns);
     388
     389        if (pHead)
     390        {
     391            HGSMIGUESTCOMPLENTRY *pEntry = HGSMILISTENTRY_2_HGSMIGUESTCOMPLENTRY(pHead);
     392            offCmd = pEntry->offBuffer;
     393
     394            LogFlowFunc(("host FIFO head %p.\n", pEntry));
     395
     396            hgsmiGuestCompletionFIFOFree (pIns, pEntry);
     397        }
     398    }
     399    return offCmd;
     400}
     401#endif
     402
     403
    371404/* Called from HGSMI_IO_GUEST read handler. */
    372405HGSMIOFFSET HGSMIGuestRead (PHGSMIINSTANCE pIns)
     
    378411    VM_ASSERT_EMT(pIns->pVM);
    379412
    380 #ifndef VBOXVDMA
     413#ifndef VBOXWDDM
    381414    /* Currently there is no functionality here. */
    382415    NOREF(pIns);
     
    386419    /* use this to speedup guest cmd completion
    387420     * this mechanism is alternative to submitting H->G command for notification */
    388     HGSMIOFFSET offCmd = HGSMIOFFSET_VOID;
    389     int rc = hgsmiFIFOLock(pIns);
    390     AssertRC(rc);
    391     if(RT_SUCCESS(rc))
    392     {
    393         /* Get the host FIFO head entry. */
    394         HGSMILISTENTRY *pHead = pIns->guestCmdCompleted.pHead;
    395         if(pHead)
    396             hgsmiListRemove (&pIns->guestCmdCompleted, pHead, NULL);
    397 
    398         if(!pIns->guestCmdCompleted.pHead)
    399             pIns->pHGFlags->u32HostFlags &= (~HGSMIHOSTFLAGS_GCOMMAND_COMPLETED);
    400 
    401         hgsmiFIFOUnlock(pIns);
    402 
    403         if (pHead)
    404         {
    405             HGSMIGUESTCOMPLENTRY *pEntry = HGSMILISTENTRY_2_HGSMIGUESTCOMPLENTRY(pHead);
    406             offCmd = pEntry->offBuffer;
    407 
    408             LogFlowFunc(("host FIFO head %p.\n", pEntry));
    409 
    410             hgsmiGuestCompletionFIFOFree (pIns, pEntry);
    411         }
    412     }
    413     /* Special value that means there is no host buffers to be processed. */
     421    HGSMIOFFSET offCmd = hgsmiProcessGuestCmdCompletion(pIns);
    414422    return offCmd;
    415423#endif
     
    12481256            rc = hgsmiHostSaveFifoLocked (&pIns->hostFIFORead, pSSM); AssertRC(rc);
    12491257            rc = hgsmiHostSaveFifoLocked (&pIns->hostFIFOProcessed, pSSM); AssertRC(rc);
     1258#ifdef VBOXWDDM
     1259            rc = hgsmiHostSaveFifoLocked (&pIns->guestCmdCompleted, pSSM); AssertRC(rc);
     1260#endif
    12501261
    12511262            hgsmiFIFOUnlock (pIns);
     
    13111322                if (RT_SUCCESS(rc))
    13121323                    rc = hgsmiHostLoadFifoLocked (pIns, &pIns->hostFIFOProcessed, pSSM);
     1324#ifdef VBOXWDDM
     1325                if (RT_SUCCESS(rc) && u32Version > VGA_SAVEDSTATE_VERSION_PRE_WDDM)
     1326                    rc = hgsmiHostLoadFifoLocked (pIns, &pIns->hostFIFOProcessed, pSSM);
     1327#endif
    13131328
    13141329                hgsmiFIFOUnlock (pIns);
     
    16321647    while(hgsmiProcessHostCmdCompletion (pIns, 0, true)) {}
    16331648
     1649#ifdef VBOXWDDM
     1650    while(hgsmiProcessGuestCmdCompletion(pIns) != HGSMIOFFSET_VOID) {}
     1651#endif
     1652
    16341653    HGSMIHeapSetupUnitialized (&pIns->hostHeap);
    16351654
     
    16661685}
    16671686
    1668 #ifdef VBOXVDMA
     1687#ifdef VBOXWDDM
    16691688
    16701689static int hgsmiGuestCommandComplete (HGSMIINSTANCE *pIns, HGSMIOFFSET offMem)
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h

    r28800 r32241  
    132132int HGSMIHostSaveStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM);
    133133
    134 #ifdef VBOXVDMA
     134#ifdef VBOXWDDM
    135135int HGSMICompleteGuestCommand(PHGSMIINSTANCE pIns, void *pvMem, bool bDoIrq);
    136136#endif
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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