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


[ROCm/clr commit: 32c073c558]
This commit is contained in:
foreman
2015-04-07 17:27:46 -04:00
parent c6356ef17a
commit 7f1152c877
3 changed files with 15 additions and 1 deletions
@@ -498,7 +498,11 @@ VirtualGPU::create(
engineMask = dev().engines().getMask((gslEngineID)(dev().isComputeRingIDForced() ?
dev().getforcedComputeEngineID() : (GSL_ENGINEID_COMPUTE0 + idx)));
if (dev().canDMA()) {
if (index() & 0x1) {
// If only 1 DMA engine is available then use that one
if (dev().engines().numDMAEngines() < 2) {
engineMask |= dev().engines().getMask(GSL_ENGINEID_DRMDMA0);
}
else if (index() & 0x1) {
engineMask |= dev().engines().getMask(GSL_ENGINEID_DRMDMA0);
}
else {