performance: Stop ULLS in bo::wait only when light mode active
Resolves: HSD-18041491739 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
parent
1533f07912
commit
a78e3f98d5
|
@ -866,8 +866,10 @@ int Drm::waitHandle(uint32_t waitHandle, int64_t timeout) {
|
|||
const auto &mulitEngines = this->rootDeviceEnvironment.executionEnvironment.memoryManager->getRegisteredEngines();
|
||||
for (const auto &engines : mulitEngines) {
|
||||
for (const auto &engine : engines) {
|
||||
auto lock = engine.commandStreamReceiver->obtainUniqueOwnership();
|
||||
engine.commandStreamReceiver->stopDirectSubmission(false);
|
||||
if (engine.osContext->isDirectSubmissionLightActive()) {
|
||||
auto lock = engine.commandStreamReceiver->obtainUniqueOwnership();
|
||||
engine.commandStreamReceiver->stopDirectSubmission(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -129,8 +129,13 @@ class TestedDrmCommandStreamReceiver : public DrmCommandStreamReceiver<GfxFamily
|
|||
this->drm = proxyDrm;
|
||||
}
|
||||
|
||||
void stopDirectSubmission(bool blocking) override {
|
||||
stopDirectSubmissionCalled = true;
|
||||
}
|
||||
|
||||
void *latestReadBackAddress = nullptr;
|
||||
uint32_t fillReusableAllocationsListCalled = 0;
|
||||
bool stopDirectSubmissionCalled = false;
|
||||
};
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
|
|
@ -1079,6 +1079,25 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenWaitUserFenceFlagNotSetWhe
|
|||
EXPECT_EQ(0u, testedCsr->waitUserFenceResult.called);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenDirectSubmissionLightWhenWaitForFlushStampThenStopDirectSubmission) {
|
||||
EXPECT_FALSE(static_cast<TestedDrmCommandStreamReceiver<FamilyType> *>(csr)->stopDirectSubmissionCalled);
|
||||
|
||||
csr->getOsContext().setDirectSubmissionActive();
|
||||
FlushStamp handleToWait = 123;
|
||||
csr->waitForFlushStamp(handleToWait);
|
||||
|
||||
EXPECT_TRUE(static_cast<TestedDrmCommandStreamReceiver<FamilyType> *>(csr)->stopDirectSubmissionCalled);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, whenWaitForFlushStampThenDoNotStopDirectSubmission) {
|
||||
EXPECT_FALSE(static_cast<TestedDrmCommandStreamReceiver<FamilyType> *>(csr)->stopDirectSubmissionCalled);
|
||||
|
||||
FlushStamp handleToWait = 123;
|
||||
csr->waitForFlushStamp(handleToWait);
|
||||
|
||||
EXPECT_FALSE(static_cast<TestedDrmCommandStreamReceiver<FamilyType> *>(csr)->stopDirectSubmissionCalled);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenGemWaitUsedWhenKmdTimeoutUsedWhenDrmCsrWaitsForFlushStampThenExpectUseDrmGemWaitCallAndOverrideTimeout) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.SetKmdWaitTimeout.set(1000);
|
||||
|
|
Loading…
Reference in New Issue