2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2021-08-04 00:04:09 +00:00
|
|
|
* Copyright (C) 2021 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/helpers/hw_info.h"
|
|
|
|
|
#include "shared/source/os_interface/hw_info_config.h"
|
2021-08-04 00:04:09 +00:00
|
|
|
#include "shared/source/os_interface/hw_info_config.inl"
|
2021-08-03 11:48:35 +00:00
|
|
|
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
template <>
|
|
|
|
|
int HwInfoConfigHw<IGFX_BROADWELL>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
2019-04-09 13:37:17 +02:00
|
|
|
if (nullptr == osIface) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2019-05-08 16:00:24 +02:00
|
|
|
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
// There is no interface to read total slice count from drm/i915, so we
|
|
|
|
|
// derive this from the number of EUs and subslices.
|
|
|
|
|
// otherwise there is one slice.
|
2019-05-08 16:00:24 +02:00
|
|
|
if (gtSystemInfo->SubSliceCount > 3) {
|
|
|
|
|
gtSystemInfo->SliceCount = 2;
|
2017-12-21 00:45:38 +01:00
|
|
|
} else {
|
2019-05-08 16:00:24 +02:00
|
|
|
gtSystemInfo->SliceCount = 1;
|
2017-12-21 00:45:38 +01:00
|
|
|
}
|
|
|
|
|
|
2019-05-08 16:00:24 +02:00
|
|
|
if (hwInfo->platform.usDeviceID == IBDW_GT3_HALO_MOBL_DEVICE_F0_ID ||
|
|
|
|
|
hwInfo->platform.usDeviceID == IBDW_GT3_SERV_DEVICE_F0_ID) {
|
|
|
|
|
gtSystemInfo->EdramSizeInKb = 128 * 1024;
|
2017-12-21 00:45:38 +01:00
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-04 18:38:36 +02:00
|
|
|
template class HwInfoConfigHw<IGFX_BROADWELL>;
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|