VirtualBox

Ignore:
Timestamp:
Oct 5, 2010 1:32:57 PM (14 years ago)
Author:
vboxsync
Message:

Additions/WINNT/Graphics: more refactorings

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Miniport
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r32876 r32915  
    20822082                }
    20832083                /* clear the IRQ */
    2084                 HGSMIClearIrq (PrimaryExtension);
     2084                HGSMIClearIrq (hgsmiFromDeviceExt(PrimaryExtension));
    20852085                return TRUE;
    20862086            }
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r32889 r32915  
    916916    );
    917917
    918 void HGSMIClearIrq (PDEVICE_EXTENSION PrimaryExtension);
     918void HGSMIClearIrq (PHGSMI_GUEST_INFO pInfo);
    919919
    920920#endif /* VBOX_WITH_HGSMI */
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp

    r32877 r32915  
    3333#define MEM_TAG 'HVBV'
    3434
    35 void HGSMINotifyHostCmdComplete (PDEVICE_EXTENSION PrimaryExtension, HGSMIOFFSET offt)
    36 {
    37     VBoxHGSMIHostWrite(hgsmiFromDeviceExt(PrimaryExtension), offt);
    38 }
    39 
    40 void HGSMIClearIrq (PDEVICE_EXTENSION PrimaryExtension)
    41 {
    42     VBoxHGSMIHostWrite(hgsmiFromDeviceExt(PrimaryExtension), HGSMIOFFSET_VOID);
    43 }
    44 
    45 static void HGSMIHostCmdComplete (PDEVICE_EXTENSION PrimaryExtension, void * pvMem)
    46 {
    47     HGSMIOFFSET offMem = HGSMIPointerToOffset (&hgsmiFromDeviceExt(PrimaryExtension)->areaHostHeap, HGSMIBufferHeaderFromData (pvMem));
     35void HGSMINotifyHostCmdComplete (PHGSMI_GUEST_INFO pInfo, HGSMIOFFSET offt)
     36{
     37    VBoxHGSMIHostWrite(pInfo, offt);
     38}
     39
     40void HGSMIClearIrq (PHGSMI_GUEST_INFO pInfo)
     41{
     42    VBoxHGSMIHostWrite(pInfo, HGSMIOFFSET_VOID);
     43}
     44
     45static void HGSMIHostCmdComplete (PHGSMI_GUEST_INFO pInfo, void * pvMem)
     46{
     47    HGSMIOFFSET offMem = HGSMIPointerToOffset (&pInfo->areaHostHeap, HGSMIBufferHeaderFromData (pvMem));
    4848    Assert(offMem != HGSMIOFFSET_VOID);
    4949    if(offMem != HGSMIOFFSET_VOID)
    5050    {
    51         HGSMINotifyHostCmdComplete (PrimaryExtension, offMem);
     51        HGSMINotifyHostCmdComplete (pInfo, offMem);
    5252    }
    5353}
     
    6363        /* failure means the command was not submitted to the handler for some reason
    6464         * it's our responsibility to notify its completion in this case */
    65         HGSMINotifyHostCmdComplete(PrimaryExtension, offBuffer);
     65        HGSMINotifyHostCmdComplete(hgsmiFromDeviceExt(PrimaryExtension), offBuffer);
    6666    }
    6767    /* if the cmd succeeded it's responsibility of the callback to complete it */
     
    13531353{
    13541354    PDEVICE_EXTENSION PrimaryExtension = ((PDEVICE_EXTENSION)hHGSMI)->pPrimary;
    1355     HGSMIHostCmdComplete (PrimaryExtension, pCmd);
     1355    HGSMIHostCmdComplete (hgsmiFromDeviceExt(PrimaryExtension), pCmd);
    13561356}
    13571357
     
    14671467                            VBVAHOSTCMD * pNext = pCur->u.pNext;
    14681468                            pCur->u.pNext = NULL;
    1469                             HGSMIHostCmdComplete(pCallbacks->PrimaryExtension, pCur);
     1469                            HGSMIHostCmdComplete(hgsmiFromDeviceExt(pCallbacks->PrimaryExtension), pCur);
    14701470                            pCur = pNext;
    14711471                            Assert(!pCur);
     
    15361536    }
    15371537    /* no handlers were found, need to complete the command here */
    1538     HGSMIHostCmdComplete(pCallbacks->PrimaryExtension, pvBuffer);
     1538    HGSMIHostCmdComplete(hgsmiFromDeviceExt(pCallbacks->PrimaryExtension), pvBuffer);
    15391539    return VINF_SUCCESS;
    15401540}
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r32889 r32915  
    896896        if (bOur)
    897897        {
    898             HGSMIClearIrq (pDevExt);
     898            HGSMIClearIrq (hgsmiFromDeviceExt(pDevExt));
    899899#ifdef DEBUG_misha
    900900            /* this is not entirely correct since host may concurrently complete some commands and raise a new IRQ while we are here,
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