From add3bbd20271ac2d97d479b0abb7006e3c2e067c Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 28 Sep 2015 19:41:22 -0400
Subject: [PATCH] P4 to Git Change 1195265 by gandryey@gera-dev-w7 on
2015/09/28 18:56:37
SWDEV-77545 - Relax Cypress restriction on SDMA copy
- Relax the old condition to match SI+ restriction
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#144 edit
---
.../device/gpu/gslbe/src/rt/GSLDevice.cpp | 33 +++++--------------
1 file changed, 8 insertions(+), 25 deletions(-)
diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
index 86ea275ac5..bb5af85792 100644
--- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
+++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
@@ -1379,11 +1379,10 @@ CALGSLDevice::GetCopyType(
pitch = srcMem->getPitch();
linearBytePitch = size * (bppSrc / 8);
- // Make sure linear pitch in bytes is 128 bytes aligned
- // Note: Cypress restriction, Cayman should have 4 bytes
- if (((linearBytePitch % 0x80) == 0) &&
- // another DRM restriciton... Cayman has 4 pixels
- (srcOffset[0] % 8 == 0))
+ // Make sure linear pitch in bytes is 4 bytes aligned
+ if (((linearBytePitch % 4) == 0) &&
+ // another DRM restriciton... SI has 4 pixels
+ (srcOffset[0] % 4 == 0))
{
type = USE_DRMDMA_T2L;
}
@@ -1399,11 +1398,10 @@ CALGSLDevice::GetCopyType(
pitch = destMem->getPitch();
linearBytePitch = size * (bppDst / 8);
- // Make sure linear pitch in bytes is 128 bytes aligned
- // Note: Cypress restriction, Cayman should have 4 bytes
- if (((linearBytePitch % 0x80) == 0) &&
- // another DRM restriciton... Cayman has 4 pixels
- (destOffset[0] % 8 == 0))
+ // 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_L2T;
}
@@ -1422,21 +1420,6 @@ CALGSLDevice::GetCopyType(
type = USE_DRMDMA;
}
- //
- // Machine specific issues here
- //
- if (allowDMA && ((m_target == CAL_TARGET_CAYMAN) ||
- (m_target == CAL_TARGET_DEVASTATOR) ||
- (m_target == CAL_TARGET_SCRAPPER)
- ) &&
- ((bppSrc == 128 || bppDst == 128) &&
- ((srcTiling != GSL_MOA_TILING_LINEAR) ||
- (dstTiling != GSL_MOA_TILING_LINEAR)))
- )
- {
- type = USE_NONE;
- }
-
return type;
}