P4 to Git Change 1186913 by skudchad@skudchad_test_win_opencl2 on 2015/09/01 15:22:13

EPR #424190 - IOMMU2/SVM on CZ Win10, Optimization_1
	- Map can now return the surface address directly as we do system memory allocations that GPU can rw via IOMMUv2.
	- Unpack shaders binary to the shader surface directly, skip unmap which saves a lot of CPDMA calls.

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/8386/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#138 edit


[ROCm/clr commit: 4d4e4ce7a2]
Этот коммит содержится в:
foreman
2015-09-01 15:40:43 -04:00
родитель 020f9c8b84
Коммит 53eb6893f7
+30
Просмотреть файл
@@ -919,6 +919,14 @@ CALGSLDevice::resMapLocal(void*& pPtr,
assert(m_cs != 0);
assert(mem != 0);
// No map really necessary if IOMMUv2 is being used, return the surface address directly
// as CPU can write to it for Linear tiled surfaces only
if (m_adp->pAsicInfo->svmFineGrainSystem && mem->getAttribs().tiling <= GSL_MOA_TILING_LINEAR)
{
pPtr = (void*)mem->getImage(0)->surf.addr.getAddress();
return true;
}
//! @note: GSL device isn't thread safe
amd::ScopedLock k(gslDeviceOps());
@@ -1126,6 +1134,13 @@ CALGSLDevice::resUnmapLocal(gslMemObject mem, bool isHwDebug)
{
assert(m_cs != 0);
// No unmap necessary with IOMMUv2 as map operation directly returned the base surface System VA
// which CPU can write to it for Linear tiled surfaces only
if (m_adp->pAsicInfo->svmFineGrainSystem && mem->getAttribs().tiling <= GSL_MOA_TILING_LINEAR)
{
return true;
}
//! @note: GSL device isn't thread safe
amd::ScopedLock k(gslDeviceOps());
@@ -1246,6 +1261,14 @@ CALGSLDevice::resMapRemote(void*& pPtr,
assert(m_cs != 0);
assert(mem != 0);
// No map really necessary if IOMMUv2 is being used, return the surface address directly
// as CPU can write to it for Linear tiled surfaces only
if (m_adp->pAsicInfo->svmFineGrainSystem && mem->getAttribs().tiling <= GSL_MOA_TILING_LINEAR)
{
pPtr = (void*)mem->getImage(0)->surf.addr.getAddress();
return true;
}
//! @note: GSL device isn't thread safe
amd::ScopedLock k(gslDeviceOps());
@@ -1267,6 +1290,13 @@ CALGSLDevice::resUnmapRemote(gslMemObject mem) const
{
assert(m_cs != 0);
// No unmap necessary with IOMMUv2 as map operation directly returned the base surface System VA
// which CPU can write to it for Linear tiled surfaces only
if (m_adp->pAsicInfo->svmFineGrainSystem && mem->getAttribs().tiling <= GSL_MOA_TILING_LINEAR)
{
return true;
}
//! @note: GSL device isn't thread safe
amd::ScopedLock k(gslDeviceOps());