Remove unnecessary check for gen12lp during symbol relocations

Related-To: NEO-5433

Signed-off-by: Sebastian Luzynski <sebastian.jozef.luzynski@intel.com>
This commit is contained in:
Sebastian Luzynski
2021-03-24 09:55:13 +00:00
committed by Compute-Runtime-Automation
parent 59ee96ad1c
commit 6163120809
9 changed files with 2 additions and 62 deletions

View File

@@ -77,26 +77,6 @@ DG1TEST_F(HwHelperTestDg1, givenDg1AndVariousSteppingsWhenGettingIsWorkaroundReq
}
}
DG1TEST_F(HwHelperTestDg1, givenDg1WhenPatchingCPUAccessibleGlobalBuffersThenDontUseBlitter) {
uint64_t gpuAddress = 0x1000;
void *buffer = reinterpret_cast<void *>(gpuAddress);
size_t size = 0x1000;
MockGraphicsAllocation mockAllocation(buffer, gpuAddress, size);
HwHelper &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
EXPECT_FALSE(hwHelper.forceBlitterUseForGlobalBuffers(hardwareInfo, &mockAllocation));
}
DG1TEST_F(HwHelperTestDg1, givenDg1WhenPatchingCPUInaccessibleGlobalBuffersThenUseBlitter) {
uint64_t gpuAddress = 0x1000;
void *buffer = reinterpret_cast<void *>(0x0);
size_t size = 0x1000;
MockGraphicsAllocation mockAllocation(buffer, gpuAddress, size);
HwHelper &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
EXPECT_TRUE(hwHelper.forceBlitterUseForGlobalBuffers(hardwareInfo, &mockAllocation));
}
DG1TEST_F(HwHelperTestDg1, givenDg1WhenSteppingA0ThenIntegerDivisionEmulationIsEnabled) {
HwHelper &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
uint32_t stepping = REVISION_A0;

View File

@@ -944,19 +944,6 @@ HWTEST_F(HwHelperTest, whenGettingIsBlitCopyRequiredForLocalMemoryThenCorrectVal
EXPECT_FALSE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
}
HWTEST_F(HwHelperTest, whenPatchingGlobalBuffersThenDontForceBlitter) {
if (hardwareInfo.platform.eRenderCoreFamily == IGFX_GEN12LP_CORE) {
GTEST_SKIP();
}
uint64_t gpuAddress = 0x1000;
void *buffer = reinterpret_cast<void *>(0x0);
size_t size = 0x1000;
MockGraphicsAllocation mockAllocation(buffer, gpuAddress, size);
HwHelper &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
EXPECT_FALSE(hwHelper.forceBlitterUseForGlobalBuffers(hardwareInfo, &mockAllocation));
}
HWTEST_F(HwHelperTest, givenVariousDebugKeyValuesWhenGettingLocalMemoryAccessModeThenCorrectValueIsReturned) {
struct MockHwHelper : HwHelperHw<FamilyType> {
using HwHelper::getDefaultLocalMemoryAccessMode;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -22,8 +22,7 @@ void Linker::patchIncrement(Device *pDevice, GraphicsAllocation *dstAllocation,
auto &hwInfo = pDevice->getHardwareInfo();
auto &helper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
bool useBlitter = (helper.isBlitCopyRequiredForLocalMemory(hwInfo, *dstAllocation) ||
helper.forceBlitterUseForGlobalBuffers(hwInfo, dstAllocation));
bool useBlitter = helper.isBlitCopyRequiredForLocalMemory(hwInfo, *dstAllocation);
auto initValue = ptrOffset(initData, relocationOffset);

View File

@@ -64,9 +64,5 @@ bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) {
return (hwInfo.platform.eProductFamily == IGFX_TIGERLAKE_LP || hwInfo.platform.eProductFamily == IGFX_ROCKETLAKE);
}
bool forceBlitterUseForGlobalBuffers(const HardwareInfo &hwInfo, GraphicsAllocation *allocation) {
return false;
}
} // namespace Gen12LPHelpers
} // namespace NEO

View File

@@ -38,7 +38,6 @@ void setAdditionalPipelineSelectFields(void *pipelineSelectCmd,
bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo);
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo);
bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo);
bool forceBlitterUseForGlobalBuffers(const HardwareInfo &hwInfo, GraphicsAllocation *allocation);
} // namespace Gen12LPHelpers
} // namespace NEO

View File

@@ -90,13 +90,5 @@ bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) {
return (hwInfo.platform.eProductFamily == IGFX_TIGERLAKE_LP || hwInfo.platform.eProductFamily == IGFX_DG1 || hwInfo.platform.eProductFamily == IGFX_ROCKETLAKE);
}
bool forceBlitterUseForGlobalBuffers(const HardwareInfo &hwInfo, GraphicsAllocation *allocation) {
if (hwInfo.platform.eProductFamily == PRODUCT_FAMILY::IGFX_DG1 && allocation->getUnderlyingBuffer() == 0) {
return true;
}
return false;
}
} // namespace Gen12LPHelpers
} // namespace NEO

View File

@@ -218,11 +218,6 @@ EngineGroupType HwHelperHw<Family>::getEngineGroupType(aub_stream::EngineType en
}
}
template <>
bool HwHelperHw<Family>::forceBlitterUseForGlobalBuffers(const HardwareInfo &hwInfo, GraphicsAllocation *allocation) const {
return Gen12LPHelpers::forceBlitterUseForGlobalBuffers(hwInfo, allocation);
}
template <>
void MemorySynchronizationCommands<Family>::addPipeControlWA(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
using PIPE_CONTROL = typename Family::PIPE_CONTROL;

View File

@@ -67,7 +67,6 @@ class HwHelper {
virtual bool checkResourceCompatibility(GraphicsAllocation &graphicsAllocation) = 0;
virtual bool allowRenderCompression(const HardwareInfo &hwInfo) const = 0;
virtual bool isBlitCopyRequiredForLocalMemory(const HardwareInfo &hwInfo, const GraphicsAllocation &allocation) const = 0;
virtual bool forceBlitterUseForGlobalBuffers(const HardwareInfo &hwInfo, GraphicsAllocation *allocation) const = 0;
virtual LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
static bool renderCompressedBuffersSupported(const HardwareInfo &hwInfo);
static bool renderCompressedImagesSupported(const HardwareInfo &hwInfo);
@@ -311,8 +310,6 @@ class HwHelperHw : public HwHelper {
bool isBlitCopyRequiredForLocalMemory(const HardwareInfo &hwInfo, const GraphicsAllocation &allocation) const override;
bool forceBlitterUseForGlobalBuffers(const HardwareInfo &hwInfo, GraphicsAllocation *allocation) const override;
LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
bool isBankOverrideRequired(const HardwareInfo &hwInfo) const override;

View File

@@ -443,11 +443,6 @@ inline bool HwHelperHw<GfxFamily>::isBlitCopyRequiredForLocalMemory(const Hardwa
hwInfo.capabilityTable.blitterOperationsSupported;
}
template <typename GfxFamily>
inline bool HwHelperHw<GfxFamily>::forceBlitterUseForGlobalBuffers(const HardwareInfo &hwInfo, GraphicsAllocation *allocation) const {
return false;
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::additionalKernelExecInfoSupported(const HardwareInfo &hwInfo) const {
return false;