P4 to Git Change 1973183 by gandryey@gera-win10 on 2019/07/24 18:26:45
SWDEV-79445 - OCL generic changes and code clean-up
- Make sure PAL_DISABLE_SDMA is fully functional. CP DMA is used for buffer transfers currently and kernels for images and buffer rect copies.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#150 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#92 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.hpp#25 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#142 edit
[ROCm/clr commit: 565ef2dac5]
This commit is contained in:
@@ -1746,9 +1746,10 @@ bool KernelBlitManager::copyBufferRect(device::Memory& srcMemory, device::Memory
|
||||
// Fall into the PAL path for rejected transfers
|
||||
if (setup_.disableCopyBufferRect_ || gpuMem(srcMemory).isHostMemDirectAccess() ||
|
||||
gpuMem(dstMemory).isHostMemDirectAccess()) {
|
||||
result =
|
||||
if (!dev().settings().disableSdma_) {
|
||||
result =
|
||||
DmaBlitManager::copyBufferRect(srcMemory, dstMemory, srcRectIn, dstRectIn, sizeIn, entire);
|
||||
|
||||
}
|
||||
if (result) {
|
||||
synchronize();
|
||||
return result;
|
||||
|
||||
@@ -934,11 +934,8 @@ bool Device::create(Pal::IDevice* device) {
|
||||
palSettings->cmdBufBatchedSubmitChainLimit = 0;
|
||||
palSettings->disableResourceProcessingManager = true;
|
||||
palSettings->numScratchWavesPerCu = settings().numScratchWavesPerCu_;
|
||||
|
||||
if (PAL_DISABLE_SDMA) {
|
||||
// Make sure CP DMA is used only, since compute path won't work in PAL with OCL
|
||||
palSettings->cpDmaCmdCopyMemoryMaxBytes = 0xFFFFFFFF;
|
||||
}
|
||||
// Make sure CP DMA can be used for all possible transfers
|
||||
palSettings->cpDmaCmdCopyMemoryMaxBytes = 0xFFFFFFFF;
|
||||
|
||||
// Commit the new settings for the device
|
||||
result = iDev()->CommitSettingsAndInit();
|
||||
|
||||
@@ -145,6 +145,7 @@ Settings::Settings() {
|
||||
lcWavefrontSize64_ = true;
|
||||
enableHwP2P_ = false;
|
||||
imageBufferWar_ = false;
|
||||
disableSdma_ = PAL_DISABLE_SDMA;
|
||||
}
|
||||
|
||||
bool Settings::create(const Pal::DeviceProperties& palProp,
|
||||
@@ -338,6 +339,9 @@ bool Settings::create(const Pal::DeviceProperties& palProp,
|
||||
imageBufferWar_ = GPU_IMAGE_BUFFER_WAR;
|
||||
}
|
||||
|
||||
// Image DMA must be disabled if SDMA is disabled
|
||||
imageDMA_ &= !disableSdma_;
|
||||
|
||||
splitSizeForWin7_ = false;
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
@@ -63,7 +63,8 @@ class Settings : public device::Settings {
|
||||
uint splitSizeForWin7_ : 1; //!< DMA flush split size for Win 7
|
||||
uint enableHwP2P_ : 1; //!< Forces HW P2P path for testing
|
||||
uint imageBufferWar_ : 1; //!< Image buffer workaround for Gfx10
|
||||
uint reserved_ : 9;
|
||||
uint disableSdma_ : 1; //!< Disable SDMA support
|
||||
uint reserved_ : 8;
|
||||
};
|
||||
uint value_;
|
||||
};
|
||||
|
||||
@@ -824,7 +824,7 @@ bool VirtualGPU::create(bool profiling, uint deviceQueueSize, uint rtCUs,
|
||||
}
|
||||
|
||||
// Check if device has SDMA engines
|
||||
if (dev().numDMAEngines() != 0 && !PAL_DISABLE_SDMA) {
|
||||
if (dev().numDMAEngines() != 0 && !dev().settings().disableSdma_) {
|
||||
uint sdma;
|
||||
// If only 1 SDMA engine is available then use that one, otherwise it's a round-robin manner
|
||||
if ((dev().numDMAEngines() < 2) || ((idx + 1) & 0x1)) {
|
||||
|
||||
Reference in New Issue
Block a user