Move setAdditionalPipelineSelectFields to HwInfoConfig

Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
Related-To: NEO-4541
This commit is contained in:
Rafal Maziejuk
2021-08-31 15:48:56 +00:00
committed by Compute-Runtime-Automation
parent 0606ef4095
commit 4862fee089
12 changed files with 27 additions and 36 deletions

View File

@ -8,13 +8,11 @@ if(SUPPORT_DG1)
set(SHARED_SRCS_ADDITIONAL_FILES_GEN12LP
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/helpers_gen12lp_dg1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/helpers_gen12lp.h
${CMAKE_CURRENT_SOURCE_DIR}/helpers_gen12lp.inl
)
else()
set(SHARED_SRCS_ADDITIONAL_FILES_GEN12LP
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/helpers_gen12lp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/helpers_gen12lp.h
${CMAKE_CURRENT_SOURCE_DIR}/helpers_gen12lp.inl
)
endif()

View File

@ -8,7 +8,6 @@
#include "shared/source/gen12lp/helpers_gen12lp.h"
#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/gen12lp/helpers_gen12lp.inl"
#include "opencl/source/helpers/hardware_commands_helper.h"

View File

@ -30,9 +30,6 @@ bool isLocalMemoryEnabled(const HardwareInfo &hwInfo);
void initAdditionalGlobalMMIO(const CommandStreamReceiver &commandStreamReceiver, AubMemDump::AubStream &stream);
uint64_t getPPGTTAdditionalBits(GraphicsAllocation *graphicsAllocation);
void adjustAubGTTData(const CommandStreamReceiver &commandStreamReceiver, AubGTTData &data);
void setAdditionalPipelineSelectFields(void *pipelineSelectCmd,
const PipelineSelectArgs &pipelineSelectArgs,
const HardwareInfo &hwInfo);
bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo);
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo);
bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo);

View File

@ -1,28 +0,0 @@
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/helpers/pipeline_select_helper.h"
namespace NEO {
namespace Gen12LPHelpers {
void setAdditionalPipelineSelectFields(void *pipelineSelectCmd,
const PipelineSelectArgs &pipelineSelectArgs,
const HardwareInfo &hwInfo) {
using PIPELINE_SELECT = typename TGLLPFamily::PIPELINE_SELECT;
auto pipelineSelectTglplpCmd = reinterpret_cast<PIPELINE_SELECT *>(pipelineSelectCmd);
auto mask = pipelineSelectTglplpCmd->getMaskBits();
if (hwInfo.platform.eProductFamily == IGFX_ALDERLAKE_P) {
mask |= pipelineSelectSystolicModeEnableMaskBits;
pipelineSelectTglplpCmd->setMaskBits(mask);
pipelineSelectTglplpCmd->setSpecialModeEnable(pipelineSelectArgs.specialPipelineSelectMode);
}
}
} // namespace Gen12LPHelpers
} // namespace NEO

View File

@ -8,7 +8,6 @@
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/gen12lp/helpers_gen12lp.h"
#include "shared/source/gen12lp/helpers_gen12lp.inl"
#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw.h"

View File

@ -7,6 +7,7 @@
#include "shared/source/gen12lp/helpers_gen12lp.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/pipeline_select_helper.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/source/os_interface/hw_info_config.inl"
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"

View File

@ -26,3 +26,17 @@ uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &
}
return CommonConstants::invalidStepping;
}
template <>
void HwInfoConfigHw<gfxProduct>::setAdditionalPipelineSelectFields(void *pipelineSelectCmd,
const PipelineSelectArgs &pipelineSelectArgs,
const HardwareInfo &hwInfo) {
using PIPELINE_SELECT = typename TGLLPFamily::PIPELINE_SELECT;
auto pipelineSelectTglplpCmd = reinterpret_cast<PIPELINE_SELECT *>(pipelineSelectCmd);
auto mask = pipelineSelectTglplpCmd->getMaskBits();
mask |= pipelineSelectSystolicModeEnableMaskBits;
pipelineSelectTglplpCmd->setMaskBits(mask);
pipelineSelectTglplpCmd->setSpecialModeEnable(pipelineSelectArgs.specialPipelineSelectMode);
}

View File

@ -9,6 +9,7 @@
#include "shared/source/gen12lp/helpers_gen12lp.h"
#include "shared/source/helpers/engine_node_helper.h"
#include "shared/source/helpers/preamble_bdw_and_later.inl"
#include "shared/source/os_interface/hw_info_config.h"
#include "pipe_control_args.h"
#include "reg_configs_common.h"
@ -52,7 +53,7 @@ void PreambleHelper<TGLLPFamily>::programPipelineSelect(LinearStream *pCommandSt
cmd.setPipelineSelection(pipeline);
cmd.setMediaSamplerDopClockGateEnable(!pipelineSelectArgs.mediaSamplerRequired);
Gen12LPHelpers::setAdditionalPipelineSelectFields(&cmd, pipelineSelectArgs, hwInfo);
HwInfoConfig::get(hwInfo.platform.eProductFamily)->setAdditionalPipelineSelectFields(&cmd, pipelineSelectArgs, hwInfo);
*pCmd = cmd;
}

View File

@ -7,6 +7,7 @@
#include "shared/source/gen12lp/helpers_gen12lp.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/pipeline_select_helper.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/source/os_interface/hw_info_config.inl"
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"

View File

@ -16,6 +16,7 @@ namespace NEO {
struct HardwareInfo;
struct StateComputeModeProperties;
struct PipelineSelectArgs;
class OSInterface;
class HwInfoConfig;
@ -49,6 +50,7 @@ class HwInfoConfig {
virtual uint32_t getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const = 0;
virtual uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) const = 0;
virtual uint32_t getAubStreamSteppingFromHwRevId(const HardwareInfo &hwInfo) const = 0;
virtual void setAdditionalPipelineSelectFields(void *pipelineSelectCmd, const PipelineSelectArgs &pipelineSelectArgs, const HardwareInfo &hwInfo) = 0;
uint32_t threadsPerEu;
};
@ -81,6 +83,7 @@ class HwInfoConfigHw : public HwInfoConfig {
uint32_t getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const override;
uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) const override;
uint32_t getAubStreamSteppingFromHwRevId(const HardwareInfo &hwInfo) const override;
void setAdditionalPipelineSelectFields(void *pipelineSelectCmd, const PipelineSelectArgs &pipelineSelectArgs, const HardwareInfo &hwInfo) override;
protected:
HwInfoConfigHw() = default;

View File

@ -132,4 +132,6 @@ uint32_t HwInfoConfigHw<gfxProduct>::getAubStreamSteppingFromHwRevId(const Hardw
return AubMemDump::SteppingValues::K;
}
}
template <PRODUCT_FAMILY gfxProduct>
void HwInfoConfigHw<gfxProduct>::setAdditionalPipelineSelectFields(void *pipelineSelectCmd, const PipelineSelectArgs &pipelineSelectArgs, const HardwareInfo &hwInfo) {}
} // namespace NEO

View File

@ -118,6 +118,10 @@ uint32_t HwInfoConfigHw<IGFX_UNKNOWN>::getAubStreamSteppingFromHwRevId(const Har
}
}
template <>
void HwInfoConfigHw<IGFX_UNKNOWN>::setAdditionalPipelineSelectFields(void *pipelineSelectCmd, const PipelineSelectArgs &pipelineSelectArgs, const HardwareInfo &hwInfo) {
}
void OsAgnosticHwInfoConfigTest::SetUp() {
DeviceFixture::SetUp();
}