VirtualBox

Ignore:
Timestamp:
Oct 11, 2010 8:57:20 PM (14 years ago)
Author:
vboxsync
Message:

Additions/WINNT/Graphics: make VBOX_WITH_HGSMI conditional code unconditional

Location:
trunk/src/VBox/Additions/WINNT/Graphics
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/Makefile.kmk

    r32889 r33048  
    5757VBoxDisp_LIBS = \
    5858        $(PATH_SDK_W2K3DDK_LIB)/win32k.lib \
    59         $(VBOX_LIB_IPRT_GUEST_R0)
    60 
    61 ifdef VBOX_WITH_HGSMI
    62 VBoxDisp_LIBS         += \
     59        $(VBOX_LIB_IPRT_GUEST_R0) \
    6360        $(VBOX_PATH_ADDITIONS_LIB)/HGSMIGuestR0Lib$(VBOX_SUFF_LIB)
    64 VBoxDisp_DEFS += VBOX_WITH_HGSMI
    65 endif
    6661
    6762ifdef VBOX_WITH_WDDM
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.c

    r28800 r33048  
    12451245        DISPDBG((0, "%d,%d %dx%d\n", pDev->ddLock.rArea.left, pDev->ddLock.rArea.top, pDev->ddLock.rArea.right - pDev->ddLock.rArea.left, pDev->ddLock.rArea.bottom - pDev->ddLock.rArea.top));
    12461246
    1247 #ifndef VBOX_WITH_HGSMI
    1248         if (pDev->pInfo && vboxHwBufferBeginUpdate (pDev))
    1249         {
    1250             vbvaReportDirtyRect (pDev, &pDev->ddLock.rArea);
    1251 
    1252             if (  pDev->pInfo->hostEvents.fu32Events
    1253                 & VBOX_VIDEO_INFO_HOST_EVENTS_F_VRDP_RESET)
    1254             {
    1255                 vrdpReset (pDev);
    1256 
    1257                 pDev->pInfo->hostEvents.fu32Events &=
    1258                           ~VBOX_VIDEO_INFO_HOST_EVENTS_F_VRDP_RESET;
    1259             }
    1260 
    1261             if (pDev->vbva.pVbvaMemory->fu32ModeFlags
    1262                 & VBVA_F_MODE_VRDP)
    1263             {
    1264                 vrdpReportDirtyRect (pDev, &pDev->ddLock.rArea);
    1265             }
    1266 
    1267             vboxHwBufferEndUpdate (pDev);
    1268         }
    1269 #else
    12701247        if (pDev->bHGSMISupported && vboxHwBufferBeginUpdate (pDev))
    12711248        {
     
    12891266            vboxHwBufferEndUpdate (pDev);
    12901267        }
    1291 #endif /* VBOX_WITH_HGSMI */
    12921268
    12931269        pDev->ddLock.bLocked = FALSE;
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/driver.h

    r28800 r33048  
    168168    FLONG   flHooks;
    169169
    170 #ifndef VBOX_WITH_HGSMI
    171     VBVAENABLERESULT vbva;
    172     uint32_t         u32VRDPResetFlag;
    173 #endif /* !VBOX_WITH_HGSMI */
    174170    BOOL             fHwBufferOverflow;
    175171    VBVARECORD       *pRecord;
     
    179175    SSB aSSB[4];                // LIFO type stack for saved screen areas.
    180176
    181 #ifndef VBOX_WITH_HGSMI
    182     VBOXDISPLAYINFO *pInfo;
    183     BOOLEAN bVBoxVideoSupported;
    184 #endif /* !VBOX_WITH_HGSMI */
    185177    ULONG iDevice;
    186178    VRAMLAYOUT layout;
     
    199191#endif /* VBOX_WITH_DDRAW */
    200192
    201 #ifdef VBOX_WITH_HGSMI
    202193    BOOLEAN bHGSMISupported;
    203194    HGSMIHEAP hgsmiDisplayHeap;
     
    212203    PVOID pVideoPortContext;
    213204    VBOXVIDEOPORTPROCS VideoPortProcs;
    214 #endif /* VBOX_WITH_HGSMI */
    215205
    216206#ifdef VBOX_WITH_VIDEOHWACCEL
     
    228218#endif
    229219
    230 #ifndef VBOX_WITH_HGSMI
    231 /* The global semaphore handle for all driver instances. */
    232 extern HSEMAPHORE ghsemHwBuffer;
    233 #endif /* !VBOX_WITH_HGSMI */
    234220
    235221
     
    291277void drvLoadEng (void);
    292278
    293 #ifdef VBOX_WITH_HGSMI
    294279void vboxVBVAHostCommandComplete(PPDEV ppdev, VBVAHOSTCMD * pCmd);
    295280
    296  #ifdef VBOX_WITH_VIDEOHWACCEL
     281#ifdef VBOX_WITH_VIDEOHWACCEL
    297282
    298283DECLINLINE(uint64_t) vboxVHWAVramOffsetFromPDEV(PPDEV pDev, ULONG_PTR offPdev)
     
    397382int vboxVHWADisable(PPDEV ppdev);
    398383
    399  #endif
    400384#endif
    401385
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/drv.c

    r33003 r33048  
    101101}
    102102
    103 #ifndef VBOX_WITH_HGSMI
    104 #define VBVA_OPERATION(__psoDest, __fn, __a) do {                     \
    105     if (bIsScreenSurface(__psoDest))                                  \
    106     {                                                                 \
    107         PPDEV ppdev = (PPDEV)__psoDest->dhpdev;                       \
    108                                                                       \
    109         if (ppdev->pInfo && vboxHwBufferBeginUpdate (ppdev))          \
    110         {                                                             \
    111             vbva##__fn __a;                                           \
    112                                                                       \
    113             if (  ppdev->pInfo->hostEvents.fu32Events                 \
    114                 & VBOX_VIDEO_INFO_HOST_EVENTS_F_VRDP_RESET)           \
    115             {                                                         \
    116                 vrdpReset (ppdev);                                    \
    117                                                                       \
    118                 ppdev->pInfo->hostEvents.fu32Events &=                \
    119                           ~VBOX_VIDEO_INFO_HOST_EVENTS_F_VRDP_RESET;  \
    120             }                                                         \
    121                                                                       \
    122             if (ppdev->vbva.pVbvaMemory->fu32ModeFlags                \
    123                 & VBVA_F_MODE_VRDP)                                   \
    124             {                                                         \
    125                 vrdp##__fn __a;                                       \
    126             }                                                         \
    127                                                                       \
    128             vboxHwBufferEndUpdate (ppdev);                            \
    129         }                                                             \
    130     }                                                                 \
    131 } while (0)
    132 #else
    133103#define VBVA_OPERATION(__psoDest, __fn, __a) do {                      \
    134104    if (bIsScreenSurface(__psoDest))                                   \
     
    159129    }                                                                  \
    160130} while (0)
    161 #endif /* VBOX_WITH_HGSMI */
    162131
    163132//#undef VBVA_OPERATION
     
    351320        PPDEV ppdev = (PPDEV)psoDest->dhpdev;
    352321
    353 #ifndef VBOX_WITH_HGSMI
    354         VBVAMEMORY *pVbvaMemory = ppdev->vbva.pVbvaMemory;
    355 
    356         DISPDBG((1, "offscreen->screen\n"));
    357 
    358         if (   pVbvaMemory
    359             && (pVbvaMemory->fu32ModeFlags & VBVA_F_MODE_ENABLED))
    360 #else
    361322        DISPDBG((1, "offscreen->screen\n"));
    362323
    363324        if (   ppdev->pVBVA
    364325            && (ppdev->pVBVA->hostFlags.u32HostEvents & VBVA_F_MODE_ENABLED))
    365 #endif /* VBOX_WITH_HGSMI */
    366326        {
    367327            if (   (psoSrc->fjBitmap & BMF_DONTCACHE) != 0
     
    769729        PPDEV ppdev = (PPDEV)psoTarget->dhpdev;
    770730
    771 #ifndef VBOX_WITH_HGSMI
    772         if (   ppdev->vbva.pVbvaMemory
    773             && (ppdev->vbva.pVbvaMemory->fu32ModeFlags & VBVA_F_MODE_ENABLED))
    774         {
    775             if (ppdev->vbva.pVbvaMemory->fu32ModeFlags
    776                 & VBVA_F_MODE_VRDP_RESET)
    777             {
    778                 vrdpReset (ppdev);
    779 
    780                 ppdev->vbva.pVbvaMemory->fu32ModeFlags &=
    781                     ~VBVA_F_MODE_VRDP_RESET;
    782             }
    783 
    784             if (ppdev->vbva.pVbvaMemory->fu32ModeFlags
    785                 & VBVA_F_MODE_VRDP)
    786             {
    787                 bRc = vrdpRealizeBrush (pbo, psoTarget, psoPattern, psoMask, pxlo, iHatch);
    788             }
    789         }
    790 #else
    791731        if (   ppdev->pVBVA
    792732            && (ppdev->pVBVA->hostFlags.u32HostEvents & VBVA_F_MODE_ENABLED))
     
    807747            }
    808748        }
    809 #endif /* VBOX_WITH_HGSMI */
    810749    }
    811750
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/enable.c

    r28800 r33048  
    126126        ULONG ret = 0;
    127127
    128 #ifndef VBOX_WITH_HGSMI
    129         if (ppdev && ppdev->pInfo && vboxHwBufferBeginUpdate (ppdev))
    130         {
    131             if (ppdev->vbva.pVbvaMemory->fu32ModeFlags
    132                 & VBVA_F_MODE_VRDP)
     128        if (ppdev && ppdev->pVBVA)
     129        {
     130            if (ppdev->pVBVA->hostFlags.u32HostEvents & VBVA_F_MODE_VRDP)
    133131            {
    134132                ret = 1;
    135133            }
    136             DISPDBG((0, "VBOXESC_ISVRDPACTIVE -> %d (%x)\n", ret, ppdev->vbva.pVbvaMemory->fu32ModeFlags));
    137             vboxHwBufferEndUpdate (ppdev);
     134            DISPDBG((0, "VBOXESC_ISVRDPACTIVE -> %d (%x)\n", ret, ppdev->pVBVA->hostFlags.u32HostEvents));
    138135        }
    139136        else
    140137            DISPDBG((0, "VBOXESC_ISVRDPACTIVE -> 0\n"));
    141 #else
    142         if (ppdev && ppdev->pVBVA)
    143         {
    144             if (ppdev->pVBVA->hostFlags.u32HostEvents & VBVA_F_MODE_VRDP)
    145             {
    146                 ret = 1;
    147             }
    148             DISPDBG((0, "VBOXESC_ISVRDPACTIVE -> %d (%x)\n", ret, ppdev->pVBVA->hostFlags.u32HostEvents));
    149         }
    150         else
    151             DISPDBG((0, "VBOXESC_ISVRDPACTIVE -> 0\n"));
    152 #endif  /* VBOX_WITH_HGSMI */
    153138        return ret;
    154139    }
     
    326311#define HOOKS_BMF32BPP gflHooks
    327312
    328 #ifndef VBOX_WITH_HGSMI
    329 HSEMAPHORE ghsemHwBuffer = 0;
    330 #endif /* !VBOX_WITH_HGSMI */
    331313
    332314/******************************Public*Routine******************************\
     
    379361            DDI_DRIVER_VERSION_NT4;
    380362
    381 #ifndef VBOX_WITH_HGSMI
    382     if (!ghsemHwBuffer)
    383     {
    384         ghsemHwBuffer = EngCreateSemaphore ();
    385     }
    386 #endif /* !VBOX_WITH_HGSMI */
    387363
    388364    return(TRUE);
     
    401377    DISPDBG((0, "VBoxDisp::DrvDisableDriver called.\n"));
    402378
    403 #ifndef VBOX_WITH_HGSMI
    404     if (ghsemHwBuffer)
    405     {
    406         EngDeleteSemaphore (ghsemHwBuffer);
    407         ghsemHwBuffer = NULL;
    408     }
    409 #endif /* !VBOX_WITH_HGSMI */
    410379
    411380    return;
     
    939908#endif
    940909
    941 #ifdef VBOX_WITH_HGSMI
    942910        /* Free the driver's VBVA resources. */
    943911        vboxVbvaDisable ((PPDEV) dhpdev);
    944 #endif
    945912
    946913        //
     
    11411108    {
    11421109        case DN_DEVICE_ORIGIN:
    1143 #ifndef VBOX_WITH_HGSMI
    1144             ppdev->ptlDevOrg = *(PPOINTL)pvData;
    1145             DISPDBG((3, "DN_DEVICE_ORIGIN: %d, %d (PSO = %p, pInfo = %p)\n", ppdev->ptlDevOrg.x,
    1146                      ppdev->ptlDevOrg.y, pso, ppdev->pInfo));
    1147             if (ppdev->pInfo)
    1148             {
    1149                 ppdev->pInfo->screen.xOrigin = ppdev->ptlDevOrg.x;
    1150                 ppdev->pInfo->screen.yOrigin = ppdev->ptlDevOrg.y;
    1151                 VBoxProcessDisplayInfo(ppdev);
    1152             }
    1153             break;
    1154 #else
    11551110        {
    11561111            POINTL ptlDevOrg = *(PPOINTL)pvData;
     
    11631118            }
    11641119         } break;
    1165 #endif /* VBOX_WITH_HGSMI */
    11661120        case DN_DRAWING_BEGIN:
    11671121            DISPDBG((3, "DN_DRAWING_BEGIN (PSO = %p)\n", pso));
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/screen.c

    r28800 r33048  
    2727#include "driver.h"
    2828
    29 #ifdef VBOX_WITH_HGSMI
    3029#include <iprt/asm.h>
    3130#include <VBox/log.h>
    3231#include <VBox/HGSMI/HGSMI.h>
    3332#include <VBox/HGSMI/HGSMIChSetup.h>
    34 #endif
    3533
    3634#define SYSTM_LOGFONT {16,7,0,0,700,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,VARIABLE_PITCH | FF_DONTCARE,L"System"}
     
    6866    uint32_t u32MinVBVABufferSize;
    6967
    70 #ifndef VBOX_WITH_HGSMI
    71     QUERYDISPLAYINFORESULT DispInfo;
    72     RtlZeroMemory(&DispInfo, sizeof (DispInfo));
    73 
    74     ppdev->bVBoxVideoSupported = !EngDeviceIoControl(ppdev->hDriver,
    75                                                      IOCTL_VIDEO_QUERY_DISPLAY_INFO,
    76                                                      NULL,
    77                                                      0,
    78                                                      &DispInfo,
    79                                                      sizeof(DispInfo),
    80                                                      &returnedDataLength);
    81     if (ppdev->bVBoxVideoSupported)
    82     {
    83         iDevice = DispInfo.iDevice;
    84         u32DisplayInfoSize = DispInfo.u32DisplayInfoSize;
    85         u32MinVBVABufferSize = 0; /* In old mode the buffer is not used at all. */
    86     }
    87 #else
    8868    QUERYHGSMIRESULT info;
    8969    RtlZeroMemory(&info, sizeof (info));
     
    166146        }
    167147    }
    168 #endif /* VBOX_WITH_HGSMI */
    169 
    170 #ifndef VBOX_WITH_HGSMI
    171     if (ppdev->bVBoxVideoSupported)
    172     {
    173 #else
     148
    174149    if (ppdev->bHGSMISupported)
    175150    {
    176 #endif /* VBOX_WITH_HGSMI */
    177151        ppdev->iDevice = iDevice;
    178152
     
    186160        if (cbAvailable <= u32DisplayInfoSize)
    187161        {
    188 #ifndef VBOX_WITH_HGSMI
    189             ppdev->bVBoxVideoSupported = FALSE;
    190 #else
    191162            ppdev->bHGSMISupported = FALSE;
    192 #endif /* VBOX_WITH_HGSMI */
    193163        }
    194164        else
     
    201171            /* Use minimum 64K and maximum the cbFrameBuffer for the VBVA buffer. */
    202172            for (ppdev->layout.cbVBVABuffer = ppdev->layout.cbFrameBuffer;
    203 #ifndef VBOX_WITH_HGSMI
    204                  ppdev->layout.cbVBVABuffer >= 0x10000;
    205 #else
    206173                 ppdev->layout.cbVBVABuffer >= u32MinVBVABufferSize;
    207 #endif /* VBOX_WITH_HGSMI */
    208174                 ppdev->layout.cbVBVABuffer /= 2)
    209175            {
     
    216182            if (ppdev->layout.cbVBVABuffer >= cbAvailable)
    217183            {
    218 #ifndef VBOX_WITH_HGSMI
    219                 ppdev->bVBoxVideoSupported = FALSE;
    220 #else
    221184                ppdev->bHGSMISupported = FALSE;
    222 #endif /* VBOX_WITH_HGSMI */
    223185            }
    224186            else
     
    235197    }
    236198
    237 #ifndef VBOX_WITH_HGSMI
    238     if (!ppdev->bVBoxVideoSupported)
    239 #else
    240199    if (!ppdev->bHGSMISupported)
    241 #endif /* VBOX_WITH_HGSMI */
    242200    {
    243201        ppdev->iDevice = 0;
     
    258216        ppdev->layout.cbDisplayInformation  = 0;
    259217    }
    260 #ifdef VBOX_WITH_HGSMI
    261218    else
    262219    {
     
    285242        }
    286243    }
    287 #endif /* VBOX_WITH_HGSMI */
    288244
    289245    DISPDBG((0, "vboxInitVBoxVideo:\n"
     
    310266
    311267
    312 #ifndef VBOX_WITH_HGSMI
    313 /* Setup display information after remapping. */
    314 static void vboxSetupDisplayInfo (PPDEV ppdev, VIDEO_MEMORY_INFORMATION *pMemoryInformation)
    315 {
    316     VBOXDISPLAYINFO *pInfo;
    317     uint8_t *pu8;
    318 
    319     pu8 = (uint8_t *)ppdev->pjScreen + ppdev->layout.offDisplayInformation;
    320 
    321     pInfo = (VBOXDISPLAYINFO *)pu8;
    322     pu8 += sizeof (VBOXDISPLAYINFO);
    323 
    324     pInfo->hdrLink.u8Type     = VBOX_VIDEO_INFO_TYPE_LINK;
    325     pInfo->hdrLink.u8Reserved = 0;
    326     pInfo->hdrLink.u16Length  = sizeof (VBOXVIDEOINFOLINK);
    327     pInfo->link.i32Offset = 0;
    328 
    329     pInfo->hdrScreen.u8Type     = VBOX_VIDEO_INFO_TYPE_SCREEN;
    330     pInfo->hdrScreen.u8Reserved = 0;
    331     pInfo->hdrScreen.u16Length  = sizeof (VBOXVIDEOINFOSCREEN);
    332     DISPDBG((1, "Setup: %d,%d\n", ppdev->ptlDevOrg.x, ppdev->ptlDevOrg.y));
    333     pInfo->screen.xOrigin      = ppdev->ptlDevOrg.x;
    334     pInfo->screen.yOrigin      = ppdev->ptlDevOrg.y;
    335     pInfo->screen.u32LineSize  = 0;
    336     pInfo->screen.u16Width     = 0;
    337     pInfo->screen.u16Height    = 0;
    338     pInfo->screen.bitsPerPixel = 0;
    339     pInfo->screen.u8Flags      = VBOX_VIDEO_INFO_SCREEN_F_NONE;
    340 
    341     pInfo->hdrHostEvents.u8Type     = VBOX_VIDEO_INFO_TYPE_HOST_EVENTS;
    342     pInfo->hdrHostEvents.u8Reserved = 0;
    343     pInfo->hdrHostEvents.u16Length  = sizeof (VBOXVIDEOINFOHOSTEVENTS);
    344     pInfo->hostEvents.fu32Events = VBOX_VIDEO_INFO_HOST_EVENTS_F_NONE;
    345 
    346     pInfo->hdrEnd.u8Type     = VBOX_VIDEO_INFO_TYPE_END;
    347     pInfo->hdrEnd.u8Reserved = 0;
    348     pInfo->hdrEnd.u16Length  = 0;
    349 
    350     ppdev->pInfo = pInfo;
    351 }
    352 
    353 
    354 static void vboxUpdateDisplayInfo (PPDEV ppdev)
    355 {
    356     if (ppdev->pInfo)
    357     {
    358         ppdev->pInfo->screen.u32LineSize  = ppdev->lDeltaScreen;
    359         ppdev->pInfo->screen.u16Width     = (uint16_t)ppdev->cxScreen;
    360         ppdev->pInfo->screen.u16Height    = (uint16_t)ppdev->cyScreen;
    361         ppdev->pInfo->screen.bitsPerPixel = (uint8_t)ppdev->ulBitCount;
    362         ppdev->pInfo->screen.u8Flags      = VBOX_VIDEO_INFO_SCREEN_F_ACTIVE;
    363 
    364         DISPDBG((1, "Update: %d,%d\n", ppdev->ptlDevOrg.x, ppdev->ptlDevOrg.y));
    365         VBoxProcessDisplayInfo(ppdev);
    366     }
    367 }
    368 #endif /* !VBOX_WITH_HGSMI */
    369268
    370269
     
    494393        vboxInitVBoxVideo (ppdev, &videoMemoryInformation);
    495394
    496 #ifndef VBOX_WITH_HGSMI
    497         if (ppdev->bVBoxVideoSupported)
    498         {
    499             /* Setup the display information. */
    500             vboxSetupDisplayInfo (ppdev, &videoMemoryInformation);
    501         }
    502 #endif /* !VBOX_WITH_HGSMI */
    503395    }
    504396
     
    510402        || ppdev->ulBitCount == 32)
    511403    {
    512 #ifndef VBOX_WITH_HGSMI
    513         if (ppdev->pInfo) /* Do not use VBVA on old hosts. */
    514         {
    515             /* Enable VBVA for this video mode. */
    516             vboxVbvaEnable (ppdev);
    517         }
    518 #else
    519404        if (ppdev->bHGSMISupported)
    520405        {
     
    523408            LogRel(("VBoxDisp[%d]: VBVA %senabled\n", ppdev->iDevice, ppdev->bHGSMISupported? "": "not "));
    524409        }
    525 #endif /* VBOX_WITH_HGSMI */
    526410    }
    527411
    528412    DISPDBG((1, "DISP bInitSURF success\n"));
    529413
    530 #ifndef VBOX_WITH_HGSMI
    531     /* Update the display information. */
    532     vboxUpdateDisplayInfo (ppdev);
    533 #else
    534414    /* Inform the host about this screen layout. */
    535415    DISPDBG((1, "bInitSURF: %d,%d\n", ppdev->ptlDevOrg.x, ppdev->ptlDevOrg.y));
    536416    VBoxProcessDisplayInfo (ppdev);
    537 #endif /* VBOX_WITH_HGSMI */
    538417
    539418#ifdef VBOX_WITH_VIDEOHWACCEL
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/vbox.c

    r29260 r33048  
    4141static BOOL vboxHwBufferWrite (PPDEV ppdev, const void *p, uint32_t cb);
    4242
    43 #ifndef VBOX_WITH_HGSMI
    44 /*
    45  * Public hardware buffer methods.
    46  */
    47 BOOL vboxVbvaEnable (PPDEV ppdev)
    48 {
    49     BOOL bRc = FALSE;
    50 
    51     ULONG returnedDataLength;
    52     ULONG ulEnable = TRUE;
    53 
    54     DISPDBG((1, "VBoxDisp::vboxVbvaEnable called\n"));
    55 
    56     if (!ghsemHwBuffer)
    57     {
    58         return FALSE;
    59     }
    60 
    61     if (EngDeviceIoControl(ppdev->hDriver,
    62                            IOCTL_VIDEO_VBVA_ENABLE,
    63                            &ulEnable,
    64                            sizeof (ulEnable),
    65                            &ppdev->vbva,
    66                            sizeof (ppdev->vbva),
    67                            &returnedDataLength) == 0)
    68     {
    69         DISPDBG((1, "VBoxDisp::vboxVbvaEnable: vbva: pVbvaMemory = %p, pfnFlush = %p, pvFlush = %p.\n",
    70                      ppdev->vbva.pVbvaMemory, ppdev->vbva.pfnFlush, ppdev->vbva.pvFlush));
    71 
    72         if (ppdev->vbva.pVbvaMemory
    73             && ppdev->vbva.pfnFlush
    74             && ppdev->vbva.pvFlush)
    75         {
    76             ppdev->fHwBufferOverflow = FALSE;
    77             ppdev->pRecord           = NULL;
    78 
    79             /* All have been initialized. */
    80             bRc = TRUE;
    81         }
    82     }
    83 
    84     if (!bRc)
    85     {
    86         vboxVbvaDisable (ppdev);
    87     }
    88 
    89     return bRc;
    90 }
    91 
    92 void vboxVbvaDisable (PPDEV ppdev)
    93 {
    94     DISPDBG((1, "VBoxDisp::vbvaDisable called.\n"));
    95 
    96     RtlZeroMemory (&ppdev->vbva, sizeof (ppdev->vbva));
    97 
    98     ppdev->fHwBufferOverflow = FALSE;
    99     ppdev->pRecord           = NULL;
    100 
    101     return;
    102 }
    103 
    104 BOOL vboxHwBufferBeginUpdate (PPDEV ppdev)
    105 {
    106     BOOL bRc = FALSE;
    107 
    108     VBVAMEMORY *pVbvaMemory = ppdev->vbva.pVbvaMemory;
    109 
    110     DISPDBG((1, "VBoxDisp::vboxHwBufferBeginUpdate called flags = 0x%08X\n", pVbvaMemory? pVbvaMemory->fu32ModeFlags: -1));
    111 
    112     if (   pVbvaMemory
    113         && (pVbvaMemory->fu32ModeFlags & VBVA_F_MODE_ENABLED))
    114     {
    115         uint32_t indexRecordNext;
    116 
    117         EngAcquireSemaphore (ghsemHwBuffer);
    118 
    119         VBVA_ASSERT (!ppdev->fHwBufferOverflow);
    120         VBVA_ASSERT (ppdev->pRecord == NULL);
    121 
    122         indexRecordNext = (pVbvaMemory->indexRecordFree + 1) % VBVA_MAX_RECORDS;
    123 
    124         if (indexRecordNext == pVbvaMemory->indexRecordFirst)
    125         {
    126             /* All slots in the records queue are used. */
    127             vboxHwBufferFlush (ppdev);
    128         }
    129 
    130         if (indexRecordNext == pVbvaMemory->indexRecordFirst)
    131         {
    132             /* Even after flush there is no place. Fail the request. */
    133             DISPDBG((1, "VBoxDisp::vboxHwBufferBeginUpdate no space in the queue of records!!! first %d, last %d\n",
    134                      pVbvaMemory->indexRecordFirst, pVbvaMemory->indexRecordFree));
    135             EngReleaseSemaphore (ghsemHwBuffer);
    136         }
    137         else
    138         {
    139             /* Initialize the record. */
    140             VBVARECORD *pRecord = &pVbvaMemory->aRecords[pVbvaMemory->indexRecordFree];
    141 
    142             pRecord->cbRecord = VBVA_F_RECORD_PARTIAL;
    143 
    144             pVbvaMemory->indexRecordFree = indexRecordNext;
    145 
    146             DISPDBG((1, "VBoxDisp::vboxHwBufferBeginUpdate indexRecordNext = %d\n", indexRecordNext));
    147 
    148             /* Remember which record we are using. */
    149             ppdev->pRecord = pRecord;
    150 
    151             bRc = TRUE;
    152         }
    153     }
    154 
    155     return bRc;
    156 }
    157 
    158 void vboxHwBufferEndUpdate (PPDEV ppdev)
    159 {
    160     VBVAMEMORY *pVbvaMemory;
    161     VBVARECORD *pRecord;
    162 
    163     DISPDBG((1, "VBoxDisp::vboxHwBufferEndUpdate called\n"));
    164 
    165     pVbvaMemory = ppdev->vbva.pVbvaMemory;
    166     VBVA_ASSERT(pVbvaMemory);
    167 
    168     pRecord = ppdev->pRecord;
    169     VBVA_ASSERT (pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL));
    170 
    171     /* Mark the record completed. */
    172     pRecord->cbRecord &= ~VBVA_F_RECORD_PARTIAL;
    173 
    174     ppdev->fHwBufferOverflow = FALSE;
    175     ppdev->pRecord = NULL;
    176 
    177     EngReleaseSemaphore (ghsemHwBuffer);
    178 
    179     return;
    180 }
    181 
    182 /*
    183  * Private operations.
    184  */
    185 static uint32_t vboxHwBufferAvail (VBVAMEMORY *pVbvaMemory)
    186 {
    187     int32_t i32Diff = pVbvaMemory->off32Data - pVbvaMemory->off32Free;
    188 
    189     return i32Diff > 0? i32Diff: VBVA_RING_BUFFER_SIZE + i32Diff;
    190 }
    191 
    192 static void vboxHwBufferFlush (PPDEV ppdev)
    193 {
    194     VBVAMEMORY *pVbvaMemory = ppdev->vbva.pVbvaMemory;
    195 
    196     VBVA_ASSERT (pVbvaMemory);
    197 
    198     ppdev->vbva.pfnFlush (ppdev->vbva.pvFlush);
    199 
    200     return;
    201 }
    202 
    203 static void vboxHwBufferPlaceDataAt (PPDEV ppdev, void *p, uint32_t cb, uint32_t offset)
    204 {
    205     VBVAMEMORY *pVbvaMemory = ppdev->vbva.pVbvaMemory;
    206 
    207     uint32_t u32BytesTillBoundary = VBVA_RING_BUFFER_SIZE - offset;
    208     uint8_t  *dst                 = &pVbvaMemory->au8RingBuffer[offset];
    209     int32_t i32Diff               = cb - u32BytesTillBoundary;
    210 
    211     if (i32Diff <= 0)
    212     {
    213         /* Chunk will not cross buffer boundary. */
    214         memcpy (dst, p, cb);
    215     }
    216     else
    217     {
    218         /* Chunk crosses buffer boundary. */
    219         memcpy (dst, p, u32BytesTillBoundary);
    220         memcpy (&pVbvaMemory->au8RingBuffer[0], (uint8_t *)p + u32BytesTillBoundary, i32Diff);
    221     }
    222 
    223     return;
    224 }
    225 
    226 static BOOL vboxHwBufferWrite (PPDEV ppdev, const void *p, uint32_t cb)
    227 {
    228     VBVAMEMORY *pVbvaMemory;
    229     VBVARECORD *pRecord;
    230     uint32_t cbHwBufferAvail;
    231 
    232     uint32_t cbWritten = 0;
    233 
    234     VBVA_ASSERT(ppdev);
    235 
    236     if (ppdev->fHwBufferOverflow)
    237     {
    238         return FALSE;
    239     }
    240 
    241     pVbvaMemory = ppdev->vbva.pVbvaMemory;
    242     VBVA_ASSERT (pVbvaMemory->indexRecordFirst != pVbvaMemory->indexRecordFree);
    243 
    244     pRecord = ppdev->pRecord;
    245     VBVA_ASSERT (pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL));
    246 
    247     DISPDBG((1, "VW %d\n", cb));
    248 
    249     cbHwBufferAvail = vboxHwBufferAvail (pVbvaMemory);
    250 
    251     while (cb > 0)
    252     {
    253         uint32_t cbChunk = cb;
    254 
    255 //        DISPDBG((1, "VBoxDisp::vboxHwBufferWrite pVbvaMemory->off32Free %d, pRecord->cbRecord 0x%08X, cbHwBufferAvail %d, cb %d, cbWritten %d\n", pVbvaMemory->off32Free, pRecord->cbRecord, cbHwBufferAvail, cb, cbWritten));
    256 
    257         if (cbChunk >= cbHwBufferAvail)
    258         {
    259             DISPDBG((1, "VBoxDisp::vboxHwBufferWrite 1) avail %d, chunk %d\n", cbHwBufferAvail, cbChunk));
    260 
    261             vboxHwBufferFlush (ppdev);
    262 
    263             cbHwBufferAvail = vboxHwBufferAvail (pVbvaMemory);
    264 
    265             if (cbChunk >= cbHwBufferAvail)
    266             {
    267                 DISPDBG((1, "VBoxDisp::vboxHwBufferWrite: no place for %d bytes. Only %d bytes available after flush. Going to partial writes.\n", cb, cbHwBufferAvail));
    268 
    269                 if (cbHwBufferAvail <= VBVA_RING_BUFFER_THRESHOLD)
    270                 {
    271                     DISPDBG((1, "VBoxDisp::vboxHwBufferWrite: Buffer overflow!!!\n"));
    272                     ppdev->fHwBufferOverflow = TRUE;
    273                     VBVA_ASSERT(FALSE);
    274                     return FALSE;
    275                 }
    276 
    277                 cbChunk = cbHwBufferAvail - VBVA_RING_BUFFER_THRESHOLD;
    278             }
    279         }
    280 
    281         VBVA_ASSERT(cbChunk <= cb);
    282         VBVA_ASSERT(cbChunk <= vboxHwBufferAvail (pVbvaMemory));
    283 
    284         vboxHwBufferPlaceDataAt (ppdev, (uint8_t *)p + cbWritten, cbChunk, pVbvaMemory->off32Free);
    285 
    286         pVbvaMemory->off32Free  = (pVbvaMemory->off32Free + cbChunk) % VBVA_RING_BUFFER_SIZE;
    287         pRecord->cbRecord      += cbChunk;
    288         cbHwBufferAvail -= cbChunk;
    289 
    290         cb        -= cbChunk;
    291         cbWritten += cbChunk;
    292     }
    293 
    294     return TRUE;
    295 }
    296 
    297 /*
    298  * Public writer to hardware buffer.
    299  */
    300 BOOL vboxWrite (PPDEV ppdev, const void *pv, uint32_t cb)
    301 {
    302     return vboxHwBufferWrite (ppdev, pv, cb);
    303 }
    304 
    305 BOOL vboxOrderSupported (PPDEV ppdev, unsigned code)
    306 {
    307     VBVAMEMORY *pVbvaMemory;
    308 
    309     pVbvaMemory = ppdev->vbva.pVbvaMemory;
    310 
    311     if (pVbvaMemory->fu32ModeFlags & VBVA_F_MODE_VRDP_ORDER_MASK)
    312     {
    313         /* Order masking enabled. */
    314         if (pVbvaMemory->fu32SupportedOrders & (1 << code))
    315         {
    316             return TRUE;
    317         }
    318     }
    319 
    320     return FALSE;
    321 }
    322 
    323 void VBoxProcessDisplayInfo(PPDEV ppdev)
    324 {
    325     DWORD returnedDataLength;
    326 
    327     DISPDBG((1, "Process: %d,%d\n", ppdev->ptlDevOrg.x, ppdev->ptlDevOrg.y));
    328 
    329     EngDeviceIoControl(ppdev->hDriver,
    330                        IOCTL_VIDEO_INTERPRET_DISPLAY_MEMORY,
    331                        NULL,
    332                        0,
    333                        NULL,
    334                        0,
    335                        &returnedDataLength);
    336 }
    337 
    338 #else /* VBOX_WITH_HGSMI */
    33943
    34044static void vboxHGSMIBufferSubmit (PPDEV ppdev, void *p)
     
    700404}
    701405
    702 # ifdef VBOX_WITH_VIDEOHWACCEL
     406#ifdef VBOX_WITH_VIDEOHWACCEL
    703407
    704408VBOXVHWACMD* vboxVHWACommandCreate (PPDEV ppdev, VBOXVHWACMD_TYPE enmCmd, VBOXVHWACMD_LENGTH cbCmd)
     
    758462    switch(pCmd->customOpCode)
    759463    {
    760 # ifdef VBOX_WITH_VIDEOHWACCEL
     464# ifdef VBOX_WITH_VIDEOHWACCEL /** @todo why is this ifdef nested within itself? */
    761465        case VBVAHG_DCUSTOM_VHWA_CMDCOMPLETE:
    762466        {
     
    1087791}
    1088792
    1089 # endif
     793#endif
    1090794
    1091795void vboxVBVAHostCommandComplete(PPDEV ppdev, VBVAHOSTCMD * pCmd)
     
    1094798}
    1095799
    1096 #endif /* VBOX_WITH_HGSMI */
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Helper.cpp

    r32831 r33048  
    321321}
    322322
    323 #ifndef VBOX_WITH_HGSMI
    324 /**
    325  * Sends the pointer shape to the VMMDev
    326  *
    327  * @returns success indicator
    328  * @param pointerAttr pointer description
    329  */
    330 BOOLEAN vboxUpdatePointerShape(PVIDEO_POINTER_ATTRIBUTES pointerAttr, uint32_t cbLength)
    331 {
    332     uint32_t cbData = 0;
    333 
    334     if (pointerAttr->Enable & VBOX_MOUSE_POINTER_SHAPE)
    335     {
    336          cbData = ((((pointerAttr->Width + 7) / 8) * pointerAttr->Height + 3) & ~3)
    337                   + pointerAttr->Width * 4 * pointerAttr->Height;
    338     }
    339 
    340     if (cbData > cbLength - sizeof(VIDEO_POINTER_ATTRIBUTES))
    341     {
    342         dprintf(("vboxUpdatePointerShape: calculated pointer data size is too big (%d bytes, limit %d)\n",
    343                  cbData, cbLength - sizeof(VIDEO_POINTER_ATTRIBUTES)));
    344         return FALSE;
    345     }
    346 
    347     BOOLEAN bRC = FALSE;
    348 
    349     VMMDevReqMousePointer *req = NULL;
    350 
    351     int rc = VbglGRAlloc ((VMMDevRequestHeader **)&req, sizeof (VMMDevReqMousePointer) + cbData, VMMDevReq_SetPointerShape);
    352 
    353     if (RT_FAILURE(rc))
    354     {
    355         dprintf(("VBoxVideo::vboxUpdatePointerShape: ERROR allocating request, rc = %Rrc\n", rc));
    356     }
    357     else
    358     {
    359         /* Activate next line only when really needed; floods the log very quickly! */
    360         /*dprintf(("VBoxVideo::vboxUpdatePointerShape: req->u32Version = %08X\n", req->header.version));*/
    361 
    362         /* We have our custom flags in the field */
    363         req->fFlags = pointerAttr->Enable & 0xFFFF;
    364 
    365         /* Even if pointer is invisible, we have to pass following data,
    366          * so host could create the pointer with initial status - invisible
    367          */
    368         req->xHot   = (pointerAttr->Enable >> 16) & 0xFF;
    369         req->yHot   = (pointerAttr->Enable >> 24) & 0xFF;
    370         req->width  = pointerAttr->Width;
    371         req->height = pointerAttr->Height;
    372 
    373         if (req->fFlags & VBOX_MOUSE_POINTER_SHAPE)
    374         {
    375             /* copy the actual pointer data */
    376             memcpy (req->pointerData, pointerAttr->Pixels, cbData);
    377         }
    378 
    379         rc = VbglGRPerform (&req->header);
    380 
    381         if (RT_SUCCESS(rc))
    382         {
    383             bRC = TRUE;
    384         }
    385         else
    386         {
    387             dprintf(("VBoxVideo::vboxUpdatePointerShape: ERROR querying mouse capabilities from VMMDev. "
    388                      "rc = %Rrc\n", rc));
    389         }
    390 
    391         dprintf(("VBoxVideo::vboxUpdatePointerShape: req->u32Version = %08X\n", req->header.version));
    392 
    393         VbglGRFree (&req->header);
    394     }
    395 
    396     return bRC;
    397 }
    398 #endif /* VBOX_WITH_HGSMI */
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Helper.h

    r28800 r33048  
    3737BOOLEAN vboxQueryHostWantsAbsolute();
    3838winVersion_t vboxQueryWinVersion();
    39 #ifndef VBOX_WITH_HGSMI
    40 BOOLEAN vboxUpdatePointerShape(PVIDEO_POINTER_ATTRIBUTES pointerAttr, uint32_t cbLength);
    41 #endif /* !VBOX_WITH_HGSMI */
    4239
    4340#include "vboxioctl.h"
     
    4845
    4946/* debug printf */
    50 # define OSDBGPRINT(a) DbgPrint a
     47#define OSDBGPRINT(a) DbgPrint a
    5148
    5249/* dprintf */
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Makefile.kmk

    r32889 r33048  
    3232endif
    3333VBoxVideo_DEFS        = LOG_TO_BACKDOOR VBOX_WITH_8BPP_MODES
    34 ifdef VBOX_WITH_HGSMI
    35  VBoxVideo_DEFS      += VBOX_WITH_HGSMI
    36 endif
    3734ifdef VBOX_WITH_VIDEOHWACCEL
    3835 VBoxVideo_DEFS      += VBOX_WITH_VIDEOHWACCEL
     
    4744        Helper.cpp \
    4845        VBoxVideo.def \
    49         VBoxVideo.rc
    50 ifdef VBOX_WITH_HGSMI
    51  VBoxVideo_SOURCES   += \
     46        VBoxVideo.rc \
    5247        VBoxVideoHGSMI.cpp
    53 endif
    5448VBoxVideo_LIBS.x86    = \
    5549        $(PATH_SDK_W2K3DDK_LIB)/exsup.lib
     
    5953        $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
    6054        $(VBOX_LIB_VBGL_R0) \
    61         $(VBOX_LIB_IPRT_GUEST_R0_NT4)
    62 ifdef VBOX_WITH_HGSMI
    63  VBoxVideo_LIBS      += \
     55        $(VBOX_LIB_IPRT_GUEST_R0_NT4) \
    6456        $(VBOX_PATH_ADDITIONS_LIB)/HGSMIGuestR0Lib$(VBOX_SUFF_LIB)
    65 endif
    6657
    6758
     
    7970 VBoxVideoWddm_SDKS=WINDDKWLH
    8071 VBoxVideoWddm_DEFS       += VBOX_WITH_8BPP_MODES
    81  VBoxVideoWddm_DEFS       += VBOX_WITH_HGSMI VBOX_WITH_WDDM
     72 VBoxVideoWddm_DEFS       += VBOX_WITH_WDDM
    8273 ifdef VBOX_WITH_VIDEOHWACCEL
    8374  VBoxVideoWddm_DEFS      += VBOX_WITH_VIDEOHWACCEL
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r33022 r33048  
    7070    InitData.HwFindAdapter = VBoxVideoFindAdapter;
    7171    InitData.HwInitialize = VBoxVideoInitialize;
    72 #if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
     72#ifdef VBOX_WITH_VIDEOHWACCEL
    7373    InitData.HwInterrupt = VBoxVideoInterrupt;
    7474#else
     
    13411341void VBoxComputeFrameBufferSizes (PDEVICE_EXTENSION PrimaryExtension)
    13421342{
    1343 #ifndef VBOX_WITH_HGSMI
    1344     ULONG ulAvailable = commonFromDeviceExt(PrimaryExtension)->cbVRAM
    1345                         - commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap
    1346                         - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE;
    1347 #else
    13481343    ULONG ulAvailable = commonFromDeviceExt(PrimaryExtension)->cbVRAM
    13491344                        - commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap
    13501345                        - VBVA_ADAPTER_INFORMATION_SIZE;
    1351 #endif /* VBOX_WITH_HGSMI */
    13521346
    13531347    /* Size of a framebuffer. */
     
    13631357             ulAvailable - ulSize * PrimaryExtension->u.primary.cDisplays));
    13641358
    1365 #ifndef VBOX_WITH_HGSMI
    1366     if (ulSize > VBOX_VIDEO_DISPLAY_INFORMATION_SIZE)
    1367     {
    1368         /* Compute the size of the framebuffer. */
    1369         ulSize -= VBOX_VIDEO_DISPLAY_INFORMATION_SIZE;
    1370     }
    1371     else
    1372     {
    1373         /* Should not really get here. But still do it safely. */
    1374         ulSize = 0;
    1375     }
    1376 #endif /* !VBOX_WITH_HGSMI */
    13771359
    13781360    /* Update the primary info. */
    13791361    PrimaryExtension->u.primary.ulMaxFrameBufferSize     = ulSize;
    1380 #ifndef VBOX_WITH_HGSMI
    1381     PrimaryExtension->u.primary.ulDisplayInformationSize = VBOX_VIDEO_DISPLAY_INFORMATION_SIZE;
    1382 #endif /* !VBOX_WITH_HGSMI */
    13831362
    13841363    /* Update the per extension info. */
     
    13941373                 Extension->iDevice, ulFrameBufferOffset));
    13951374
    1396 #ifndef VBOX_WITH_HGSMI
    1397         ulFrameBufferOffset += PrimaryExtension->u.primary.ulMaxFrameBufferSize
    1398                                + PrimaryExtension->u.primary.ulDisplayInformationSize;
    1399 #else
    14001375        ulFrameBufferOffset += PrimaryExtension->u.primary.ulMaxFrameBufferSize;
    1401 #endif /* VBOX_WITH_HGSMI */
    14021376
    14031377        Extension = Extension->pNext;
     
    15091483}
    15101484
    1511 #ifndef VBOX_WITH_HGSMI
    1512 
    1513 # ifdef VBOX_WITH_WDDM
    1514 /* sanity check */
    1515 #  error WDDM is supported only for HGSMI-based driver
    1516 # endif
    1517 
    1518 static void vboxQueryConf (PDEVICE_EXTENSION PrimaryExtension, uint32_t u32Index, ULONG *pulValue)
    1519 {
    1520     dprintf(("VBoxVideo::vboxQueryConf: u32Index = %d\n", u32Index));
    1521 
    1522     typedef struct _VBOXVIDEOQCONF32
    1523     {
    1524         VBOXVIDEOINFOHDR hdrQuery;
    1525         VBOXVIDEOINFOQUERYCONF32 query;
    1526         VBOXVIDEOINFOHDR hdrEnd;
    1527     } VBOXVIDEOQCONF32;
    1528 
    1529     VBOXVIDEOQCONF32 *p = (VBOXVIDEOQCONF32 *)commonFromDeviceExt(PrimaryExtension)->pvAdapterInformation;
    1530 
    1531     p->hdrQuery.u8Type     = VBOX_VIDEO_INFO_TYPE_QUERY_CONF32;
    1532     p->hdrQuery.u8Reserved = 0;
    1533     p->hdrQuery.u16Length  = sizeof (VBOXVIDEOINFOQUERYCONF32);
    1534 
    1535     p->query.u32Index = u32Index;
    1536     p->query.u32Value = 0;
    1537 
    1538     p->hdrEnd.u8Type     = VBOX_VIDEO_INFO_TYPE_END;
    1539     p->hdrEnd.u8Reserved = 0;
    1540     p->hdrEnd.u16Length  = 0;
    1541 
    1542     /* Let the host to process the commands. */
    1543     VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_VBOX_VIDEO);
    1544     VideoPortWritePortUlong((PULONG)VBE_DISPI_IOPORT_DATA, VBOX_VIDEO_INTERPRET_ADAPTER_MEMORY);
    1545 
    1546     *pulValue = (ULONG)p->query.u32Value;
    1547 
    1548     dprintf(("VBoxVideo::vboxQueryConf: u32Value = %d\n", p->query.u32Value));
    1549 }
    1550 
    1551 static void vboxSetupAdapterInfo (PDEVICE_EXTENSION PrimaryExtension)
    1552 {
    1553     dprintf(("VBoxVideo::vboxSetupAdapterInfo\n"));
    1554 
    1555     VBOXVIDEOINFOHDR *pHdr;
    1556 
    1557     uint8_t *pu8 = (uint8_t *)PrimaryExtension->u.primary.pvAdapterInformation;
    1558 
    1559     PDEVICE_EXTENSION Extension = PrimaryExtension;
    1560     while (Extension)
    1561     {
    1562         pHdr = (VBOXVIDEOINFOHDR *)pu8;
    1563         pu8 += sizeof (VBOXVIDEOINFOHDR);
    1564 
    1565         pHdr->u8Type     = VBOX_VIDEO_INFO_TYPE_DISPLAY;
    1566         pHdr->u8Reserved = 0;
    1567         pHdr->u16Length  = sizeof (VBOXVIDEOINFODISPLAY);
    1568 
    1569         VBOXVIDEOINFODISPLAY *pDisplay = (VBOXVIDEOINFODISPLAY *)pu8;
    1570         pu8 += sizeof (VBOXVIDEOINFODISPLAY);
    1571 
    1572         pDisplay->u32Index           = Extension->iDevice;
    1573         pDisplay->u32Offset          = Extension->ulFrameBufferOffset;
    1574         pDisplay->u32FramebufferSize = PrimaryExtension->u.primary.ulMaxFrameBufferSize;
    1575         pDisplay->u32InformationSize = PrimaryExtension->u.primary.ulDisplayInformationSize;
    1576 
    1577         Extension = Extension->pNext;
    1578     }
    1579 
    1580 
    1581     /* The heap description. */
    1582     pHdr = (VBOXVIDEOINFOHDR *)pu8;
    1583     pu8 += sizeof (VBOXVIDEOINFOHDR);
    1584 
    1585     pHdr->u8Type     = VBOX_VIDEO_INFO_TYPE_NV_HEAP;
    1586     pHdr->u8Reserved = 0;
    1587     pHdr->u16Length  = sizeof (VBOXVIDEOINFONVHEAP);
    1588 
    1589     VBOXVIDEOINFONVHEAP *pHeap = (VBOXVIDEOINFONVHEAP *)pu8;
    1590     pu8 += sizeof (VBOXVIDEOINFONVHEAP);
    1591 
    1592     pHeap->u32HeapOffset = PrimaryExtension->u.primary.cbVRAM
    1593                            - PrimaryExtension->u.primary.cbMiniportHeap
    1594                            - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE;
    1595     pHeap->u32HeapSize = PrimaryExtension->u.primary.cbMiniportHeap;
    1596 
    1597 
    1598     /* The END marker. */
    1599     pHdr = (VBOXVIDEOINFOHDR *)pu8;
    1600     pu8 += sizeof (VBOXVIDEOINFOHDR);
    1601 
    1602     pHdr->u8Type     = VBOX_VIDEO_INFO_TYPE_END;
    1603     pHdr->u8Reserved = 0;
    1604     pHdr->u16Length  = 0;
    1605 
    1606     /* Inform the host about the display configuration. */
    1607     VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_VBOX_VIDEO);
    1608     VideoPortWritePortUlong((PULONG)VBE_DISPI_IOPORT_DATA, VBOX_VIDEO_INTERPRET_ADAPTER_MEMORY);
    1609 
    1610     dprintf(("VBoxVideo::vboxSetupAdapterInfo finished\n"));
    1611 }
    1612 
    1613 /**
    1614  * Helper function to register secondary displays (DualView). Note that this will not
    1615  * be available on pre-XP versions, and some editions on XP will fail because they are
    1616  * intentionally crippled.
    1617  */
    1618 VOID VBoxSetupDisplays(PDEVICE_EXTENSION PrimaryExtension, PVIDEO_PORT_CONFIG_INFO pConfigInfo, ULONG AdapterMemorySize)
    1619 {
    1620     VP_STATUS rc = NO_ERROR;
    1621 
    1622     dprintf(("VBoxVideo::VBoxSetupDisplays: PrimaryExtension = %p\n",
    1623              PrimaryExtension));
    1624 
    1625     /* Preinitialize the primary extension. */
    1626     PrimaryExtension->pNext                              = NULL;
    1627     PrimaryExtension->pPrimary                           = PrimaryExtension;
    1628     PrimaryExtension->iDevice                            = 0;
    1629     PrimaryExtension->ulFrameBufferOffset                = 0;
    1630     PrimaryExtension->ulFrameBufferSize                  = 0;
    1631     PrimaryExtension->u.primary.ulVbvaEnabled            = 0;
    1632     PrimaryExtension->u.primary.bVBoxVideoSupported      = FALSE;
    1633     PrimaryExtension->u.primary.cDisplays                = 1;
    1634     PrimaryExtension->u.primary.cbVRAM                   = AdapterMemorySize;
    1635     PrimaryExtension->u.primary.cbMiniportHeap           = 0;
    1636     PrimaryExtension->u.primary.pvMiniportHeap           = NULL;
    1637     PrimaryExtension->u.primary.pvAdapterInformation     = NULL;
    1638     PrimaryExtension->u.primary.ulMaxFrameBufferSize     = 0;
    1639     PrimaryExtension->u.primary.ulDisplayInformationSize = 0;
    1640 
    1641     /* Verify whether the HW supports VirtualBox extensions. */
    1642     VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID);
    1643     VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_DATA,  VBE_DISPI_ID_VBOX_VIDEO);
    1644 
    1645     if (VideoPortReadPortUshort((PUSHORT)VBE_DISPI_IOPORT_DATA) == VBE_DISPI_ID_VBOX_VIDEO)
    1646     {
    1647         PrimaryExtension->u.primary.bVBoxVideoSupported = TRUE;
    1648     }
    1649 
    1650     dprintf(("VBoxVideo::VBoxSetupDisplays: bVBoxVideoSupported = %d\n",
    1651              PrimaryExtension->u.primary.bVBoxVideoSupported));
    1652 
    1653     if (PrimaryExtension->u.primary.bVBoxVideoSupported)
    1654     {
    1655         /* Map the adapter information. It will be needed to query some configuration values. */
    1656         rc = VBoxMapAdapterMemory (PrimaryExtension,
    1657                                    &PrimaryExtension->u.primary.pvAdapterInformation,
    1658                                    PrimaryExtension->u.primary.cbVRAM - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE,
    1659                                    VBOX_VIDEO_ADAPTER_INFORMATION_SIZE
    1660                                   );
    1661         if (rc != NO_ERROR)
    1662         {
    1663             dprintf(("VBoxVideo::VBoxSetupDisplays: VBoxMapAdapterMemory pvAdapterInfoirrmation failed rc = %d\n",
    1664                      rc));
    1665 
    1666             PrimaryExtension->u.primary.bVBoxVideoSupported = FALSE;
    1667         }
    1668     }
    1669 
    1670     /* Setup the non-volatile heap and the adapter memory. */
    1671     if (PrimaryExtension->u.primary.bVBoxVideoSupported)
    1672     {
    1673         /* Query the size of the non-volatile heap. */
    1674         ULONG cbMiniportHeap = 0;
    1675         vboxQueryConf (PrimaryExtension, VBOX_VIDEO_QCI32_OFFSCREEN_HEAP_SIZE, &cbMiniportHeap);
    1676 
    1677         /* Do not allow too big heap. 50% of VRAM should be enough. */
    1678         ULONG cbMiniportHeapMaxSize = AdapterMemorySize / 2 - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE;
    1679 
    1680         if (cbMiniportHeap > cbMiniportHeapMaxSize)
    1681         {
    1682             cbMiniportHeap = cbMiniportHeapMaxSize;
    1683         }
    1684 
    1685         /* Round up to 4096. */
    1686         PrimaryExtension->u.primary.cbMiniportHeap = (cbMiniportHeap + 0xFFF) & ~0xFFF;
    1687 
    1688         dprintf(("VBoxVideo::VBoxSetupDisplays: cbMiniportHeap = 0x%08X, PrimaryExtension->u.primary.cbMiniportHeap = 0x%08X, cbMiniportHeapMaxSize = 0x%08X\n",
    1689                  cbMiniportHeap, PrimaryExtension->u.primary.cbMiniportHeap, cbMiniportHeapMaxSize));
    1690 
    1691         /* Map the heap region and the adapter information area.
    1692          *
    1693          * Note: the heap will be used by display drivers, possibly by a few instances
    1694          *       in multimonitor configuration, but the memory is mapped here ones.
    1695          *       It is assumed that all display drivers and the miniport has the SAME
    1696          *       virtual address space.
    1697          *
    1698          */
    1699         rc = VBoxMapAdapterMemory (PrimaryExtension,
    1700                                    &PrimaryExtension->u.primary.pvMiniportHeap,
    1701                                    PrimaryExtension->u.primary.cbVRAM
    1702                                    - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE
    1703                                    - PrimaryExtension->u.primary.cbMiniportHeap,
    1704                                    PrimaryExtension->u.primary.cbMiniportHeap
    1705                                   );
    1706 
    1707         if (rc != NO_ERROR)
    1708         {
    1709             PrimaryExtension->u.primary.cbMiniportHeap = 0;
    1710             PrimaryExtension->u.primary.bVBoxVideoSupported = FALSE;
    1711         }
    1712     }
    1713 
    1714     /* Check whether the guest supports multimonitors. */
    1715     if (PrimaryExtension->u.primary.bVBoxVideoSupported)
    1716     {
    1717         typedef VP_STATUS (*PFNCREATESECONDARYDISPLAY)(PVOID, PVOID *, ULONG);
    1718         PFNCREATESECONDARYDISPLAY pfnCreateSecondaryDisplay = NULL;
    1719 
    1720         /* Dynamically query the VideoPort import to be binary compatible across Windows versions */
    1721         if (vboxQueryWinVersion() > WINNT4)
    1722         {
    1723             /* This bluescreens on NT4, hence the above version check */
    1724             pfnCreateSecondaryDisplay = (PFNCREATESECONDARYDISPLAY)(pConfigInfo->VideoPortGetProcAddress)
    1725                                                                        (PrimaryExtension,
    1726                                                                         (PUCHAR)"VideoPortCreateSecondaryDisplay");
    1727         }
    1728 
    1729         if (pfnCreateSecondaryDisplay != NULL)
    1730         {
    1731             /* Query the configured number of displays. */
    1732             ULONG cDisplays = 0;
    1733             vboxQueryConf (PrimaryExtension, VBOX_VIDEO_QCI32_MONITOR_COUNT, &cDisplays);
    1734 
    1735             dprintf(("VBoxVideo::VBoxSetupDisplays: cDisplays = %d\n",
    1736                      cDisplays));
    1737 
    1738             if (cDisplays == 0 || cDisplays > VBOX_VIDEO_MAX_SCREENS)
    1739             {
    1740                 /* Host reported some bad value. Continue in the 1 screen mode. */
    1741                 cDisplays = 1;
    1742             }
    1743 
    1744             PDEVICE_EXTENSION pPrev = PrimaryExtension;
    1745 
    1746             ULONG iDisplay;
    1747             for (iDisplay = 1; iDisplay < cDisplays; iDisplay++)
    1748             {
    1749                PDEVICE_EXTENSION SecondaryExtension = NULL;
    1750                rc = pfnCreateSecondaryDisplay (PrimaryExtension, (PVOID*)&SecondaryExtension, VIDEO_DUALVIEW_REMOVABLE);
    1751 
    1752                dprintf(("VBoxVideo::VBoxSetupDisplays: VideoPortCreateSecondaryDisplay returned %#x, SecondaryExtension = %p\n",
    1753                         rc, SecondaryExtension));
    1754 
    1755                if (rc != NO_ERROR)
    1756                {
    1757                    break;
    1758                }
    1759 
    1760                SecondaryExtension->pNext                = NULL;
    1761                SecondaryExtension->pPrimary             = PrimaryExtension;
    1762                SecondaryExtension->iDevice              = iDisplay;
    1763                SecondaryExtension->ulFrameBufferOffset  = 0;
    1764                SecondaryExtension->ulFrameBufferSize    = 0;
    1765                SecondaryExtension->u.secondary.bEnabled = FALSE;
    1766 
    1767                /* Update the list pointers. */
    1768                pPrev->pNext = SecondaryExtension;
    1769                pPrev = SecondaryExtension;
    1770 
    1771                /* Take the successfully created display into account. */
    1772                PrimaryExtension->u.primary.cDisplays++;
    1773             }
    1774 
    1775             /* Failure to create secondary displays is not fatal */
    1776             rc = NO_ERROR;
    1777         }
    1778     }
    1779 
    1780     /* Now when the number of monitors is known and extensions are created,
    1781      * calculate the layout of framebuffers.
    1782      */
    1783     VBoxComputeFrameBufferSizes (PrimaryExtension);
    1784 
    1785     if (PrimaryExtension->u.primary.bVBoxVideoSupported)
    1786     {
    1787         /* Setup the information for the host. */
    1788         vboxSetupAdapterInfo (PrimaryExtension);
    1789     }
    1790     else
    1791     {
    1792         /* Unmap the memory if VBoxVideo is not supported. */
    1793         VBoxUnmapAdapterMemory (PrimaryExtension, &PrimaryExtension->u.primary.pvMiniportHeap, PrimaryExtension->u.primary.cbMiniportHeap);
    1794         VBoxUnmapAdapterInformation (PrimaryExtension);
    1795     }
    1796 
    1797     dprintf(("VBoxVideo::VBoxSetupDisplays: finished\n"));
    1798 }
    1799 #endif /* !VBOX_WITH_HGSMI */
    18001485
    18011486void vboxVideoInitCustomVideoModes(PDEVICE_EXTENSION pDevExt)
     
    19161601   dprintf(("VBoxVideo::VBoxVideoFindAdapter %p\n", HwDeviceExtension));
    19171602
    1918 #ifdef VBOX_WITH_HGSMI
    19191603   VBoxSetupVideoPortFunctions((PDEVICE_EXTENSION)HwDeviceExtension, &((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.VideoPortProcs, ConfigInfo);
    1920 #endif
    19211604
    19221605   VideoPortWritePortUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID);
     
    19681651      dprintf(("VBoxVideo::VBoxVideoFindAdapter: calling VideoPortGetAccessRanges\n"));
    19691652
    1970 #ifdef VBOX_WITH_HGSMI
    19711653      /* pPrimary is not yet set */
    19721654      ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.commonInfo.IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;
    19731655      ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.commonInfo.IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST;
    1974 #endif /* VBOX_WITH_HGSMI */
    19751656
    19761657      VIDEO_ACCESS_RANGE tmpRanges[4];
     
    20141695      dprintf(("VBoxVideo::VBoxVideoFindAdapter: VbglInit returned 0x%x\n", rc));
    20151696
    2016 #ifndef VBOX_WITH_HGSMI
    2017       /* Setup the Device Extension and if possible secondary displays. */
    2018       VBoxSetupDisplays((PDEVICE_EXTENSION)HwDeviceExtension, ConfigInfo, AdapterMemorySize);
    2019 #else
    20201697      /* Guest supports only HGSMI, the old VBVA via VMMDev is not supported. Old
    20211698       * code will be ifdef'ed and later removed.
     
    20291706          LogRel(("VBoxVideo: using HGSMI\n"));
    20301707      }
    2031 #endif /* VBOX_WITH_HGSMI */
    20321708
    20331709      // pretend success to make the driver work.
     
    20621738}
    20631739
    2064 # if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
     1740# ifdef VBOX_WITH_VIDEOHWACCEL
    20651741
    20661742BOOLEAN VBoxVideoInterrupt(PVOID  HwDeviceExtension)
     
    20891765    return FALSE;
    20901766}
    2091 # endif /* #if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL) */
     1767# endif /* #ifdef VBOX_WITH_VIDEOHWACCEL */
    20921768#endif  /* #ifndef VBOX_WITH_WDDM */
    20931769/**
     
    21161792        PointerAttributes.Enable = VBOX_MOUSE_POINTER_VISIBLE;
    21171793
    2118 #ifndef VBOX_WITH_HGSMI
    2119         Result = vboxUpdatePointerShape(&PointerAttributes, sizeof (PointerAttributes));
    2120 #else
    21211794        Result = vboxUpdatePointerShape(PrimaryExtension, &PointerAttributes, sizeof (PointerAttributes));
    2122 #endif /* VBOX_WITH_HGSMI */
    21231795
    21241796        if (Result)
     
    23682040                PointerAttributes.Enable = 0;
    23692041
    2370 #ifndef VBOX_WITH_HGSMI
    2371                 Result = vboxUpdatePointerShape(&PointerAttributes, sizeof (PointerAttributes));
    2372 #else
    23732042                Result = vboxUpdatePointerShape((PDEVICE_EXTENSION)HwDeviceExtension, &PointerAttributes, sizeof (PointerAttributes));
    2374 #endif /* VBOX_WITH_HGSMI */
    23752043
    23762044                if (Result)
     
    24172085                dprintf(("\tBytes attached: %d\n", RequestPacket->InputBufferLength - sizeof(VIDEO_POINTER_ATTRIBUTES)));
    24182086#endif
    2419 #ifndef VBOX_WITH_HGSMI
    2420                 Result = vboxUpdatePointerShape(pPointerAttributes, RequestPacket->InputBufferLength);
    2421 #else
    24222087                Result = vboxUpdatePointerShape((PDEVICE_EXTENSION)HwDeviceExtension, pPointerAttributes, RequestPacket->InputBufferLength);
    2423 #endif /* VBOX_WITH_HGSMI */
    24242088                if (!Result)
    24252089                    dprintf(("VBoxVideo::VBoxVideoStartIO: Could not set hardware pointer -> fallback\n"));
     
    25532217        }
    25542218
    2555 #ifndef VBOX_WITH_HGSMI
    2556         case IOCTL_VIDEO_QUERY_DISPLAY_INFO:
    2557         {
    2558             dprintf(("VBoxVideo::VBoxVideoStartIO: IOCTL_VIDEO_QUERY_DISPLAY_INFO\n"));
    2559 
    2560             if (RequestPacket->OutputBufferLength < sizeof(QUERYDISPLAYINFORESULT))
    2561             {
    2562                 dprintf(("VBoxVideo::VBoxVideoStartIO: Output buffer too small: %d needed: %d!!!\n",
    2563                          RequestPacket->OutputBufferLength, sizeof(QUERYDISPLAYINFORESULT)));
    2564                 RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
    2565                 return FALSE;
    2566             }
    2567 
    2568             QUERYDISPLAYINFORESULT *pDispInfo = (QUERYDISPLAYINFORESULT *)RequestPacket->OutputBuffer;
    2569 
    2570             pDispInfo->iDevice = pDevExt->iDevice;
    2571             pDispInfo->u32DisplayInfoSize = pDevExt->pPrimary->u.primary.ulDisplayInformationSize;
    2572 
    2573             RequestPacket->StatusBlock->Information = sizeof(QUERYDISPLAYINFORESULT);
    2574             Result = TRUE;
    2575 
    2576             break;
    2577         }
    2578 #endif /* !VBOX_WITH_HGSMI */
    25792219
    25802220        case IOCTL_VIDEO_VBVA_ENABLE:
     
    26632303        }
    26642304
    2665 #ifdef VBOX_WITH_HGSMI
    26662305        case IOCTL_VIDEO_QUERY_HGSMI_INFO:
    26672306        {
     
    28182457        }
    28192458# endif
    2820 #endif /* VBOX_WITH_HGSMI */
    28212459        default:
    28222460            dprintf(("VBoxVideo::VBoxVideoStartIO: Unsupported %p, fn %d(0x%x)\n",
     
    30722710
    30732711    MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress;
    3074 #ifndef VBOX_WITH_HGSMI
    3075     MapInformation->VideoRamLength = DeviceExtension->pPrimary->u.primary.ulMaxFrameBufferSize
    3076                                      + DeviceExtension->pPrimary->u.primary.ulDisplayInformationSize;
    3077 #else
    30782712    MapInformation->VideoRamLength = DeviceExtension->pPrimary->u.primary.ulMaxFrameBufferSize;
    3079 #endif /* VBOX_WITH_HGSMI */
    30802713
    30812714    Status = VideoPortMapMemory(DeviceExtension, FrameBuffer,
     
    30932726        /* Save the new framebuffer size */
    30942727        DeviceExtension->ulFrameBufferSize = MapInformation->FrameBufferLength;
    3095 #ifdef VBOX_WITH_HGSMI
    30962728        HGSMIAreaInitialize (&DeviceExtension->areaDisplay,
    30972729                             MapInformation->FrameBufferBase,
    30982730                             MapInformation->FrameBufferLength,
    30992731                             DeviceExtension->ulFrameBufferOffset);
    3100 #endif /* VBOX_WITH_HGSMI */
    31012732        return TRUE;
    31022733    }
     
    31152746{
    31162747    dprintf(("VBoxVideo::VBoxVideoUnmapVideoMemory\n"));
    3117 #ifdef VBOX_WITH_HGSMI
    31182748    HGSMIAreaClear (&DeviceExtension->areaDisplay);
    3119 #endif /* VBOX_WITH_HGSMI */
    31202749    VideoPortUnmapMemory(DeviceExtension, VideoMemory->RequestedVirtualAddress, NULL);
    31212750    return TRUE;
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r33022 r33048  
    2020#include <iprt/assert.h>
    2121
    22 #ifdef VBOX_WITH_HGSMI
    2322//#include <iprt/thread.h>
    2423
     
    2625#include <VBox/HGSMI/HGSMIChSetup.h>
    2726#include "VBoxHGSMI.h"
    28 #endif /* VBOX_WITH_HGSMI */
    2927
    3028RT_C_DECLS_BEGIN
     
    8987/* The VBOX interface id. Indicates support for VBE_DISPI_INDEX_VBOX_VIDEO. */
    9088#define VBE_DISPI_ID_VBOX_VIDEO         0xBE00
    91 #ifdef VBOX_WITH_HGSMI
    9289#define VBE_DISPI_ID_HGSMI              0xBE01
    93 #endif /* VBOX_WITH_HGSMI */
    9490#define VBE_DISPI_DISABLED              0x00
    9591#define VBE_DISPI_ENABLED               0x01
     
    10096#define VBE_DISPI_TOTAL_VIDEO_MEMORY_BYTES      (VBE_DISPI_TOTAL_VIDEO_MEMORY_KB * 1024)
    10197
    102 #ifdef VBOX_WITH_HGSMI
    10398#define VGA_PORT_HGSMI_HOST  0x3b0
    10499#define VGA_PORT_HGSMI_GUEST 0x3d0
    105 #endif /* VBOX_WITH_HGSMI */
    106100
    107101/* common API types */
     
    211205                                         * This is mapped by miniport separately.
    212206                                         */
    213 #ifdef VBOX_WITH_HGSMI
    214207    volatile HGSMIHOSTFLAGS * pHostFlags; /* HGSMI host flags */
    215208    volatile bool bHostCmdProcessing;
    216209    VBOXVCMNSPIN_LOCK pSynchLock;
    217 #endif
    218210
    219211    PVOID pvAdapterInformation;         /* The pointer to the last 4K of VRAM.
     
    221213                                         */
    222214
    223 #ifdef VBOX_WITH_HGSMI
    224215    BOOLEAN bHGSMI;                     /* Whether HGSMI is enabled. */
    225216
     
    235226    /* The IO Port Number for guest commands. */
    236227    RTIOPORT IOPortGuest;
    237 #endif
    238228} VBOXVIDEO_COMMON, *PVBOXVIDEO_COMMON;
    239229
     
    283273           BOOLEAN fMouseHidden;               /* Has the mouse cursor been hidden by the guest? */
    284274
    285 #ifndef VBOX_WITH_HGSMI
    286            ULONG ulDisplayInformationSize;     /* The size of the Display information, which is at offset:
    287                                                 * ulFrameBufferOffset + ulMaxFrameBufferSize.
    288                                                 */
    289 #endif /* !VBOX_WITH_HGSMI */
    290275
    291276           VBOXVIDEO_COMMON commonInfo;
    292 #ifdef VBOX_WITH_HGSMI
    293 # ifndef VBOX_WITH_WDDM
     277#ifndef VBOX_WITH_WDDM
    294278           /* Video Port API dynamically picked up at runtime for binary backwards compatibility with older NT versions */
    295279           VBOXVIDEOPORTPROCS VideoPortProcs;
    296 # else
     280#else
    297281           /* committed VidPn handle */
    298282           D3DKMDT_HVIDPN hCommittedVidPn;
    299283           /* Display Port handle and callbacks */
    300284           DXGKRNL_INTERFACE DxgkInterface;
    301 # endif
    302 #endif /* VBOX_WITH_HGSMI */
     285#endif
    303286       } primary;
    304287
     
    309292   } u;
    310293
    311 #ifdef VBOX_WITH_HGSMI
    312294   HGSMIAREA areaDisplay;                      /* Entire VRAM chunk for this display device. */
    313 #endif /* VBOX_WITH_HGSMI */
    314295
    315296#ifdef VBOX_WITH_WDDM
     
    510491   PVIDEO_REQUEST_PACKET RequestPacket);
    511492
    512 #if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
     493#ifdef VBOX_WITH_VIDEOHWACCEL
    513494BOOLEAN VBoxVideoInterrupt(PVOID  HwDeviceExtension);
    514495#endif
     
    863844void VBoxComputeFrameBufferSizes (PDEVICE_EXTENSION PrimaryExtension);
    864845
    865 #ifdef VBOX_WITH_HGSMI
    866846
    867847/*
     
    918898void HGSMIClearIrq (PVBOXVIDEO_COMMON pCommon);
    919899
    920 #endif /* VBOX_WITH_HGSMI */
    921900} /* extern "C" */
    922901
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/vboxioctl.h

    r28800 r33048  
    2323#include <VBox/VBoxGuest.h>
    2424
    25 #ifdef VBOX_WITH_HGSMI
    2625#include <VBox/HGSMI/HGSMI.h>
    2726#include "VBoxHGSMI.h"
    28 #endif /* VBOX_WITH_HGSMI */
    2927
    3028#define IOCTL_VIDEO_INTERPRET_DISPLAY_MEMORY \
     
    4442    CTL_CODE(FILE_DEVICE_VIDEO, 0x400, METHOD_BUFFERED, FILE_ANY_ACCESS)
    4543
    46 #ifdef VBOX_WITH_HGSMI
    4744#define IOCTL_VIDEO_QUERY_HGSMI_INFO \
    4845    CTL_CODE(FILE_DEVICE_VIDEO, 0x430, METHOD_BUFFERED, FILE_ANY_ACCESS)
     
    6360    CTL_CODE(FILE_DEVICE_VIDEO, 0x435, METHOD_BUFFERED, FILE_ANY_ACCESS)
    6461
    65 #endif /* VBOX_WITH_HGSMI */
    6662
    6763#pragma pack(1)
     
    10298} QUERYDISPLAYINFORESULT;
    10399
    104 #ifdef VBOX_WITH_HGSMI
    105100/**
    106101 * Data returned by IOCTL_VIDEO_QUERY_HGSMI_INFO.
     
    166161} HGSMIHANDLERDISABLE;
    167162
    168 # ifdef VBOX_WITH_VIDEOHWACCEL
     163#ifdef VBOX_WITH_VIDEOHWACCEL
    169164typedef struct _VHWAQUERYINFO
    170165{
    171166    ULONG_PTR offVramBase;
    172167} VHWAQUERYINFO;
    173 # endif
     168#endif
    174169
    175 #endif /* VBOX_WITH_HGSMI */
    176170#pragma pack()
    177171
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