VirtualBox

Ignore:
Timestamp:
Mar 12, 2010 5:44:11 PM (15 years ago)
Author:
vboxsync
Message:

wddm: basics for DMA commands support in graphics device impl

Location:
trunk/src/VBox/Devices/Graphics/HGSMI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHostHlp.h

    r26969 r27339  
    4040
    4141void hgsmiListAppend (HGSMILIST *pList, HGSMILISTENTRY *pEntry);
     42DECLINLINE(void) hgsmiListPrepend (HGSMILIST *pList, HGSMILISTENTRY *pEntry)
     43{
     44    HGSMILISTENTRY * pHead = pList->pHead;
     45    pList->pHead = pEntry;
     46    pEntry->pNext = pHead;
     47    if (!pHead)
     48        pList->pTail = pEntry;
     49}
     50
    4251void hgsmiListRemove (HGSMILIST *pList, HGSMILISTENTRY *pEntry, HGSMILISTENTRY *pPrev);
    4352
     
    6372HGSMILISTENTRY * hgsmiListRemoveAll (HGSMILIST *pList, HGSMILISTENTRY ** ppTail /* optional */);
    6473
     74DECLINLINE(void) hgsmiListAppendAll (HGSMILIST *pList, HGSMILISTENTRY *pHead, HGSMILISTENTRY *pTail)
     75{
     76    if(hgsmiListIsEmpty (pList))
     77    {
     78        pList->pHead = pHead;
     79        pList->pTail = pTail;
     80    }
     81    else
     82    {
     83        pList->pTail->pNext = pHead;
     84        pList->pTail = pTail;
     85    }
     86}
     87
     88DECLINLINE(void) hgsmiListPrependAll (HGSMILIST *pList, HGSMILISTENTRY *pHead, HGSMILISTENTRY *pTail)
     89{
     90    HGSMILISTENTRY *pOldHead = pList->pHead;
     91    if(!pOldHead)
     92    {
     93        pList->pHead = pHead;
     94        pList->pTail = pTail;
     95    }
     96    else
     97    {
     98        pList->pHead = pHead;
     99        pTail->pNext = pOldHead;
     100    }
     101}
     102
     103DECLINLINE(void) hgsmiListCat (HGSMILIST *pList, HGSMILIST *pList2)
     104{
     105    hgsmiListAppendAll (pList, pList2->pHead, pList2->pTail);
     106    hgsmiListInit (pList2);
     107}
     108
     109DECLINLINE(void) hgsmiListPrepCat (HGSMILIST *pList, HGSMILIST *pList2)
     110{
     111    hgsmiListPrependAll (pList, pList2->pHead, pList2->pTail);
     112    hgsmiListInit (pList2);
     113}
     114
    65115
    66116#endif /* !__HGSMIHostHlp_h__*/
  • trunk/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.cpp

    r26969 r27339  
    4040}
    4141
    42 int VBoxSHGSMICommandCompleteAsynch (PHGSMIINSTANCE pIns, void *pvData)
     42int VBoxSHGSMICommandComplete (PHGSMIINSTANCE pIns, void *pvData)
    4343{
    4444    PVBOXSHGSMIHEADER pHdr = VBoxSHGSMIBufferHeader (pvData);
    45     Assert(!!(pHdr->fFlags & VBOXSHGSMI_FLAG_HG_ASYNCH));
    46     return vboxSHGSMICommandCompleteAsynch (pIns, pHdr);
    47 }
    48 
    49 int VBoxSHGSMICommandCompleteSynch (PHGSMIINSTANCE pIns, void *pvData)
    50 {
    51     PVBOXSHGSMIHEADER pHdr = VBoxSHGSMIBufferHeader (pvData);
    52     Assert(!(pHdr->fFlags & VBOXSHGSMI_FLAG_HG_ASYNCH));
    53     if (vboxSHGSMICommandCanCompleteSynch(pHdr))
     45    if (!(pHdr->fFlags & VBOXSHGSMI_FLAG_HG_ASYNCH) /* <- check if synchronous completion */
     46            && vboxSHGSMICommandCanCompleteSynch(pHdr)) /* <- check if can complete synchronously */
    5447        return VINF_SUCCESS;
    5548    pHdr->fFlags |= VBOXSHGSMI_FLAG_HG_ASYNCH;
  • trunk/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.h

    r26969 r27339  
    1919#include "HGSMIHost.h"
    2020
    21 int VBoxSHGSMICommandCompleteAsynch (PHGSMIINSTANCE pIns, void *pvData);
     21int VBoxSHGSMICommandComplete (PHGSMIINSTANCE pIns, void *pvData);
    2222
    2323void VBoxSHGSMICommandMarkAsynchCompletion (void *pvData);
    2424
    25 int VBoxSHGSMICommandCompleteSynch (PHGSMIINSTANCE pIns, void *pvData);
    26 
    2725#endif /* #ifndef ___SHGSMIHost_h___ */
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