mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
feature(sysman): Added sysfs filenames for the memory module
- The sysfs filenames have been added in the sysfsNameToFileMap of the SysmanKmdInterface classes. - The functions returning the sysfs filenames have been removed from the shared directory. - The ULTs have been added to return the sysfs filenames. Related-To: LOCI-4699 Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e6b0930657
commit
3f083360a2
@@ -387,10 +387,6 @@ std::string IoctlHelper::getFileForMaxMemoryFrequencyOfSubDevice(int subDeviceId
|
||||
return "/gt/gt" + std::to_string(subDeviceId) + "/mem_RP0_freq_mhz";
|
||||
}
|
||||
|
||||
std::string IoctlHelper::getFileForMemoryAddrRange(int subDeviceId) const {
|
||||
return "gt/gt" + std::to_string(subDeviceId) + "/addr_range";
|
||||
}
|
||||
|
||||
bool IoctlHelper::checkIfIoctlReinvokeRequired(int error, DrmIoctl ioctlRequest) const {
|
||||
return (error == EINTR || error == EAGAIN || error == EBUSY || error == -EBUSY);
|
||||
}
|
||||
|
||||
@@ -145,7 +145,6 @@ class IoctlHelper {
|
||||
virtual std::string getFileForMaxGpuFrequency() const;
|
||||
virtual std::string getFileForMaxGpuFrequencyOfSubDevice(int subDeviceId) const;
|
||||
virtual std::string getFileForMaxMemoryFrequencyOfSubDevice(int subDeviceId) const;
|
||||
virtual std::string getFileForMemoryAddrRange(int subdeviceId) const;
|
||||
virtual bool getFabricLatency(uint32_t fabricId, uint32_t &latency, uint32_t &bandwidth) = 0;
|
||||
virtual bool isWaitBeforeBindRequired(bool bind) const = 0;
|
||||
virtual void *pciBarrierMmap() { return nullptr; };
|
||||
|
||||
@@ -1423,10 +1423,6 @@ std::string IoctlHelperXe::getFileForMaxMemoryFrequencyOfSubDevice(int subDevice
|
||||
return "/device/gt" + std::to_string(subDeviceId) + "/freq_rp0";
|
||||
}
|
||||
|
||||
std::string IoctlHelperXe::getFileForMemoryAddrRange(int subDeviceId) const {
|
||||
return "device/tile" + std::to_string(subDeviceId) + "/addr_range";
|
||||
}
|
||||
|
||||
struct drm_xe_engine_class_instance *
|
||||
IoctlHelperXe::xeFindMatchingEngine(uint16_t engineClass, uint16_t engineInstance) {
|
||||
for (auto &engine : allEngines) {
|
||||
|
||||
@@ -96,7 +96,6 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
std::string getFileForMaxGpuFrequency() const override;
|
||||
std::string getFileForMaxGpuFrequencyOfSubDevice(int subDeviceId) const override;
|
||||
std::string getFileForMaxMemoryFrequencyOfSubDevice(int subDeviceId) const override;
|
||||
std::string getFileForMemoryAddrRange(int subdeviceId) const override;
|
||||
bool getFabricLatency(uint32_t fabricId, uint32_t &latency, uint32_t &bandwidth) override;
|
||||
bool isWaitBeforeBindRequired(bool bind) const override;
|
||||
std::unique_ptr<EngineInfo> createEngineInfo(bool isSysmanEnabled) override;
|
||||
|
||||
@@ -1563,13 +1563,6 @@ TEST(IoctlHelperTest, whenGettingFileNameForFrequencyFilesThenProperStringIsRetu
|
||||
EXPECT_STREQ("/gt/gt1/mem_RP0_freq_mhz", ioctlHelper->getFileForMaxMemoryFrequencyOfSubDevice(1).c_str());
|
||||
}
|
||||
|
||||
TEST(IoctlHelperTest, whenGettingFileNameForMemoryAddrRangeThenProperStringIsReturned) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
|
||||
auto ioctlHelper = drm.getIoctlHelper();
|
||||
EXPECT_STREQ("gt/gt0/addr_range", ioctlHelper->getFileForMemoryAddrRange(0).c_str());
|
||||
}
|
||||
|
||||
TEST(DistanceInfoTest, givenDistanceInfosWhenAssignRegionsFromDistancesThenCorrectRegionsSet) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
|
||||
|
||||
@@ -413,13 +413,6 @@ TEST(IoctlHelperXeTest, whenGettingFileNamesForFrequencyThenProperStringIsReturn
|
||||
EXPECT_STREQ("/device/gt1/freq_rp0", ioctlHelper->getFileForMaxMemoryFrequencyOfSubDevice(1).c_str());
|
||||
}
|
||||
|
||||
TEST(IoctlHelperXeTest, whenGettingFileNameForMemoryAddrRangeThenProperStringIsReturned) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
|
||||
auto ioctlHelper = std::make_unique<IoctlHelperXe>(drm);
|
||||
EXPECT_STREQ("device/tile0/addr_range", ioctlHelper->getFileForMemoryAddrRange(0).c_str());
|
||||
}
|
||||
|
||||
inline constexpr int testValueVmId = 0x5764;
|
||||
inline constexpr int testValueMapOff = 0x7788;
|
||||
inline constexpr int testValuePrime = 0x4321;
|
||||
|
||||
Reference in New Issue
Block a user