P4 to Git Change 1138096 by skudchad@skudchad_test_win_opencl2 on 2015/04/07 13:46:20

EPR #403782 - IOMMU2/SVM
	- Handle case of only one DMA engine available, for example with SVM.

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

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#506 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#142 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#357 edit
This commit is contained in:
foreman
2015-04-07 17:27:46 -04:00
parent 458cca25ce
commit 32c073c558
3 changed files with 15 additions and 1 deletions
+6
View File
@@ -245,6 +245,7 @@ void
Device::Engines::create(uint num, gslEngineDescriptor* desc, uint maxNumComputeRings)
{
numComputeRings_ = 0;
numDmaEngines_ = 0;
for (uint i = 0; i < num; ++i) {
desc_[desc[i].id] = desc[i];
@@ -254,6 +255,11 @@ Device::Engines::create(uint num, gslEngineDescriptor* desc, uint maxNumComputeR
desc[i].id <= GSL_ENGINEID_COMPUTE7) {
numComputeRings_++;
}
if (desc[i].id >= GSL_ENGINEID_DRMDMA0 &&
desc[i].id <= GSL_ENGINEID_DRMDMA1) {
numDmaEngines_++;
}
}
numComputeRings_ = std::min(numComputeRings_, maxNumComputeRings);