Add definition of workaroundRequired function for DG1

Change-Id: If934bfddd678fb482cb2ff08635fe1ae214dee0a
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2020-06-30 12:33:37 +02:00
committed by sys_ocldev
parent 911e33af5e
commit 28aa29bcbd

View File

@@ -18,6 +18,27 @@ bool pipeControlWaRequired(PRODUCT_FAMILY productFamily) {
return (productFamily == IGFX_TIGERLAKE_LP) || (productFamily == IGFX_DG1);
}
bool workaroundRequired(uint32_t lowestSteppingWithBug, uint32_t steppingWithFix, const HardwareInfo &hwInfo) {
if (hwInfo.platform.eProductFamily == PRODUCT_FAMILY::IGFX_DG1) {
for (auto stepping : {&lowestSteppingWithBug, &steppingWithFix}) {
switch (*stepping) {
case REVISION_A0:
*stepping = 0x0;
break;
case REVISION_B:
*stepping = 0x1;
break;
default:
DEBUG_BREAK_IF(true);
return false;
}
}
return (lowestSteppingWithBug >= hwInfo.platform.usRevId && hwInfo.platform.usRevId < steppingWithFix);
}
DEBUG_BREAK_IF(true);
return false;
}
bool imagePitchAlignmentWaRequired(PRODUCT_FAMILY productFamily) {
return (productFamily == IGFX_TIGERLAKE_LP) || (productFamily == IGFX_DG1);
}