VirtioGpuPipeStream: no need to skip page at a time
that was a bug on the host side
bug: 146066070
Change-Id: Ib38b4dc566f642088650a5bf24acb3750827efd8
diff --git a/system/OpenglSystemCommon/VirtioGpuPipeStream.cpp b/system/OpenglSystemCommon/VirtioGpuPipeStream.cpp
index 3718571..d3618f3 100644
--- a/system/OpenglSystemCommon/VirtioGpuPipeStream.cpp
+++ b/system/OpenglSystemCommon/VirtioGpuPipeStream.cpp
@@ -370,15 +370,7 @@
done += toXfer;
readPtr += toXfer;
todo -= toXfer;
-
- // Note; One does not simply increment |m_writtenPos| by exactly
- // |toXfer| because the way the underlying memory works (esp going
- // through TTM/GEM), we have no guarantee that things will stay
- // coherent byte-by-byte as it gets to the host. To be safe, skip a
- // page each time.
- const size_t kWrittenPosIncrement = PAGE_SIZE;
- m_writtenPos += ((toXfer + kWrittenPosIncrement - 1) /
- kWrittenPosIncrement) * kWrittenPosIncrement;
+ m_writtenPos += toXfer;
}
return len;