2018-04-06 19:48:49 +08:00
|
|
|
/*
|
2019-01-22 17:24:28 +08:00
|
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
2018-04-06 19:48:49 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-04-06 19:48:49 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "runtime/helpers/hw_info.h"
|
|
|
|
#include "runtime/os_interface/hw_info_config.h"
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-04-06 19:48:49 +08:00
|
|
|
|
|
|
|
template <>
|
|
|
|
int HwInfoConfigHw<IGFX_CANNONLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
2019-04-09 19:37:17 +08:00
|
|
|
if (nullptr == osIface) {
|
|
|
|
return 0;
|
|
|
|
}
|
2019-05-08 22:00:24 +08:00
|
|
|
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
2018-04-06 19:48:49 +08:00
|
|
|
|
2019-05-08 22:00:24 +08:00
|
|
|
if (gtSystemInfo->SubSliceCount == 9) {
|
|
|
|
gtSystemInfo->SliceCount = 4;
|
|
|
|
} else if (gtSystemInfo->SubSliceCount > 5) {
|
|
|
|
gtSystemInfo->SliceCount = 3;
|
|
|
|
} else if (gtSystemInfo->SubSliceCount > 3) {
|
|
|
|
gtSystemInfo->SliceCount = 2;
|
2018-04-06 19:48:49 +08:00
|
|
|
} else {
|
2019-05-08 22:00:24 +08:00
|
|
|
gtSystemInfo->SliceCount = 1;
|
2018-04-06 19:48:49 +08:00
|
|
|
}
|
|
|
|
|
2019-05-08 22:00:24 +08:00
|
|
|
if ((gtSystemInfo->SliceCount > 1) && (gtSystemInfo->IsL3HashModeEnabled)) {
|
|
|
|
gtSystemInfo->L3BankCount--;
|
|
|
|
gtSystemInfo->L3CacheSizeInKb -= 256;
|
2018-04-06 19:48:49 +08:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
template class HwInfoConfigHw<IGFX_CANNONLAKE>;
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|