VirtualBox

Changeset 73203 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jul 18, 2018 1:00:43 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123808
Message:

VMM, Devices: bugref:9193 Remove unused code after using EMRZSetPendingIoPort[Read|Write].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r71698 r73203  
    14501450        /* standard VGA latched access */
    14511451        VERIFY_VRAM_WRITE_OFF_RETURN(pThis, addr * 4 + 3);
    1452 
    1453 #if 0
    1454 /* This code does not work reliably (@bugref{8123}) and no longer helps performance either. */
    1455 #ifdef IN_RING0
    1456         if (((++pThis->cLatchAccesses) & pThis->uMaskLatchAccess) == pThis->uMaskLatchAccess)
    1457         {
    1458             static uint32_t const s_aMask[5]  = {   0x3ff,   0x1ff,    0x7f,    0x3f,   0x1f};
    1459             static uint64_t const s_aDelta[5] = {10000000, 5000000, 2500000, 1250000, 625000};
    1460             if (PDMDevHlpCanEmulateIoBlock(pThis->CTX_SUFF(pDevIns)))
    1461             {
    1462                 uint64_t u64CurTime = RTTimeSystemNanoTS();
    1463 
    1464                 /* About 1000 (or more) accesses per 10 ms will trigger a reschedule
    1465                 * to the recompiler
    1466                 */
    1467                 if (u64CurTime - pThis->u64LastLatchedAccess < s_aDelta[pThis->iMask])
    1468                 {
    1469                     pThis->u64LastLatchedAccess = 0;
    1470                     pThis->iMask                = RT_MIN(pThis->iMask + 1U, RT_ELEMENTS(s_aMask) - 1U);
    1471                     pThis->uMaskLatchAccess     = s_aMask[pThis->iMask];
    1472                     pThis->cLatchAccesses       = pThis->uMaskLatchAccess - 1;
    1473                     return VINF_EM_RAW_EMULATE_IO_BLOCK;
    1474                 }
    1475                 if (pThis->u64LastLatchedAccess)
    1476                 {
    1477                     Log2(("Reset mask (was %d) delta %RX64 (limit %x)\n", pThis->iMask, u64CurTime - pThis->u64LastLatchedAccess, s_aDelta[pThis->iMask]));
    1478                     if (pThis->iMask)
    1479                         pThis->iMask--;
    1480                     pThis->uMaskLatchAccess     = s_aMask[pThis->iMask];
    1481                 }
    1482                 pThis->u64LastLatchedAccess = u64CurTime;
    1483             }
    1484             else
    1485             {
    1486                 pThis->u64LastLatchedAccess = 0;
    1487                 pThis->iMask                = 0;
    1488                 pThis->uMaskLatchAccess     = s_aMask[pThis->iMask];
    1489                 pThis->cLatchAccesses       = 0;
    1490             }
    1491         }
    1492 #endif
    1493 #endif
    14941452
    14951453        write_mode = pThis->gr[5] & 3;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette