Add setEngines function stub to drm class

Related-To: NEO-3008

Change-Id: I43d66fb9db1a0005922d7fbd8b96fccff3e7046d
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
Slawomir Milczarek
2019-10-10 16:01:54 +02:00
committed by sys_ocldev
parent d581130ac7
commit a59559e516
5 changed files with 22 additions and 1 deletions

2
Jenkinsfile vendored
View File

@ -1,5 +1,5 @@
#!groovy
dependenciesRevision='3fca422c0e381f607f9c8c02dca161010c30dac8-1319'
strategy='EQUAL'
allowedCD=263
allowedCD=264
allowedF=7

View File

@ -182,6 +182,12 @@ Drm *Drm::create(int32_t deviceOrdinal) {
}
drmObject->queryEngineInfo();
ret = drmObject->setEngines();
if (ret != 0) {
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "FATAL: Failed to set engines\n");
return nullptr;
}
if (HwHelper::get(device->pHwInfo->platform.eRenderCoreFamily).getEnableLocalMemory(*device->pHwInfo)) {
drmObject->queryMemoryInfo();
drmObject->setMemoryRegions();

View File

@ -77,6 +77,7 @@ class Drm {
uint64_t getSliceMask(uint64_t sliceCount);
void queryEngineInfo();
void queryMemoryInfo();
int setEngines();
void setMemoryRegions();
MemoryInfo *getMemoryInfo() const {

View File

@ -21,6 +21,10 @@ void Drm::queryEngineInfo() {
void Drm::queryMemoryInfo() {
}
int Drm::setEngines() {
return 0;
}
void Drm::setMemoryRegions() {
}

View File

@ -27,6 +27,16 @@ TEST(DrmTest, whenQueryingMemoryInfoThenMemoryInfoIsNotCreatedAndNoIoctlIsCalled
EXPECT_EQ(0u, drm->ioctlCallsCount);
}
TEST(DrmTest, whenSettingEnginesThenReturnZeroValueAndCallNoIoctls) {
auto drm = std::make_unique<DrmMock>();
EXPECT_NE(nullptr, drm);
auto ret = drm->setEngines();
EXPECT_EQ(0, ret);
EXPECT_EQ(0u, drm->ioctlCallsCount);
}
TEST(DrmTest, whenSettingMemoryRegionsThenNoIoctlIsCalled) {
std::unique_ptr<DrmMock> drm = std::make_unique<DrmMock>();
EXPECT_NE(nullptr, drm);