VirtualBox

Ignore:
Timestamp:
Oct 1, 2010 8:38:01 PM (14 years ago)
Author:
vboxsync
Message:

Additions/WINNT/VBoxVideo: start refactoring the HGSMI code

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

Legend:

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

    r32677 r32876  
    19691969
    19701970#ifdef VBOX_WITH_HGSMI
    1971       ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;
    1972       ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST;
     1971      /* pPrimary is not yet set */
     1972      ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.hgsmiInfo.IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;
     1973      ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.hgsmiInfo.IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST;
    19731974#endif /* VBOX_WITH_HGSMI */
    19741975
     
    20242025      VBoxSetupDisplaysHGSMI((PDEVICE_EXTENSION)HwDeviceExtension, ConfigInfo, AdapterMemorySize);
    20252026
    2026       if (((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.bHGSMI)
     2027      if (hgsmiFromDeviceExt((PDEVICE_EXTENSION)HwDeviceExtension)->bHGSMI)
    20272028      {
    20282029          LogRel(("VBoxVideo: using HGSMI\n"));
     
    26752676            }
    26762677
    2677             if (!pDevExt->pPrimary->u.primary.bHGSMI)
     2678            if (!hgsmiFromDeviceExt(pDevExt)->bHGSMI)
    26782679            {
    26792680                RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
     
    26922693            pInfo->u32MinVBVABufferSize = VBVA_MIN_BUFFER_SIZE;
    26932694
    2694             pInfo->IOPortGuestCommand = pDevExt->pPrimary->u.primary.IOPortGuest;
     2695            pInfo->IOPortGuestCommand = hgsmiFromDeviceExt(pDevExt)->IOPortGuest;
    26952696
    26962697            RequestPacket->StatusBlock->Information = sizeof(QUERYHGSMIRESULT);
     
    27112712            }
    27122713
    2713             if (!pDevExt->pPrimary->u.primary.bHGSMI)
     2714            if (!hgsmiFromDeviceExt(pDevExt)->bHGSMI)
    27142715            {
    27152716                RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
     
    27392740            }
    27402741
    2741             if (!pDevExt->pPrimary->u.primary.bHGSMI)
     2742            if (!hgsmiFromDeviceExt(pDevExt)->bHGSMI)
    27422743            {
    27432744                RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
     
    27652766            }
    27662767
    2767             if (!pDevExt->pPrimary->u.primary.bHGSMI)
     2768            if (!hgsmiFromDeviceExt(pDevExt)->bHGSMI)
    27682769            {
    27692770                RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
     
    27862787        {
    27872788            /* TODO: implement */
    2788             if (!pDevExt->pPrimary->u.primary.bHGSMI)
     2789            if (!hgsmiFromDeviceExt(pDevExt)->bHGSMI)
    27892790            {
    27902791                RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
     
    28042805            }
    28052806
    2806             if (!pDevExt->pPrimary->u.primary.bHGSMI)
     2807            if (!hgsmiFromDeviceExt(pDevExt)->bHGSMI)
    28072808            {
    28082809                RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r32823 r32876  
    200200#endif
    201201
     202#ifdef VBOX_WITH_HGSMI
     203typedef struct HGSMI_GUEST_INFO
     204{
     205    BOOLEAN bHGSMI;                     /* Whether HGSMI is enabled. */
     206
     207    HGSMIAREA areaHostHeap;             /* Host heap VRAM area. */
     208
     209    HGSMICHANNELINFO channels;
     210
     211    HGSMIHEAP hgsmiAdapterHeap;
     212
     213    /* The IO Port Number for host commands. */
     214    RTIOPORT IOPortHost;
     215
     216    /* The IO Port Number for guest commands. */
     217    RTIOPORT IOPortGuest;
     218} HGSMI_GUEST_INFO, *PHGSMI_GUEST_INFO;
     219#endif
     220
    202221typedef struct _DEVICE_EXTENSION
    203222{
     
    271290
    272291#ifdef VBOX_WITH_HGSMI
    273            BOOLEAN bHGSMI;                     /* Whether HGSMI is enabled. */
    274 
    275            HGSMIAREA areaHostHeap;             /* Host heap VRAM area. */
    276 
    277            HGSMICHANNELINFO channels;
    278 
    279            HGSMIHEAP hgsmiAdapterHeap;
    280 
    281            /* The IO Port Number for host commands. */
    282            RTIOPORT IOPortHost;
    283 
    284            /* The IO Port Number for guest commands. */
    285            RTIOPORT IOPortGuest;
     292           HGSMI_GUEST_INFO hgsmiInfo;
    286293# ifndef VBOX_WITH_WDDM
    287294           /* Video Port API dynamically picked up at runtime for binary backwards compatibility with older NT versions */
     
    336343#endif
    337344} DEVICE_EXTENSION, *PDEVICE_EXTENSION;
     345
     346static inline PHGSMI_GUEST_INFO hgsmiFromDeviceExt(PDEVICE_EXTENSION pExt)
     347{
     348#ifndef VBOX_WITH_WDDM
     349    return &pExt->pPrimary->u.primary.hgsmiInfo;
     350#else
     351    return &pExt->u.primary.hgsmiInfo;
     352#endif
     353}
    338354
    339355#ifndef VBOX_WITH_WDDM
     
    852868 * Host and Guest port IO helpers.
    853869 */
    854 DECLINLINE(void) VBoxHGSMIHostWrite(PDEVICE_EXTENSION PrimaryExtension, ULONG data)
    855 {
    856 #ifndef VBOX_WITH_WDDM
    857     VBoxVideoCmnPortWriteUlong((PULONG)PrimaryExtension->pPrimary->u.primary.IOPortHost, data);
    858 #else
    859     VBoxVideoCmnPortWriteUlong((PULONG)PrimaryExtension->u.primary.IOPortHost, data);
    860 #endif
    861 }
    862 
    863 DECLINLINE(ULONG) VBoxHGSMIHostRead(PDEVICE_EXTENSION PrimaryExtension)
    864 {
    865 #ifndef VBOX_WITH_WDDM
    866     return VBoxVideoCmnPortReadUlong((PULONG)PrimaryExtension->pPrimary->u.primary.IOPortHost);
    867 #else
    868     return VBoxVideoCmnPortReadUlong((PULONG)PrimaryExtension->u.primary.IOPortHost);
    869 #endif
    870 }
    871 
    872 DECLINLINE(void) VBoxHGSMIGuestWrite(PDEVICE_EXTENSION PrimaryExtension, ULONG data)
    873 {
    874 #ifndef VBOX_WITH_WDDM
    875     VBoxVideoCmnPortWriteUlong((PULONG)PrimaryExtension->pPrimary->u.primary.IOPortGuest, data);
    876 #else
    877     VBoxVideoCmnPortWriteUlong((PULONG)PrimaryExtension->u.primary.IOPortGuest, data);
    878 #endif
    879 }
    880 
    881 DECLINLINE(ULONG) VBoxHGSMIGuestRead(PDEVICE_EXTENSION PrimaryExtension)
    882 {
    883 #ifndef VBOX_WITH_WDDM
    884     return VBoxVideoCmnPortReadUlong((PULONG)PrimaryExtension->pPrimary->u.primary.IOPortGuest);
    885 #else
    886     return VBoxVideoCmnPortReadUlong((PULONG)PrimaryExtension->u.primary.IOPortGuest);
    887 #endif
     870DECLINLINE(void) VBoxHGSMIHostWrite(PHGSMI_GUEST_INFO pInfo, ULONG data)
     871{
     872    VBoxVideoCmnPortWriteUlong((PULONG)pInfo->IOPortHost, data);
     873}
     874
     875DECLINLINE(ULONG) VBoxHGSMIHostRead(PHGSMI_GUEST_INFO pInfo)
     876{
     877    return VBoxVideoCmnPortReadUlong((PULONG)pInfo->IOPortHost);
     878}
     879
     880DECLINLINE(void) VBoxHGSMIGuestWrite(PHGSMI_GUEST_INFO pInfo, ULONG data)
     881{
     882    VBoxVideoCmnPortWriteUlong((PULONG)pInfo->IOPortGuest, data);
     883}
     884
     885DECLINLINE(ULONG) VBoxHGSMIGuestRead(PHGSMI_GUEST_INFO pInfo)
     886{
     887    return VBoxVideoCmnPortReadUlong((PULONG)pInfo->IOPortGuest);
    888888}
    889889
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp

    r32622 r32876  
    3535void HGSMINotifyHostCmdComplete (PDEVICE_EXTENSION PrimaryExtension, HGSMIOFFSET offt)
    3636{
    37     VBoxHGSMIHostWrite(PrimaryExtension, offt);
     37    VBoxHGSMIHostWrite(hgsmiFromDeviceExt(PrimaryExtension), offt);
    3838}
    3939
    4040void HGSMIClearIrq (PDEVICE_EXTENSION PrimaryExtension)
    4141{
    42     VBoxHGSMIHostWrite(PrimaryExtension, HGSMIOFFSET_VOID);
     42    VBoxHGSMIHostWrite(hgsmiFromDeviceExt(PrimaryExtension), HGSMIOFFSET_VOID);
    4343}
    4444
    4545static void HGSMIHostCmdComplete (PDEVICE_EXTENSION PrimaryExtension, void * pvMem)
    4646{
    47     HGSMIOFFSET offMem = HGSMIPointerToOffset (&PrimaryExtension->u.primary.areaHostHeap, HGSMIBufferHeaderFromData (pvMem));
     47    HGSMIOFFSET offMem = HGSMIPointerToOffset (&hgsmiFromDeviceExt(PrimaryExtension)->areaHostHeap, HGSMIBufferHeaderFromData (pvMem));
    4848    Assert(offMem != HGSMIOFFSET_VOID);
    4949    if(offMem != HGSMIOFFSET_VOID)
     
    5555static void hgsmiHostCmdProcess(PDEVICE_EXTENSION PrimaryExtension, HGSMIOFFSET offBuffer)
    5656{
    57     int rc = HGSMIBufferProcess (&PrimaryExtension->u.primary.areaHostHeap,
    58                                 &PrimaryExtension->u.primary.channels,
     57    int rc = HGSMIBufferProcess (&hgsmiFromDeviceExt(PrimaryExtension)->areaHostHeap,
     58                                &hgsmiFromDeviceExt(PrimaryExtension)->channels,
    5959                                offBuffer);
    6060    Assert(!RT_FAILURE(rc));
     
    7070static HGSMIOFFSET hgsmiGetHostBuffer (PDEVICE_EXTENSION PrimaryExtension)
    7171{
    72     return VBoxHGSMIHostRead(PrimaryExtension);
     72    return VBoxHGSMIHostRead(hgsmiFromDeviceExt(PrimaryExtension));
    7373}
    7474
     
    190190    /* @todo: add synchronization */
    191191#endif
    192     return HGSMIHeapAlloc (&PrimaryExtension->u.primary.hgsmiAdapterHeap, cbData, u8Ch, u16Op);
     192    return HGSMIHeapAlloc (&hgsmiFromDeviceExt(PrimaryExtension)->hgsmiAdapterHeap, cbData, u8Ch, u16Op);
    193193}
    194194
     
    198198    /* @todo: add synchronization */
    199199#endif
    200     HGSMIHeapFree (&PrimaryExtension->u.primary.hgsmiAdapterHeap, pvBuffer);
     200    HGSMIHeapFree (&hgsmiFromDeviceExt(PrimaryExtension)->hgsmiAdapterHeap, pvBuffer);
    201201}
    202202
     
    204204{
    205205    /* Initialize the buffer and get the offset for port IO. */
    206     HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (&PrimaryExtension->u.primary.hgsmiAdapterHeap, pvBuffer);
     206    HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (&hgsmiFromDeviceExt(PrimaryExtension)->hgsmiAdapterHeap, pvBuffer);
    207207
    208208    Assert(offBuffer != HGSMIOFFSET_VOID);
     
    210210    {
    211211        /* Submit the buffer to the host. */
    212         VBoxHGSMIGuestWrite(PrimaryExtension, offBuffer);
     212        VBoxHGSMIGuestWrite(hgsmiFromDeviceExt(PrimaryExtension), offBuffer);
    213213        return VINF_SUCCESS;
    214214    }
     
    236236#endif
    237237
    238     void *p = HGSMIHeapAlloc (&PrimaryExtension->u.primary.hgsmiAdapterHeap, cbData, u8Ch, u16Op);
     238    void *p = HGSMIHeapAlloc (&hgsmiFromDeviceExt(PrimaryExtension)->hgsmiAdapterHeap, cbData, u8Ch, u16Op);
    239239
    240240    if (!p)
     
    253253        {
    254254            /* Initialize the buffer and get the offset for port IO. */
    255             HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (&PrimaryExtension->u.primary.hgsmiAdapterHeap,
     255            HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (&hgsmiFromDeviceExt(PrimaryExtension)->hgsmiAdapterHeap,
    256256                                                           p);
    257257
    258258            /* Submit the buffer to the host. */
    259             VBoxHGSMIGuestWrite(PrimaryExtension, offBuffer);
     259            VBoxHGSMIGuestWrite(hgsmiFromDeviceExt(PrimaryExtension), offBuffer);
    260260
    261261            if (pfnFinalize)
     
    271271
    272272        /* Free the IO buffer. */
    273         HGSMIHeapFree (&PrimaryExtension->u.primary.hgsmiAdapterHeap, p);
     273        HGSMIHeapFree (&hgsmiFromDeviceExt(PrimaryExtension)->hgsmiAdapterHeap, p);
    274274    }
    275275
     
    743743    PrimaryExtension->u.primary.pHostFlags               = NULL;
    744744    PrimaryExtension->u.primary.ulMaxFrameBufferSize     = 0;
    745     PrimaryExtension->u.primary.bHGSMI                   = VBoxHGSMIIsSupported (PrimaryExtension);
    746     VBoxVideoCmnMemZero(&PrimaryExtension->u.primary.areaHostHeap, sizeof(HGSMIAREA));
     745    hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI         = VBoxHGSMIIsSupported (PrimaryExtension);
     746    VBoxVideoCmnMemZero(&hgsmiFromDeviceExt(PrimaryExtension)->areaHostHeap, sizeof(HGSMIAREA));
    747747    VBoxVideoCmnMemZero(&PrimaryExtension->areaDisplay, sizeof(HGSMIAREA));
    748748
    749     if (PrimaryExtension->u.primary.IOPortGuest == 0)
    750     {
    751         PrimaryExtension->u.primary.bHGSMI = false;
    752     }
    753 
    754     if (PrimaryExtension->u.primary.bHGSMI)
     749    if (hgsmiFromDeviceExt(PrimaryExtension)->IOPortGuest == 0)
     750    {
     751        hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI = false;
     752    }
     753
     754    if (hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI)
    755755    {
    756756        /* Map the adapter information. It will be needed for HGSMI IO. */
     
    765765                     rc));
    766766
    767             PrimaryExtension->u.primary.bHGSMI = FALSE;
     767            hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI = FALSE;
    768768        }
    769769        else
    770770        {
    771771            /* Setup a HGSMI heap within the adapter information area. */
    772             rc = HGSMIHeapSetup (&PrimaryExtension->u.primary.hgsmiAdapterHeap,
     772            rc = HGSMIHeapSetup (&hgsmiFromDeviceExt(PrimaryExtension)->hgsmiAdapterHeap,
    773773                                 PrimaryExtension->u.primary.pvAdapterInformation,
    774774                                 VBVA_ADAPTER_INFORMATION_SIZE - sizeof(HGSMIHOSTFLAGS),
     
    781781                         rc));
    782782
    783                 PrimaryExtension->u.primary.bHGSMI = FALSE;
     783                hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI = FALSE;
    784784            }
    785785            else
     
    792792
    793793    /* Setup the host heap and the adapter memory. */
    794     if (PrimaryExtension->u.primary.bHGSMI)
     794    if (hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI)
    795795    {
    796796        /* The miniport heap is used for the host buffers. */
     
    836836                PrimaryExtension->u.primary.pvMiniportHeap = NULL;
    837837                PrimaryExtension->u.primary.cbMiniportHeap = 0;
    838                 PrimaryExtension->u.primary.bHGSMI = FALSE;
     838                hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI = FALSE;
    839839            }
    840840            else
     
    845845
    846846                /* Init the host hap area. Buffers from the host will be placed there. */
    847                 HGSMIAreaInitialize (&PrimaryExtension->u.primary.areaHostHeap,
     847                HGSMIAreaInitialize (&hgsmiFromDeviceExt(PrimaryExtension)->areaHostHeap,
    848848                                     PrimaryExtension->u.primary.pvMiniportHeap,
    849849                                     PrimaryExtension->u.primary.cbMiniportHeap,
     
    860860
    861861    /* Check whether the guest supports multimonitors. */
    862     if (PrimaryExtension->u.primary.bHGSMI)
     862    if (hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI)
    863863    {
    864864#ifndef VBOX_WITH_WDDM
     
    939939#endif
    940940
    941     if (PrimaryExtension->u.primary.bHGSMI)
     941    if (hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI)
    942942    {
    943943        /* Setup the information for the host. */
     
    946946        if (RT_FAILURE (rc))
    947947        {
    948             PrimaryExtension->u.primary.bHGSMI = FALSE;
     948            hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI = FALSE;
    949949        }
    950950    }
    951951
    952952#ifdef VBOX_WITH_WDDM
    953     if (PrimaryExtension->u.primary.bHGSMI)
     953    if (hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI)
    954954    {
    955955        ULONG ulAvailable = PrimaryExtension->u.primary.cbVRAM
     
    10401040
    10411041        if (RT_FAILURE(rc))
    1042             PrimaryExtension->u.primary.bHGSMI = FALSE;
    1043     }
    1044 #endif
    1045 
    1046     if (!PrimaryExtension->u.primary.bHGSMI)
     1042            hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI = FALSE;
     1043    }
     1044#endif
     1045
     1046    if (!hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI)
    10471047    {
    10481048        /* Unmap the memory if VBoxVideo is not supported. */
     
    10501050        VBoxUnmapAdapterInformation (PrimaryExtension);
    10511051
    1052         HGSMIHeapDestroy (&PrimaryExtension->u.primary.hgsmiAdapterHeap);
    1053     }
    1054 
    1055     if (PrimaryExtension->u.primary.bHGSMI)
     1052        HGSMIHeapDestroy (&hgsmiFromDeviceExt(PrimaryExtension)->hgsmiAdapterHeap);
     1053    }
     1054
     1055    if (hgsmiFromDeviceExt(PrimaryExtension)->bHGSMI)
    10561056    {
    10571057        VBoxVideoCmnSpinLockCreate(PrimaryExtension, &PrimaryExtension->u.primary.pSynchLock);
     
    10991099*/
    11001100            {
    1101                 HGSMIHeapDestroy(&PrimaryExtension->u.primary.hgsmiAdapterHeap);
     1101                HGSMIHeapDestroy(&hgsmiFromDeviceExt(PrimaryExtension)->hgsmiAdapterHeap);
    11021102
    11031103                /* Map the adapter information. It will be needed for HGSMI IO. */
     
    13691369    VBoxVideoHGSMIDpc(PrimaryExtension, NULL);
    13701370
    1371     HGSMICHANNEL * pChannel = HGSMIChannelFindById (&PrimaryExtension->u.primary.channels, u8Channel);
     1371    HGSMICHANNEL * pChannel = HGSMIChannelFindById (&hgsmiFromDeviceExt(PrimaryExtension)->channels, u8Channel);
    13721372    if(pChannel)
    13731373    {
     
    15471547{
    15481548    VBVA_CHANNELCONTEXTS * pContexts;
    1549     HGSMICHANNEL * pChannel = HGSMIChannelFindById (&PrimaryExtension->u.primary.channels, u8Channel);
     1549    HGSMICHANNEL * pChannel = HGSMIChannelFindById (&hgsmiFromDeviceExt(PrimaryExtension)->channels, u8Channel);
    15501550    if(!pChannel)
    15511551    {
     
    15841584            if(!pChannel)
    15851585            {
    1586                 rc = HGSMIChannelRegister (&PrimaryExtension->u.primary.channels,
     1586                rc = HGSMIChannelRegister (&hgsmiFromDeviceExt(PrimaryExtension)->channels,
    15871587                                           u8Channel,
    15881588                                           "VGA Miniport HGSMI channel",
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r32823 r32876  
    250250        return &pDevExt->u.primary.Vdma.CmdHeap;
    251251#endif
    252     if (HGSMIAreaContainsOffset(&pDevExt->u.primary.hgsmiAdapterHeap.area, offCmd))
    253         return &pDevExt->u.primary.hgsmiAdapterHeap;
     252    if (HGSMIAreaContainsOffset(&hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap.area, offCmd))
     253        return &hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap;
    254254    return NULL;
    255255}
     
    270270        return VBOXWDDM_HGSMICMD_TYPE_DMACMD;
    271271#endif
    272     if (HGSMIAreaContainsOffset(&pDevExt->u.primary.hgsmiAdapterHeap.area, offCmd))
     272    if (HGSMIAreaContainsOffset(&hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap.area, offCmd))
    273273        return VBOXWDDM_HGSMICMD_TYPE_CTL;
    274274    return VBOXWDDM_HGSMICMD_TYPE_UNDEFINED;
     
    403403       if (VBoxHGSMIIsSupported (pContext))
    404404       {
    405            pContext->u.primary.IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;
    406            pContext->u.primary.IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST;
     405           hgsmiFromDeviceExt(pContext)->IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;
     406           hgsmiFromDeviceExt(pContext)->IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST;
    407407
    408408           PCM_RESOURCE_LIST pRcList = pDeviceInfo->TranslatedResourceList;
     
    572572                 */
    573573                VBoxSetupDisplaysHGSMI(pContext, AdapterMemorySize);
    574                 if ((pContext)->u.primary.bHGSMI)
     574                if (hgsmiFromDeviceExt(pContext)->bHGSMI)
    575575                {
    576576                    drprintf(("VBoxVideoWddm: using HGSMI\n"));
     
    784784            {
    785785                /* read the command offset */
    786                 HGSMIOFFSET offCmd = VBoxHGSMIGuestRead(pDevExt);
     786                HGSMIOFFSET offCmd = VBoxHGSMIGuestRead(hgsmiFromDeviceExt(pDevExt));
    787787                Assert(offCmd != HGSMIOFFSET_VOID);
    788788                if (offCmd != HGSMIOFFSET_VOID)
     
    801801                        case VBOXWDDM_HGSMICMD_TYPE_CTL:
    802802                            pList = &CtlList;
    803                             pHeap = &pDevExt->u.primary.hgsmiAdapterHeap;
     803                            pHeap = &hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap;
    804804                            break;
    805805                        default:
     
    964964    if (!vboxSHGSMIListIsEmpty(&context.data.CtlList))
    965965    {
    966         int rc = VBoxSHGSMICommandPostprocessCompletion (&pDevExt->u.primary.hgsmiAdapterHeap, &context.data.CtlList);
     966        int rc = VBoxSHGSMICommandPostprocessCompletion (&hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap, &context.data.CtlList);
    967967        AssertRC(rc);
    968968    }
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