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
Šī revīzija ir iekļauta:
@@ -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);
|
||||
|
||||
@@ -218,8 +218,12 @@ public:
|
||||
//! Returns the number of available compute rings
|
||||
uint numComputeRings() const { return numComputeRings_; }
|
||||
|
||||
//! Returns the number of available DMA engines
|
||||
uint numDMAEngines() const { return numDmaEngines_; }
|
||||
|
||||
private:
|
||||
uint numComputeRings_;
|
||||
uint numDmaEngines_;
|
||||
gslEngineDescriptor desc_[GSL_ENGINEID_MAX]; //!< Engine descriptor
|
||||
};
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Atsaukties uz šo jaunā problēmā
Block a user