VirtualBox

Ignore:
Timestamp:
Aug 28, 2019 1:32:17 PM (5 years ago)
Author:
vboxsync
Message:

WDDM: remove unused VBOX_VDMA_WITH_WATCHDOG code. bugref:9529

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp
Files:
5 edited

Legend:

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

    r80422 r80478  
    9494 VBoxWddm_DEFS            += LOG_TO_BACKDOOR
    9595 VBoxWddm_DEFS            += VBOX_SVN_REV=$(VBOX_SVN_REV)
    96  ifdef VBOX_VDMA_WITH_WATCHDOG
    97   VBoxWddm_DEFS           += VBOX_VDMA_WITH_WATCHDOG
    98  endif
    9996 VBoxWddm_INCS            += \
    10097        ../../../include \
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPDevExt.h

    r80422 r80478  
    166166
    167167
    168 #ifdef VBOX_VDMA_WITH_WATCHDOG
    169    PKTHREAD pWdThread;
    170    KEVENT WdEvent;
    171 #endif
    172168   BOOL bVSyncTimerEnabled;
    173169   volatile uint32_t fVSyncInVBlank;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp

    r80422 r80478  
    12891289}
    12901290
    1291 #ifdef VBOX_VDMA_WITH_WATCHDOG
    1292 static int vboxWddmWdProgram(PVBOXMP_DEVEXT pDevExt, uint32_t cMillis)
    1293 {
    1294     int rc = VINF_SUCCESS;
    1295     VBOXVDMA_CTL RT_UNTRUSTED_VOLATILE_GUEST *pCmd
    1296         = (VBOXVDMA_CTL RT_UNTRUSTED_VOLATILE_GUEST *)VBoxSHGSMICommandAlloc(&VBoxCommonFromDeviceExt(pDevExt)->guestCtx.heapCtx,
    1297                                                                              sizeof(VBOXVDMA_CTL), HGSMI_CH_VBVA, VBVA_VDMA_CTL);
    1298     if (pCmd)
    1299     {
    1300         pCmd->enmCtl = VBOXVDMA_CTL_TYPE_WATCHDOG;
    1301         pCmd->u32Offset = cMillis;
    1302         pCmd->i32Result = VERR_NOT_SUPPORTED;
    1303 
    1304         const VBOXSHGSMIHEADER* pHdr = VBoxSHGSMICommandPrepSynch(&VBoxCommonFromDeviceExt(pDevExt)->guestCtx.heapCtx, pCmd);
    1305         Assert(pHdr);
    1306         if (pHdr)
    1307         {
    1308             do
    1309             {
    1310                 HGSMIOFFSET offCmd = VBoxSHGSMICommandOffset(&VBoxCommonFromDeviceExt(pDevExt)->guestCtx.heapCtx, pHdr);
    1311                 Assert(offCmd != HGSMIOFFSET_VOID);
    1312                 if (offCmd != HGSMIOFFSET_VOID)
    1313                 {
    1314                     VBVO_PORT_WRITE_U32(VBoxCommonFromDeviceExt(pDevExt)->guestCtx.port, offCmd);
    1315                     /* Make the compiler aware that the host has changed memory. */
    1316                     ASMCompilerBarrier();
    1317                     rc = VBoxSHGSMICommandDoneSynch(&VBoxCommonFromDeviceExt(pDevExt)->guestCtx.heapCtx, pHdr);
    1318                     AssertRC(rc);
    1319                     if (RT_SUCCESS(rc))
    1320                     {
    1321                         rc = pCmd->i32Result;
    1322                         AssertRC(rc);
    1323                     }
    1324                     break;
    1325                 }
    1326                 else
    1327                     rc = VERR_INVALID_PARAMETER;
    1328                 /* fail to submit, cancel it */
    1329                 VBoxSHGSMICommandCancelSynch(&VBoxCommonFromDeviceExt(pDevExt)->guestCtx.heapCtx, pHdr);
    1330             } while (0);
    1331         }
    1332 
    1333         VBoxSHGSMICommandFree(&VBoxCommonFromDeviceExt(pDevExt)->guestCtx.heapCtx, pCmd);
    1334     }
    1335     else
    1336     {
    1337         LOGREL(("HGSMIHeapAlloc failed"));
    1338         rc = VERR_OUT_OF_RESOURCES;
    1339     }
    1340     return rc;
    1341 }
    1342 
    1343 static uint32_t g_VBoxWdTimeout = 4000;
    1344 /* if null g_VBoxWdTimeout / 2 is used */
    1345 static uint32_t g_VBoxWdTimerPeriod = 0;
    1346 
    1347 static VOID vboxWddmWdThread(PVOID pvUser)
    1348 {
    1349     PVBOXMP_DEVEXT pDevExt = (PVBOXMP_DEVEXT)pvUser;
    1350     BOOLEAN bExit = FALSE;
    1351     int rc;
    1352     while (1)
    1353     {
    1354         if (!bExit)
    1355         {
    1356             rc = vboxWddmWdProgram(pDevExt, g_VBoxWdTimeout /* ms */);
    1357             AssertRC(rc);
    1358         }
    1359         else
    1360         {
    1361             rc = vboxWddmWdProgram(pDevExt, 0 /* to disable WatchDog */);
    1362             AssertRC(rc);
    1363             break;
    1364         }
    1365         LARGE_INTEGER Timeout;
    1366         uint32_t timerTimeOut = g_VBoxWdTimerPeriod ? g_VBoxWdTimerPeriod : g_VBoxWdTimeout / 2;
    1367         Timeout.QuadPart = 10000ULL * timerTimeOut /* ms */;
    1368         NTSTATUS Status = KeWaitForSingleObject(&pDevExt->WdEvent, Executive, KernelMode, FALSE, &Timeout);
    1369         if (Status != STATUS_TIMEOUT)
    1370             bExit = TRUE;
    1371     }
    1372 }
    1373 
    1374 NTSTATUS vboxWddmWdInit(PVBOXMP_DEVEXT pDevExt)
    1375 {
    1376     KeInitializeEvent(&pDevExt->WdEvent, NotificationEvent, FALSE);
    1377 
    1378     NTSTATUS Status = vboxWddmThreadCreate(&pDevExt->pWdThread, vboxWddmWdThread, pDevExt);
    1379     if (!NT_SUCCESS(Status))
    1380     {
    1381         WARN(("vboxWddmThreadCreate failed, Status 0x%x", Status));
    1382         pDevExt->pWdThread = NULL;
    1383     }
    1384     return Status;
    1385 }
    1386 
    1387 NTSTATUS vboxWddmWdTerm(PVBOXMP_DEVEXT pDevExt)
    1388 {
    1389     if (!pDevExt->pWdThread)
    1390         return STATUS_SUCCESS;
    1391 
    1392     KeSetEvent(&pDevExt->WdEvent, 0, FALSE);
    1393 
    1394     KeWaitForSingleObject(pDevExt->pWdThread, Executive, KernelMode, FALSE, NULL);
    1395     ObDereferenceObject(pDevExt->pWdThread);
    1396     pDevExt->pWdThread = NULL;
    1397     return STATUS_SUCCESS;
    1398 }
    1399 #endif
    1400 
    14011291static int vboxWddmSlConfigure(PVBOXMP_DEVEXT pDevExt, uint32_t fFlags)
    14021292{
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.h

    r80422 r80478  
    154154NTSTATUS vboxWddmDrvCfgInit(PUNICODE_STRING pRegStr);
    155155
    156 #ifdef VBOX_VDMA_WITH_WATCHDOG
    157 NTSTATUS vboxWddmWdInit(PVBOXMP_DEVEXT pDevExt);
    158 NTSTATUS vboxWddmWdTerm(PVBOXMP_DEVEXT pDevExt);
    159 #endif
    160 
    161156NTSTATUS VBoxWddmSlEnableVSyncNotification(PVBOXMP_DEVEXT pDevExt, BOOLEAN fEnable);
    162157NTSTATUS VBoxWddmSlGetScanLine(PVBOXMP_DEVEXT pDevExt, DXGKARG_GETSCANLINE *pSl);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r80435 r80478  
    820820        if (RT_SUCCESS(rc))
    821821        {
    822 #ifdef VBOX_VDMA_WITH_WATCHDOG
    823             vboxWddmWdInit(pDevExt);
    824 #endif
    825822            /* can enable it right away since the host does not need any screen/FB info
    826823             * for basic DMA functionality */
     
    10101007        if (RT_SUCCESS(rc))
    10111008        {
    1012 #ifdef VBOX_VDMA_WITH_WATCHDOG
    1013             vboxWddmWdTerm(pDevExt);
    1014 #endif
    10151009            rc = vboxVdmaDestroy(pDevExt, &pDevExt->u.primary.Vdma);
    10161010            AssertRC(rc);
     
    15861580    if (bOur)
    15871581    {
    1588 #ifdef VBOX_VDMA_WITH_WATCHDOG
    1589         if (flags & HGSMIHOSTFLAGS_WATCHDOG)
    1590         {
    1591             Assert(0);
    1592         }
    1593 #endif
    15941582        if (flags & HGSMIHOSTFLAGS_VSYNC)
    15951583        {
     
    17591747        if (bOur)
    17601748        {
    1761 #ifdef VBOX_VDMA_WITH_WATCHDOG
    1762             if (flags & HGSMIHOSTFLAGS_WATCHDOG)
    1763             {
    1764                 Assert(0);
    1765             }
    1766 #endif
    17671749            if (flags & HGSMIHOSTFLAGS_VSYNC)
    17681750            {
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