fix: update completion data after makeResident

Completion data can't be updated when makeResident fails
Resources could have updated state but paging fence remains the same.
Wait on paging fence during freeing these resources might result in hang.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2024-08-29 09:23:49 +00:00
committed by Compute-Runtime-Automation
parent c934877790
commit 13ec7ad32a
3 changed files with 23 additions and 22 deletions

View File

@@ -894,6 +894,8 @@ TEST_F(WddmResidencyControllerWithMockWddmTest, givenMakeResidentFailsWhenCallin
TEST_F(WddmResidencyControllerWithMockWddmTest, givenMakeResidentFailsWhenCallingMakeResidentResidencyAllocationsThenCallItAgainWithCantTrimFurtherSetToTrue) {
MockWddmAllocation allocation1(gmmHelper);
allocation1.getResidencyData().updateCompletionData(0, osContextId);
residencyController->getMonitoredFence().currentFenceValue = 10;
wddm->makeResidentNumberOfBytesToTrim = 4 * 4096;
wddm->makeResidentStatus = false;
@@ -905,6 +907,7 @@ TEST_F(WddmResidencyControllerWithMockWddmTest, givenMakeResidentFailsWhenCallin
EXPECT_FALSE(result);
EXPECT_NE(wddm->makeResidentParamsPassed[0].cantTrimFurther, wddm->makeResidentParamsPassed[1].cantTrimFurther);
EXPECT_EQ(2u, wddm->makeResidentResult.called);
EXPECT_EQ(0u, allocation1.getResidencyData().getFenceValueForContextId(osContextId));
}
TEST_F(WddmResidencyControllerWithMockWddmTest, givenAllocationPackPassedWhenCallingMakeResidentResidencyAllocationsThenItIsUsed) {