Changeset 17325 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Mar 4, 2009 8:44:25 AM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/BIOS/vgabios.c
r11982 r17325 670 670 // Ralf Brown Interrupt list is WRONG on bh(page) 671 671 // We do output only on the current page ! 672 #ifdef DEBUG 673 printf("write_teletype %02x\n", GET_AL()); 674 #endif 675 672 676 biosfn_write_teletype(GET_AL(),0xff,GET_BL(),NO_ATTR); 673 677 break; -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r17298 r17325 1379 1379 1380 1380 #ifdef IN_RING0 1381 if (((++s->cLatchAccesses) & 0x3ff) == 0x3ff)1381 if (((++s->cLatchAccesses) & s->uMaskLatchAccess) == s->uMaskLatchAccess) 1382 1382 { 1383 static uint32_t aMask[5] = {0x3ff, 0x1ff, 0x7f, 0x3f, 0x1f}; 1384 static uint64_t aDelta[5] = {10000000, 5000000, 2500000, 1250000, 625000}; 1383 1385 uint64_t u64CurTime = RTTimeSystemNanoTS(); 1386 1384 1387 /* About 1000 (or more) accesses per 10 ms will trigger a reschedule 1385 1388 * to the recompiler 1386 1389 */ 1387 if (u64CurTime - s->u64LastLatchedAccess < 10000000) 1390 if (u64CurTime - s->u64LastLatchedAccess < aDelta[s->iMask]) 1391 { 1392 s->u64LastLatchedAccess = 0; 1393 s->iMask = RT_MIN(s->iMask + 1, RT_ELEMENTS(aMask) - 1); 1394 s->uMaskLatchAccess = aMask[s->iMask]; 1395 s->cLatchAccesses = s->uMaskLatchAccess - 1; 1388 1396 return VINF_EM_RAW_EMULATE_IO_BLOCK; 1389 1390 s->u64LastLatchedAccess = u64CurTime; 1397 } 1398 if (s->u64LastLatchedAccess) 1399 { 1400 Log2(("Reset mask (was %d) delta %RX64 (limit %x)\n", s->iMask, u64CurTime - s->u64LastLatchedAccess, aDelta[s->iMask])); 1401 if (s->iMask) 1402 s->iMask--; 1403 s->uMaskLatchAccess = aMask[s->iMask]; 1404 } 1405 s->u64LastLatchedAccess = u64CurTime; 1391 1406 } 1392 1407 #endif … … 5261 5276 if (pThis->pDrv) 5262 5277 pThis->pDrv->pfnReset(pThis->pDrv); 5278 5279 /* Reset latched access mask. */ 5280 pThis->uMaskLatchAccess = 0x3ff; 5281 pThis->cLatchAccesses = 0; 5282 pThis->u64LastLatchedAccess = 0; 5283 5263 5284 } 5264 5285 … … 6092 6113 STAM_REG(pVM, &pThis->StatR3MemoryWrite, STAMTYPE_PROFILE, "/Devices/VGA/R3/MMIO-Write", STAMUNIT_TICKS_PER_CALL, "Profiling of the VGAGCMemoryWrite() body."); 6093 6114 6115 /* Init latched access mask. */ 6116 pThis->uMaskLatchAccess = 0x3ff; 6094 6117 return rc; 6095 6118 } -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r17308 r17325 304 304 uint64_t u64LastLatchedAccess; 305 305 uint32_t cLatchAccesses; 306 uint32_t Padding10; 306 uint16_t uMaskLatchAccess; 307 uint16_t iMask; 307 308 308 309 #ifdef VBE_BYTEWISE_IO
Note:
See TracChangeset
for help on using the changeset viewer.