2020-03-13 20:14:28 +08:00
|
|
|
/*
|
2022-03-17 23:53:21 +08:00
|
|
|
* Copyright (C) 2020-2022 Intel Corporation
|
2020-03-13 20:14:28 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-10-22 17:25:32 +08:00
|
|
|
#include "shared/source/helpers/hw_helper.h"
|
|
|
|
#include "shared/source/helpers/hw_info.h"
|
|
|
|
|
2020-03-13 20:14:28 +08:00
|
|
|
namespace NEO {
|
|
|
|
|
2020-10-22 17:25:32 +08:00
|
|
|
template <typename GfxFamily>
|
2022-03-17 23:53:21 +08:00
|
|
|
inline bool HwHelperHw<GfxFamily>::isFusedEuDispatchEnabled(const HardwareInfo &hwInfo, bool disableEUFusionForKernel) const {
|
2021-11-25 17:31:14 +08:00
|
|
|
auto fusedEuDispatchEnabled = !hwInfo.workaroundTable.flags.waDisableFusedThreadScheduling;
|
2021-06-18 23:23:10 +08:00
|
|
|
fusedEuDispatchEnabled &= hwInfo.capabilityTable.fusedEuEnabled;
|
|
|
|
|
2020-03-13 20:14:28 +08:00
|
|
|
if (DebugManager.flags.CFEFusedEUDispatch.get() != -1) {
|
|
|
|
fusedEuDispatchEnabled = (DebugManager.flags.CFEFusedEUDispatch.get() == 0);
|
|
|
|
}
|
|
|
|
return fusedEuDispatchEnabled;
|
|
|
|
}
|
|
|
|
|
2020-10-22 17:25:32 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
void LriHelper<GfxFamily>::program(LinearStream *cmdStream, uint32_t address, uint32_t value, bool remap) {
|
2020-04-28 22:48:23 +08:00
|
|
|
MI_LOAD_REGISTER_IMM cmd = Family::cmdInitLoadRegisterImm;
|
|
|
|
cmd.setRegisterOffset(address);
|
|
|
|
cmd.setDataDword(value);
|
|
|
|
cmd.setMmioRemapEnable(remap);
|
|
|
|
|
|
|
|
auto lri = cmdStream->getSpaceForCmd<MI_LOAD_REGISTER_IMM>();
|
|
|
|
*lri = cmd;
|
|
|
|
}
|
|
|
|
|
2020-10-22 17:25:32 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
bool HwHelperHw<GfxFamily>::packedFormatsSupported() const {
|
2020-09-23 23:01:19 +08:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2020-10-22 17:25:32 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
size_t HwHelperHw<GfxFamily>::getMaxFillPaternSizeForCopyEngine() const {
|
|
|
|
return 4 * sizeof(uint32_t);
|
|
|
|
}
|
|
|
|
|
2020-03-13 20:14:28 +08:00
|
|
|
} // namespace NEO
|