mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Remove Gen12LP helpers files
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c55a956b02
commit
ad97bd32de
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/gen12lp/hw_cmds.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
|
||||
@@ -36,11 +36,12 @@ GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenAubCommandStreamReceive
|
||||
EXPECT_EQ(0x00030001u, headerRCS);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenGraphicsAlloctionWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
GEN12LPTEST_F(Gen12LPAubCommandStreamReceiverTests, givenGraphicsAlloctionWithLocalMemoryPoolWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
MockGraphicsAllocation allocation(nullptr, 0);
|
||||
allocation.overrideMemoryPool(MemoryPool::LocalMemory);
|
||||
auto bits = aubCsr->getPPGTTAdditionalBits(&allocation);
|
||||
constexpr uint64_t expectedBits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit);
|
||||
constexpr uint64_t expectedBits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit) | BIT(PageTableEntry::localMemoryBit);
|
||||
|
||||
EXPECT_EQ(expectedBits, bits);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||
|
||||
@@ -10,24 +10,13 @@
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_aub_stream.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_csr_simulated_common_hw.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using Gen12LPCommandStreamReceiverSimulatedCommonHwTests = Test<ClDeviceFixture>;
|
||||
|
||||
template <typename FamilyType>
|
||||
class MockSimulatedCsrHw : public CommandStreamReceiverSimulatedHw<FamilyType> {
|
||||
public:
|
||||
using CommandStreamReceiverSimulatedHw<FamilyType>::CommandStreamReceiverSimulatedHw;
|
||||
|
||||
void pollForCompletion() override {}
|
||||
bool writeMemory(GraphicsAllocation &gfxAllocation) override { return true; }
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) override {}
|
||||
void writeMMIO(uint32_t offset, uint32_t value) override {}
|
||||
void dumpAllocation(GraphicsAllocation &gfxAllocation) override {}
|
||||
};
|
||||
|
||||
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubCommandStreamReceiverWhewGlobalMmiosAreInitializedThenMOCSRegistersAreConfigured) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
@@ -143,3 +132,15 @@ GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenAubComman
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B098, 0x00300010)));
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000B09C, 0x00300010)));
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPCommandStreamReceiverSimulatedCommonHwTests, givenLocalMemoryEnabledWhenGlobalMmiosAreInitializedThenLmemCfgMmioIsWritten) {
|
||||
MockSimulatedCsrHw<FamilyType> csrSimulatedCommonHw(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
csrSimulatedCommonHw.localMemoryEnabled = true;
|
||||
|
||||
auto stream = std::make_unique<MockAubStreamMockMmioWrite>();
|
||||
csrSimulatedCommonHw.stream = stream.get();
|
||||
|
||||
csrSimulatedCommonHw.initGlobalMMIO();
|
||||
|
||||
EXPECT_TRUE(stream->isOnMmioList(MMIOPair(0x0000CF58, 0x80000000)));
|
||||
}
|
||||
|
||||
@@ -25,11 +25,12 @@ GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, givenNullPtrGraphicsAlloctio
|
||||
EXPECT_EQ(expectedBits, bits);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, givenGraphicsAlloctionWWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
GEN12LPTEST_F(Gen12LPTbxCommandStreamReceiverTests, givenGraphicsAlloctionWithLocalMemoryPoolWhenGetPPGTTAdditionalBitsIsCalledThenAppropriateValueIsReturned) {
|
||||
auto tbxCsr = std::make_unique<TbxCommandStreamReceiverHw<FamilyType>>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
MockGraphicsAllocation allocation(nullptr, 0);
|
||||
allocation.overrideMemoryPool(MemoryPool::LocalMemory);
|
||||
auto bits = tbxCsr->getPPGTTAdditionalBits(&allocation);
|
||||
constexpr uint64_t expectedBits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit);
|
||||
constexpr uint64_t expectedBits = BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit) | BIT(PageTableEntry::localMemoryBit);
|
||||
|
||||
EXPECT_EQ(expectedBits, bits);
|
||||
}
|
||||
|
||||
@@ -4,18 +4,6 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
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
|
||||
)
|
||||
else()
|
||||
set(SHARED_SRCS_ADDITIONAL_FILES_GEN12LP
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}helpers_gen12lp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/helpers_gen12lp.h
|
||||
)
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY SHARED_SRCS_ADDITIONAL_FILES_GEN12LP ${SHARED_SRCS_ADDITIONAL_FILES_GEN12LP})
|
||||
|
||||
if(SUPPORT_ADLP)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_bdw_and_later.inl"
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
|
||||
namespace NEO {
|
||||
typedef TGLLPFamily Family;
|
||||
@@ -17,12 +16,16 @@ void CommandStreamReceiverSimulatedCommonHw<Family>::initGlobalMMIO() {
|
||||
stream->writeMMIO(mmioPair.first, mmioPair.second);
|
||||
}
|
||||
|
||||
Gen12LPHelpers::initAdditionalGlobalMMIO(*this, *stream);
|
||||
if (this->isLocalMemoryEnabled()) {
|
||||
MMIOPair lmemCfg = {0x0000cf58, 0x80000000}; //LMEM_CFG
|
||||
stream->writeMMIO(lmemCfg.first, lmemCfg.second);
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
uint64_t CommandStreamReceiverSimulatedCommonHw<Family>::getPPGTTAdditionalBits(GraphicsAllocation *gfxAllocation) {
|
||||
return BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit) | Gen12LPHelpers::getPPGTTAdditionalBits(gfxAllocation);
|
||||
return BIT(PageTableEntry::presentBit) | BIT(PageTableEntry::writableBit) |
|
||||
((gfxAllocation && gfxAllocation->getMemoryPool() == MemoryPool::LocalMemory) ? BIT(PageTableEntry::localMemoryBit) : 0);
|
||||
}
|
||||
|
||||
template <>
|
||||
@@ -30,7 +33,7 @@ void CommandStreamReceiverSimulatedCommonHw<Family>::getGTTData(void *memory, Au
|
||||
data = {};
|
||||
data.present = true;
|
||||
|
||||
Gen12LPHelpers::adjustAubGTTData(*this, data);
|
||||
data.localMemory = this->isLocalMemoryEnabled();
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
|
||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
namespace Gen12LPHelpers {
|
||||
|
||||
void adjustCoherencyFlag(PRODUCT_FAMILY productFamily, bool &coherencyFlag) {}
|
||||
|
||||
void initAdditionalGlobalMMIO(const CommandStreamReceiver &commandStreamReceiver, AubMemDump::AubStream &stream) {}
|
||||
|
||||
uint64_t getPPGTTAdditionalBits(GraphicsAllocation *graphicsAllocation) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void adjustAubGTTData(const CommandStreamReceiver &commandStreamReceiver, AubGTTData &data) {}
|
||||
|
||||
bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) {
|
||||
HwHelper &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
return hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
|
||||
}
|
||||
|
||||
} // namespace Gen12LPHelpers
|
||||
} // namespace NEO
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds_base.h"
|
||||
|
||||
namespace AubMemDump {
|
||||
struct AubStream;
|
||||
}
|
||||
struct AubGTTData;
|
||||
|
||||
namespace NEO {
|
||||
class CommandStreamReceiver;
|
||||
class GraphicsAllocation;
|
||||
struct HardwareInfo;
|
||||
struct PipelineSelectArgs;
|
||||
class Image;
|
||||
enum class LocalMemoryAccessMode;
|
||||
|
||||
namespace Gen12LPHelpers {
|
||||
void initAdditionalGlobalMMIO(const CommandStreamReceiver &commandStreamReceiver, AubMemDump::AubStream &stream);
|
||||
uint64_t getPPGTTAdditionalBits(GraphicsAllocation *graphicsAllocation);
|
||||
void adjustAubGTTData(const CommandStreamReceiver &commandStreamReceiver, AubGTTData &data);
|
||||
bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo);
|
||||
} // namespace Gen12LPHelpers
|
||||
} // namespace NEO
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h"
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
|
||||
namespace NEO {
|
||||
namespace Gen12LPHelpers {
|
||||
|
||||
void initAdditionalGlobalMMIO(const CommandStreamReceiver &commandStreamReceiver, AubMemDump::AubStream &stream) {}
|
||||
|
||||
uint64_t getPPGTTAdditionalBits(GraphicsAllocation *graphicsAllocation) {
|
||||
if (graphicsAllocation && graphicsAllocation->getMemoryPool() == MemoryPool::LocalMemory) {
|
||||
return BIT(PageTableEntry::localMemoryBit);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void adjustAubGTTData(const CommandStreamReceiver &commandStreamReceiver, AubGTTData &data) {
|
||||
data.localMemory = commandStreamReceiver.isLocalMemoryEnabled();
|
||||
}
|
||||
|
||||
bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) {
|
||||
HwHelper &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
return hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
|
||||
}
|
||||
|
||||
} // namespace Gen12LPHelpers
|
||||
} // namespace NEO
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
using Family = NEO::TGLLPFamily;
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/helpers/flat_batch_buffer_helper_hw.inl"
|
||||
#include "shared/source/helpers/hw_helper_base.inl"
|
||||
#include "shared/source/helpers/hw_helper_bdw_and_later.inl"
|
||||
@@ -33,7 +32,7 @@ void HwHelperHw<Family>::setupHardwareCapabilities(HardwareCapabilities *caps, c
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) const {
|
||||
return Gen12LPHelpers::isOffsetToSkipSetFFIDGPWARequired(hwInfo);
|
||||
return isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#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"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/hw_info_config.inl"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/hw_info_config.inl"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/hw_info_config.inl"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/hw_info_config.inl"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/csr_definitions.h"
|
||||
#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"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#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"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/hw_info_config.inl"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/hw_info_config.inl"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/hw_info_config.inl"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/hw_info_config.inl"
|
||||
|
||||
Reference in New Issue
Block a user