From 9ae8aa43c32cfac0d74f67996bfd736b1c6b661d Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 30 Mar 2016 10:21:54 -0400 Subject: [PATCH] P4 to Git Change 1252764 by jatang@jatang-opencl-hsa-stg1 on 2016/03/30 10:16:09 SWDEV-86378 - Apply the sDMA L2T work-around to T2L as well. HW confirms T2L also has issues. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#164 edit [ROCm/clr commit: 4b7a3bd5b48fefb45a7c6e2d58b4c0d3274888da] --- .../runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp | 11 +++++++++-- 1 file changed, 9 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 a7e41fe387..473c96d04d 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 @@ -1203,14 +1203,21 @@ CALGSLDevice::GetCopyType( (dstTiling == GSL_MOA_TILING_LINEAR)) { intp bppSrc = srcMem->getBitsPerElement(); - uint64 linearBytePitch = size * (bppSrc / 8); + uint64 BytesPerPixel = bppSrc / 8; + uint64 linearBytePitch = size * BytesPerPixel; // Make sure linear pitch in bytes is 4 bytes aligned if (((linearBytePitch % 4) == 0) && // another DRM restriciton... SI has 4 pixels (destOffset[0] % 4 == 0)) { - type = USE_DRMDMA_T2L; + // The sDMA T2L cases we need to avoid are when the tiled_x + // is not a multiple of BytesPerPixel. + if (!m_isSDMAL2TConstrained || + (srcOffset[0] % BytesPerPixel == 0)) + { + type = USE_DRMDMA_T2L; + } } } else if ((srcTiling == GSL_MOA_TILING_LINEAR) &&