Skip to content

Commit ce7de9d

Browse files
Revert "Unify query ioctls"
This reverts commit 571199d. Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
1 parent 65ca31d commit ce7de9d

File tree

11 files changed

+129
-83
lines changed

11 files changed

+129
-83
lines changed

shared/source/os_interface/linux/drm_neo.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@ std::string getIoctlString(DrmIoctl ioctlRequest) {
142142
return "DRM_IOCTL_I915_GEM_VM_CREATE";
143143
case DrmIoctl::GemVmDestroy:
144144
return "DRM_IOCTL_I915_GEM_VM_DESTROY";
145-
case DrmIoctl::QueryEngineInfo:
146-
return "DRM_I915_QUERY_ENGINE_INFO";
147-
case DrmIoctl::QueryMemoryRegions:
148-
return "DRM_I915_QUERY_MEMORY_REGIONS";
149145
}
150146
UNRECOVERABLE_IF(true);
151147
return "";
@@ -981,7 +977,7 @@ bool Drm::querySystemInfo() {
981977
}
982978

983979
std::vector<uint8_t> Drm::getMemoryRegions() {
984-
return this->query(ioctlHelper->getIoctlRequestValue(DrmIoctl::QueryMemoryRegions), 0);
980+
return this->query(ioctlHelper->getMemRegionsIoctlVal(), 0);
985981
}
986982

987983
bool Drm::queryMemoryInfo() {
@@ -995,7 +991,7 @@ bool Drm::queryMemoryInfo() {
995991
}
996992

997993
bool Drm::queryEngineInfo(bool isSysmanEnabled) {
998-
auto enginesQuery = this->query(ioctlHelper->getIoctlRequestValue(DrmIoctl::QueryEngineInfo), 0);
994+
auto enginesQuery = this->query(ioctlHelper->getEngineInfoIoctlVal(), 0);
999995
if (enginesQuery.empty()) {
1000996
return false;
1001997
}

shared/source/os_interface/linux/drm_wrappers.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,6 @@ enum class DrmIoctl {
214214
GemContextGetparam,
215215
GemContextSetparam,
216216
Query,
217-
QueryEngineInfo,
218-
QueryMemoryRegions,
219217
GemMmap,
220218
GemMmapOffset,
221219
GemVmCreate,

shared/source/os_interface/linux/ioctl_helper.cpp

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -82,60 +82,6 @@ void IoctlHelper::logExecBuffer(const ExecBuffer &execBuffer, std::stringstream
8282
<< " }\n";
8383
}
8484

85-
unsigned int IoctlHelper::getIoctlRequestValueBase(DrmIoctl ioctlRequest) const {
86-
switch (ioctlRequest) {
87-
case DrmIoctl::GemExecbuffer2:
88-
return DRM_IOCTL_I915_GEM_EXECBUFFER2;
89-
case DrmIoctl::GemWait:
90-
return DRM_IOCTL_I915_GEM_WAIT;
91-
case DrmIoctl::GemClose:
92-
return DRM_IOCTL_GEM_CLOSE;
93-
case DrmIoctl::GemUserptr:
94-
return DRM_IOCTL_I915_GEM_USERPTR;
95-
case DrmIoctl::GemCreate:
96-
return DRM_IOCTL_I915_GEM_CREATE;
97-
case DrmIoctl::GemSetDomain:
98-
return DRM_IOCTL_I915_GEM_SET_DOMAIN;
99-
case DrmIoctl::GemSetTiling:
100-
return DRM_IOCTL_I915_GEM_SET_TILING;
101-
case DrmIoctl::GemGetTiling:
102-
return DRM_IOCTL_I915_GEM_GET_TILING;
103-
case DrmIoctl::GemContextCreateExt:
104-
return DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT;
105-
case DrmIoctl::GemContextDestroy:
106-
return DRM_IOCTL_I915_GEM_CONTEXT_DESTROY;
107-
case DrmIoctl::RegRead:
108-
return DRM_IOCTL_I915_REG_READ;
109-
case DrmIoctl::GetResetStats:
110-
return DRM_IOCTL_I915_GET_RESET_STATS;
111-
case DrmIoctl::GemContextGetparam:
112-
return DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM;
113-
case DrmIoctl::GemContextSetparam:
114-
return DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM;
115-
case DrmIoctl::Query:
116-
return DRM_IOCTL_I915_QUERY;
117-
case DrmIoctl::GemMmap:
118-
return DRM_IOCTL_I915_GEM_MMAP;
119-
case DrmIoctl::PrimeFdToHandle:
120-
return DRM_IOCTL_PRIME_FD_TO_HANDLE;
121-
case DrmIoctl::PrimeHandleToFd:
122-
return DRM_IOCTL_PRIME_HANDLE_TO_FD;
123-
case DrmIoctl::GemMmapOffset:
124-
return DRM_IOCTL_I915_GEM_MMAP_OFFSET;
125-
case DrmIoctl::GemVmCreate:
126-
return DRM_IOCTL_I915_GEM_VM_CREATE;
127-
case DrmIoctl::GemVmDestroy:
128-
return DRM_IOCTL_I915_GEM_VM_DESTROY;
129-
case DrmIoctl::QueryEngineInfo:
130-
return DRM_I915_QUERY_ENGINE_INFO;
131-
case DrmIoctl::QueryMemoryRegions:
132-
return DRM_I915_QUERY_MEMORY_REGIONS;
133-
default:
134-
UNRECOVERABLE_IF(true);
135-
return 0;
136-
}
137-
}
138-
13985
uint32_t IoctlHelper::createDrmContext(Drm &drm, const OsContext &osContext, uint32_t drmVmId) {
14086

14187
const auto numberOfCCS = drm.getRootDeviceEnvironment().getHardwareInfo()->gtSystemInfo.CCSInfo.NumberOfCCSEnabled;

shared/source/os_interface/linux/ioctl_helper.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ class IoctlHelper {
8484
virtual bool setVmBoAdvise(Drm *drm, int32_t handle, uint32_t attribute, void *region) = 0;
8585
virtual bool setVmPrefetch(Drm *drm, uint64_t start, uint64_t length, uint32_t region) = 0;
8686
virtual uint32_t getDirectSubmissionFlag() = 0;
87+
virtual int32_t getMemRegionsIoctlVal() = 0;
88+
virtual int32_t getEngineInfoIoctlVal() = 0;
8789
virtual uint32_t getComputeSlicesIoctlVal() = 0;
8890
virtual std::unique_ptr<uint8_t[]> prepareVmBindExt(const StackVec<uint32_t, 2> &bindExtHandles) = 0;
8991
virtual uint64_t getFlagsForVmBind(bool bindCapture, bool bindImmediate, bool bindMakeResident) = 0;
@@ -113,7 +115,7 @@ class IoctlHelper {
113115
virtual bool isContextDebugSupported(Drm *drm) = 0;
114116
virtual int setContextDebugFlag(Drm *drm, uint32_t drmContextId) = 0;
115117
virtual bool isDebugAttachAvailable() = 0;
116-
virtual unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) const = 0;
118+
virtual unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) = 0;
117119

118120
uint32_t createDrmContext(Drm &drm, const OsContext &osContext, uint32_t drmVmId);
119121

@@ -122,9 +124,6 @@ class IoctlHelper {
122124

123125
void fillExecBuffer(ExecBuffer &execBuffer, uintptr_t buffersPtr, uint32_t bufferCount, uint32_t startOffset, uint32_t size, uint64_t flags, uint32_t drmContextId);
124126
void logExecBuffer(const ExecBuffer &execBuffer, std::stringstream &logger);
125-
126-
protected:
127-
unsigned int getIoctlRequestValueBase(DrmIoctl ioctlRequest) const;
128127
};
129128

130129
class IoctlHelperUpstream : public IoctlHelper {
@@ -145,6 +144,8 @@ class IoctlHelperUpstream : public IoctlHelper {
145144
bool setVmBoAdvise(Drm *drm, int32_t handle, uint32_t attribute, void *region) override;
146145
bool setVmPrefetch(Drm *drm, uint64_t start, uint64_t length, uint32_t region) override;
147146
uint32_t getDirectSubmissionFlag() override;
147+
int32_t getMemRegionsIoctlVal() override;
148+
int32_t getEngineInfoIoctlVal() override;
148149
uint32_t getComputeSlicesIoctlVal() override;
149150
std::unique_ptr<uint8_t[]> prepareVmBindExt(const StackVec<uint32_t, 2> &bindExtHandles) override;
150151
uint64_t getFlagsForVmBind(bool bindCapture, bool bindImmediate, bool bindMakeResident) override;
@@ -174,7 +175,7 @@ class IoctlHelperUpstream : public IoctlHelper {
174175
bool isContextDebugSupported(Drm *drm) override;
175176
int setContextDebugFlag(Drm *drm, uint32_t drmContextId) override;
176177
bool isDebugAttachAvailable() override;
177-
unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) const override;
178+
unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) override;
178179
};
179180

180181
template <PRODUCT_FAMILY gfxProduct>
@@ -188,7 +189,7 @@ class IoctlHelperImpl : public IoctlHelperUpstream {
188189

189190
uint32_t createGemExt(Drm *drm, const MemRegionsVec &memClassInstances, size_t allocSize, uint32_t &handle, std::optional<uint32_t> vmId) override;
190191
std::vector<MemoryRegion> translateToMemoryRegions(const std::vector<uint8_t> &regionInfo) override;
191-
unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) const override;
192+
unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) override;
192193
};
193194

194195
class IoctlHelperPrelim20 : public IoctlHelper {
@@ -209,6 +210,8 @@ class IoctlHelperPrelim20 : public IoctlHelper {
209210
bool setVmBoAdvise(Drm *drm, int32_t handle, uint32_t attribute, void *region) override;
210211
bool setVmPrefetch(Drm *drm, uint64_t start, uint64_t length, uint32_t region) override;
211212
uint32_t getDirectSubmissionFlag() override;
213+
int32_t getMemRegionsIoctlVal() override;
214+
int32_t getEngineInfoIoctlVal() override;
212215
uint32_t getComputeSlicesIoctlVal() override;
213216
std::unique_ptr<uint8_t[]> prepareVmBindExt(const StackVec<uint32_t, 2> &bindExtHandles) override;
214217
uint64_t getFlagsForVmBind(bool bindCapture, bool bindImmediate, bool bindMakeResident) override;
@@ -238,7 +241,7 @@ class IoctlHelperPrelim20 : public IoctlHelper {
238241
bool isContextDebugSupported(Drm *drm) override;
239242
int setContextDebugFlag(Drm *drm, uint32_t drmContextId) override;
240243
bool isDebugAttachAvailable() override;
241-
unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) const override;
244+
unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) override;
242245
};
243246

244247
} // namespace NEO

shared/source/os_interface/linux/ioctl_helper_prelim.cpp

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,14 @@ uint32_t IoctlHelperPrelim20::getDirectSubmissionFlag() {
227227
return PRELIM_I915_CONTEXT_CREATE_FLAGS_LONG_RUNNING;
228228
}
229229

230+
int32_t IoctlHelperPrelim20::getMemRegionsIoctlVal() {
231+
return PRELIM_DRM_I915_QUERY_MEMORY_REGIONS;
232+
}
233+
234+
int32_t IoctlHelperPrelim20::getEngineInfoIoctlVal() {
235+
return PRELIM_DRM_I915_QUERY_ENGINE_INFO;
236+
}
237+
230238
uint32_t IoctlHelperPrelim20::getComputeSlicesIoctlVal() {
231239
return PRELIM_DRM_I915_QUERY_COMPUTE_SLICES;
232240
}
@@ -554,8 +562,44 @@ bool IoctlHelperPrelim20::isDebugAttachAvailable() {
554562
return true;
555563
}
556564

557-
unsigned int IoctlHelperPrelim20::getIoctlRequestValue(DrmIoctl ioctlRequest) const {
565+
unsigned int IoctlHelperPrelim20::getIoctlRequestValue(DrmIoctl ioctlRequest) {
558566
switch (ioctlRequest) {
567+
case DrmIoctl::GemExecbuffer2:
568+
return DRM_IOCTL_I915_GEM_EXECBUFFER2;
569+
case DrmIoctl::GemWait:
570+
return DRM_IOCTL_I915_GEM_WAIT;
571+
case DrmIoctl::GemClose:
572+
return DRM_IOCTL_GEM_CLOSE;
573+
case DrmIoctl::GemUserptr:
574+
return DRM_IOCTL_I915_GEM_USERPTR;
575+
case DrmIoctl::GemCreate:
576+
return DRM_IOCTL_I915_GEM_CREATE;
577+
case DrmIoctl::GemSetDomain:
578+
return DRM_IOCTL_I915_GEM_SET_DOMAIN;
579+
case DrmIoctl::GemSetTiling:
580+
return DRM_IOCTL_I915_GEM_SET_TILING;
581+
case DrmIoctl::GemGetTiling:
582+
return DRM_IOCTL_I915_GEM_GET_TILING;
583+
case DrmIoctl::GemContextCreateExt:
584+
return DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT;
585+
case DrmIoctl::GemContextDestroy:
586+
return DRM_IOCTL_I915_GEM_CONTEXT_DESTROY;
587+
case DrmIoctl::RegRead:
588+
return DRM_IOCTL_I915_REG_READ;
589+
case DrmIoctl::GetResetStats:
590+
return DRM_IOCTL_I915_GET_RESET_STATS;
591+
case DrmIoctl::GemContextGetparam:
592+
return DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM;
593+
case DrmIoctl::GemContextSetparam:
594+
return DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM;
595+
case DrmIoctl::Query:
596+
return DRM_IOCTL_I915_QUERY;
597+
case DrmIoctl::GemMmap:
598+
return DRM_IOCTL_I915_GEM_MMAP;
599+
case DrmIoctl::PrimeFdToHandle:
600+
return DRM_IOCTL_PRIME_FD_TO_HANDLE;
601+
case DrmIoctl::PrimeHandleToFd:
602+
return DRM_IOCTL_PRIME_HANDLE_TO_FD;
559603
case DrmIoctl::GemVmBind:
560604
return PRELIM_DRM_IOCTL_I915_GEM_VM_BIND;
561605
case DrmIoctl::GemVmUnbind:
@@ -580,8 +624,15 @@ unsigned int IoctlHelperPrelim20::getIoctlRequestValue(DrmIoctl ioctlRequest) co
580624
return PRELIM_DRM_IOCTL_I915_GEM_CLOS_FREE;
581625
case DrmIoctl::GemCacheReserve:
582626
return PRELIM_DRM_IOCTL_I915_GEM_CACHE_RESERVE;
627+
case DrmIoctl::GemMmapOffset:
628+
return DRM_IOCTL_I915_GEM_MMAP_OFFSET;
629+
case DrmIoctl::GemVmCreate:
630+
return DRM_IOCTL_I915_GEM_VM_CREATE;
631+
case DrmIoctl::GemVmDestroy:
632+
return DRM_IOCTL_I915_GEM_VM_DESTROY;
583633
default:
584-
return getIoctlRequestValueBase(ioctlRequest);
634+
UNRECOVERABLE_IF(true);
635+
return 0u;
585636
}
586637
}
587638

shared/source/os_interface/linux/ioctl_helper_upstream.cpp

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ uint32_t IoctlHelperUpstream::getDirectSubmissionFlag() {
111111
return 0u;
112112
}
113113

114+
int32_t IoctlHelperUpstream::getMemRegionsIoctlVal() {
115+
return DRM_I915_QUERY_MEMORY_REGIONS;
116+
}
117+
118+
int32_t IoctlHelperUpstream::getEngineInfoIoctlVal() {
119+
return DRM_I915_QUERY_ENGINE_INFO;
120+
}
121+
114122
uint32_t IoctlHelperUpstream::getComputeSlicesIoctlVal() {
115123
return 0;
116124
}
@@ -236,11 +244,55 @@ bool IoctlHelperUpstream::isDebugAttachAvailable() {
236244
return false;
237245
}
238246

239-
unsigned int IoctlHelperUpstream::getIoctlRequestValue(DrmIoctl ioctlRequest) const {
240-
if (ioctlRequest == DrmIoctl::GemCreateExt) {
247+
unsigned int IoctlHelperUpstream::getIoctlRequestValue(DrmIoctl ioctlRequest) {
248+
switch (ioctlRequest) {
249+
case DrmIoctl::GemExecbuffer2:
250+
return DRM_IOCTL_I915_GEM_EXECBUFFER2;
251+
case DrmIoctl::GemWait:
252+
return DRM_IOCTL_I915_GEM_WAIT;
253+
case DrmIoctl::GemClose:
254+
return DRM_IOCTL_GEM_CLOSE;
255+
case DrmIoctl::GemUserptr:
256+
return DRM_IOCTL_I915_GEM_USERPTR;
257+
case DrmIoctl::GemCreate:
258+
return DRM_IOCTL_I915_GEM_CREATE;
259+
case DrmIoctl::GemCreateExt:
241260
return DRM_IOCTL_I915_GEM_CREATE_EXT;
261+
case DrmIoctl::GemSetDomain:
262+
return DRM_IOCTL_I915_GEM_SET_DOMAIN;
263+
case DrmIoctl::GemSetTiling:
264+
return DRM_IOCTL_I915_GEM_SET_TILING;
265+
case DrmIoctl::GemGetTiling:
266+
return DRM_IOCTL_I915_GEM_GET_TILING;
267+
case DrmIoctl::GemContextCreateExt:
268+
return DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT;
269+
case DrmIoctl::GemContextDestroy:
270+
return DRM_IOCTL_I915_GEM_CONTEXT_DESTROY;
271+
case DrmIoctl::RegRead:
272+
return DRM_IOCTL_I915_REG_READ;
273+
case DrmIoctl::GetResetStats:
274+
return DRM_IOCTL_I915_GET_RESET_STATS;
275+
case DrmIoctl::GemContextGetparam:
276+
return DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM;
277+
case DrmIoctl::GemContextSetparam:
278+
return DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM;
279+
case DrmIoctl::Query:
280+
return DRM_IOCTL_I915_QUERY;
281+
case DrmIoctl::GemMmap:
282+
return DRM_IOCTL_I915_GEM_MMAP;
283+
case DrmIoctl::PrimeFdToHandle:
284+
return DRM_IOCTL_PRIME_FD_TO_HANDLE;
285+
case DrmIoctl::PrimeHandleToFd:
286+
return DRM_IOCTL_PRIME_HANDLE_TO_FD;
287+
case DrmIoctl::GemMmapOffset:
288+
return DRM_IOCTL_I915_GEM_MMAP_OFFSET;
289+
case DrmIoctl::GemVmCreate:
290+
return DRM_IOCTL_I915_GEM_VM_CREATE;
291+
case DrmIoctl::GemVmDestroy:
292+
return DRM_IOCTL_I915_GEM_VM_DESTROY;
293+
default:
294+
UNRECOVERABLE_IF(true);
295+
return 0u;
242296
}
243-
244-
return getIoctlRequestValueBase(ioctlRequest);
245297
}
246298
} // namespace NEO

shared/source/os_interface/linux/local/dg1/ioctl_helper_dg1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ std::vector<MemoryRegion> IoctlHelperImpl<gfxProduct>::translateToMemoryRegions(
6767
}
6868

6969
template <>
70-
unsigned int IoctlHelperImpl<gfxProduct>::getIoctlRequestValue(DrmIoctl ioctlRequest) const {
70+
unsigned int IoctlHelperImpl<gfxProduct>::getIoctlRequestValue(DrmIoctl ioctlRequest) {
7171
switch (ioctlRequest) {
7272
case DrmIoctl::DG1GemCreateExt:
7373
return DRM_IOCTL_I915_GEM_CREATE_EXT;

shared/test/common/libult/linux/drm_mock_prelim_context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ bool DrmMockPrelimContext::handlePrelimQueryItem(void *arg) {
274274
const auto numberOfCCS = gtSystemInfo.CCSInfo.IsValid && !disableCcsSupport ? gtSystemInfo.CCSInfo.NumberOfCCSEnabled : 0u;
275275

276276
switch (queryItem->queryId) {
277-
case DRM_I915_QUERY_ENGINE_INFO: {
277+
case PRELIM_DRM_I915_QUERY_ENGINE_INFO: {
278278
auto numberOfTiles = gtSystemInfo.MultiTileArchInfo.IsValid ? gtSystemInfo.MultiTileArchInfo.TileCount : 1u;
279279
uint32_t numberOfEngines = numberOfTiles * (4u + numberOfCCS + static_cast<uint32_t>(supportedCopyEnginesMask.count()));
280280
int engineInfoSize = sizeof(prelim_drm_i915_query_engine_info) + numberOfEngines * sizeof(prelim_drm_i915_engine_info);
@@ -306,7 +306,7 @@ bool DrmMockPrelimContext::handlePrelimQueryItem(void *arg) {
306306
break;
307307
}
308308

309-
case DRM_I915_QUERY_MEMORY_REGIONS: {
309+
case PRELIM_DRM_I915_QUERY_MEMORY_REGIONS: {
310310
if (queryMemoryRegionInfoSuccessCount == 0) {
311311
queryItem->length = -EINVAL;
312312
return true;

shared/test/unit_test/os_interface/linux/ioctl_helper_tests_prelim.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ TEST_F(IoctlPrelimHelperTests, givenPrelimsWhenGetDirectSubmissionFlagThenCorrec
187187
}
188188

189189
TEST_F(IoctlPrelimHelperTests, givenPrelimsWhenGetMemRegionsIoctlValThenCorrectValueReturned) {
190-
EXPECT_EQ(static_cast<unsigned int>(DRM_I915_QUERY_MEMORY_REGIONS), getIoctlRequestValue(DrmIoctl::QueryMemoryRegions, &ioctlHelper));
190+
EXPECT_EQ(PRELIM_DRM_I915_QUERY_MEMORY_REGIONS, ioctlHelper.getMemRegionsIoctlVal());
191191
}
192192

193193
TEST_F(IoctlPrelimHelperTests, givenPrelimsWhenGetEngineInfoIoctlValThenCorrectValueReturned) {
194-
EXPECT_EQ(static_cast<unsigned int>(DRM_I915_QUERY_ENGINE_INFO), getIoctlRequestValue(DrmIoctl::QueryEngineInfo, &ioctlHelper));
194+
EXPECT_EQ(PRELIM_DRM_I915_QUERY_ENGINE_INFO, ioctlHelper.getEngineInfoIoctlVal());
195195
}
196196

197197
TEST_F(IoctlPrelimHelperTests, givenPrelimsWhenTranslateToEngineCapsThenReturnSameData) {

shared/test/unit_test/os_interface/linux/ioctl_helper_tests_upstream.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ TEST(IoctlHelperTestsUpstream, givenUpstreamWhenGetMemRegionsIoctlValThenCorrect
222222
executionEnvironment->prepareRootDeviceEnvironments(1);
223223
auto drm = std::make_unique<DrmTipMock>(*executionEnvironment->rootDeviceEnvironments[0]);
224224

225-
EXPECT_EQ(static_cast<unsigned int>(DRM_I915_QUERY_MEMORY_REGIONS), getIoctlRequestValue(DrmIoctl::QueryMemoryRegions, drm->getIoctlHelper()));
225+
EXPECT_EQ(DRM_I915_QUERY_MEMORY_REGIONS, drm->getIoctlHelper()->getMemRegionsIoctlVal());
226226
}
227227

228228
TEST(IoctlHelperTestsUpstream, givenUpstreamWhenGetEngineInfoIoctlValThenCorrectValueReturned) {
229229
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
230230
executionEnvironment->prepareRootDeviceEnvironments(1);
231231
auto drm = std::make_unique<DrmTipMock>(*executionEnvironment->rootDeviceEnvironments[0]);
232232

233-
EXPECT_EQ(static_cast<unsigned int>(DRM_I915_QUERY_ENGINE_INFO), getIoctlRequestValue(DrmIoctl::QueryEngineInfo, drm->getIoctlHelper()));
233+
EXPECT_EQ(DRM_I915_QUERY_ENGINE_INFO, drm->getIoctlHelper()->getEngineInfoIoctlVal());
234234
}
235235

236236
TEST(IoctlHelperTestsUpstream, givenUpstreamWhenQueryDistancesThenReturnEinval) {

0 commit comments

Comments
 (0)