mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Do not call GEM_WAIT while direct submission active
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0f78357e93
commit
9d3b759d29
@@ -111,6 +111,13 @@ TEST_F(DrmBufferObjectTest, GivenInvalidTilingWhenSettingTilingThenCallFails) {
|
||||
EXPECT_FALSE(ret);
|
||||
}
|
||||
|
||||
TEST_F(DrmBufferObjectTest, givenDirectSubmissionActiveWhenCallWaitThenNoIoctlIsCalled) {
|
||||
mock->setDirectSubmissionActive(true);
|
||||
mock->ioctl_expected.total = 0;
|
||||
auto ret = bo->wait(-1);
|
||||
EXPECT_FALSE(ret);
|
||||
}
|
||||
|
||||
TEST_F(DrmBufferObjectTest, givenAddressThatWhenSizeIsAddedCrosses32BitBoundaryWhenExecIsCalledThen48BitFlagIsSet) {
|
||||
drm_i915_gem_exec_object2 execObject;
|
||||
|
||||
|
||||
@@ -71,6 +71,10 @@ bool BufferObject::close() {
|
||||
}
|
||||
|
||||
int BufferObject::wait(int64_t timeoutNs) {
|
||||
if (this->drm->isDirectSubmissionActive()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
drm_i915_gem_wait wait = {};
|
||||
wait.bo_handle = this->handle;
|
||||
wait.timeout_ns = -1;
|
||||
|
||||
@@ -92,5 +92,5 @@ HWTEST_F(DrmDirectSubmissionTest, givenDrmDirectSubmissionWhenDestructObjectThen
|
||||
drm->ioctlCallsCount = 0u;
|
||||
drmDirectSubmission.reset();
|
||||
|
||||
EXPECT_EQ(drm->ioctlCallsCount, 7u);
|
||||
EXPECT_EQ(drm->ioctlCallsCount, 3u);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user