Changeset 77958 in vbox
- Timestamp:
- Mar 29, 2019 8:57:32 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r77954 r77958 1478 1478 uint32_t uFifoPitchLock = pFIFO[SVGA_FIFO_PITCHLOCK]; 1479 1479 uint32_t uRegPitchLock = pThis->svga.u32PitchLock; 1480 uint32_t uFifoMin = pFIFO[SVGA_FIFO_MIN]; 1481 1482 /* The SVGA_FIFO_PITCHLOCK register is only valid if SVGA_FIFO_MIN points past 1483 * it. If SVGA_FIFO_MIN is small, there may well be data at the SVGA_FIFO_PITCHLOCK 1484 * location but it has a different meaning. 1485 */ 1486 if ((uFifoMin / sizeof(uint32_t)) <= SVGA_FIFO_PITCHLOCK) 1487 uFifoPitchLock = 0; 1480 1488 1481 1489 /* Sanitize values. */ … … 1487 1495 /* Prefer the register value to the FIFO value.*/ 1488 1496 if (uRegPitchLock) 1489 pThis->svga.cbScanline = pThis->svga.u32PitchLock;1497 pThis->svga.cbScanline = uRegPitchLock; 1490 1498 else if (uFifoPitchLock) 1491 1499 pThis->svga.cbScanline = uFifoPitchLock; 1492 1500 else 1493 1501 pThis->svga.cbScanline = pThis->svga.uWidth * (RT_ALIGN(pThis->svga.uBpp, 8) / 8); 1502 1503 if ((uFifoMin / sizeof(uint32_t)) <= SVGA_FIFO_PITCHLOCK) 1504 pThis->svga.u32PitchLock = pThis->svga.cbScanline; 1494 1505 } 1495 1506 #endif … … 1612 1623 for (uint32_t idScreen = 0; idScreen < pThis->cMonitors; ++idScreen) 1613 1624 pThis->pDrv->pfnVBVADisable(pThis->pDrv, idScreen); 1625 1626 /* Clear the pitch lock. */ 1627 pThis->svga.u32PitchLock = 0; 1614 1628 } 1615 1629 #else /* !IN_RING3 */ … … 5474 5488 pHlp->pfnPrintf(pHlp, "FIFO external cmd: %#x\n", pThis->svga.u8FIFOExtCommand); 5475 5489 pHlp->pfnPrintf(pHlp, "FIFO extcmd wakeup: %u\n", pThis->svga.fFifoExtCommandWakeup); 5490 pHlp->pfnPrintf(pHlp, "FIFO min/max: %u/%u\n", pFIFO[SVGA_FIFO_MIN], pFIFO[SVGA_FIFO_MAX]); 5476 5491 pHlp->pfnPrintf(pHlp, "Busy: %#x\n", pThis->svga.fBusy); 5477 5492 pHlp->pfnPrintf(pHlp, "Traces: %RTbool (effective: %RTbool)\n", pThis->svga.fTraces, pThis->svga.fVRAMTracking); … … 5875 5890 # endif 5876 5891 5892 /* Clear the FIFO so that there's no leftover junk. */ 5893 RT_BZERO(pThis->svga.pFIFOR3, pThis->svga.cbFIFO); 5894 5877 5895 /* Setup FIFO capabilities. */ 5878 5896 pThis->svga.pFIFOR3[SVGA_FIFO_CAPABILITIES] = SVGA_FIFO_CAP_FENCE | SVGA_FIFO_CAP_CURSOR_BYPASS_3 | SVGA_FIFO_CAP_GMR2 | SVGA_FIFO_CAP_3D_HWVERSION_REVISED | SVGA_FIFO_CAP_SCREEN_OBJECT_2 | SVGA_FIFO_CAP_RESERVE | SVGA_FIFO_CAP_PITCHLOCK; … … 5886 5904 5887 5905 /* Invalidate current settings. */ 5888 pThis->svga.uWidth = VMSVGA_VAL_UNINITIALIZED; 5889 pThis->svga.uHeight = VMSVGA_VAL_UNINITIALIZED; 5890 pThis->svga.uBpp = VMSVGA_VAL_UNINITIALIZED; 5891 pThis->svga.cbScanline = 0; 5906 pThis->svga.uWidth = VMSVGA_VAL_UNINITIALIZED; 5907 pThis->svga.uHeight = VMSVGA_VAL_UNINITIALIZED; 5908 pThis->svga.uBpp = VMSVGA_VAL_UNINITIALIZED; 5909 pThis->svga.cbScanline = 0; 5910 pThis->svga.u32PitchLock = 0; 5892 5911 5893 5912 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.