From c7adad3eb0de409aafe11f0f5e2ce2bda51a8ddb Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 6 Oct 2015 15:00:30 -0400 Subject: [PATCH] P4 to Git Change 1197295 by gandryey@gera-ubuntu14 on 2015/10/06 14:50:12 SWDEV-78052 - [CQE-OCL][DTB][QR][LNX]RQ conf test "Multiple device context" fails in few asics due to CL#1196902 - Restore synchronization on the DMA engine. OCL doesn't require a sync, because resource isn't busy on the CAL device. However without sync there are less CBs available. Conformanace multidevice test will create around 60 queues, instead of 70 Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#147 edit [ROCm/clr commit: 86bc25cad29b5e0aa1a6761b675def67a7e37a64] --- .../runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp index 24928e0e39..02ddc6371c 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp @@ -967,7 +967,11 @@ CALGSLDevice::resMapLocal(size_t& pitch, surfaceSize = (surfaceSize > dstSize) ? dstSize : surfaceSize; - m_cs->DMACopy(mem, 0, memMap->mem, 0, surfaceSize, 0, NULL); + //! @todo Workaround strange GSL/CMM-QS behavior. OCL doesn't require a sync, + //! because resource isn't busy on the CAL device. However without sync there are less CBs available + //! Conformanace multidevice test will create around 60 queues, instead of 70 + uint32 mode = (IS_LINUX) ? GSL_SYNCUPLOAD_SYNC_WAIT | GSL_SYNCUPLOAD_SYNC_START : 0; + m_cs->DMACopy(mem, 0, memMap->mem, 0, surfaceSize, mode, NULL); Wait(m_cs, GSL_DRMDMA_SYNC_ATI, m_mapDMAQuery); } @@ -1019,7 +1023,11 @@ CALGSLDevice::resUnmapLocal(gslMemObject mem) surfaceSize = (surfaceSize > dstSize) ? dstSize : surfaceSize; - m_cs->DMACopy(memMap->mem, 0, mem, 0, surfaceSize, 0, NULL); + //! @todo Workaround strange GSL/CMM-QS behavior. OCL doesn't require a sync, + //! because resource isn't busy on the CAL device. However without sync there are less CBs available + //! Conformanace multidevice test will create around 60 queues, instead of 70 + uint32 mode = (IS_LINUX) ? GSL_SYNCUPLOAD_SYNC_WAIT | GSL_SYNCUPLOAD_SYNC_START : 0; + m_cs->DMACopy(memMap->mem, 0, mem, 0, surfaceSize, mode, NULL); Wait(m_cs, GSL_DRMDMA_SYNC_ATI, m_mapDMAQuery); }