Move KMD Notify logic from CSR to specialized helper

- Decission about timeout enabling and value moved out of CSR
- Timeout multiplier is no longer Linux specific

Change-Id: I6858fe2f811ef13802b95e0470e310210a9dea8b
This commit is contained in:
Dunajski, Bartosz
2018-04-09 10:05:32 +02:00
committed by sys_ocldev
parent 10ada58bd6
commit 87f8f735f9
10 changed files with 63 additions and 53 deletions

View File

@@ -536,24 +536,6 @@ TEST_F(DrmCommandStreamTest, CheckDrmFreeCloseFailed) {
csr->flush(batchBuffer, EngineType::ENGINE_RCS, nullptr);
}
HWTEST_F(DrmCommandStreamTest, givenDrmCsrWhenAskedForTimeoutMultiplierThenReturnCorrectValueDependingOnRequest) {
struct MyDrmCsr : public DrmCommandStreamReceiver<FamilyType> {
using DrmCommandStreamReceiver<FamilyType>::computeTimeoutMultiplier;
using DrmCommandStreamReceiver<FamilyType>::tagAddress;
MyDrmCsr(const HardwareInfo &hwInfoIn) : DrmCommandStreamReceiver<FamilyType>(hwInfoIn, nullptr) {
tagAddress = &hwTag;
};
uint32_t hwTag = 2;
} myDrmCsr(**platformDevices);
uint32_t taskCountToWait = 5;
EXPECT_EQ(taskCountToWait - myDrmCsr.hwTag, myDrmCsr.computeTimeoutMultiplier(false, taskCountToWait));
EXPECT_EQ(1u, myDrmCsr.computeTimeoutMultiplier(true, taskCountToWait));
EXPECT_EQ(1u, myDrmCsr.computeTimeoutMultiplier(true, 1));
}
struct DrmCsrVfeTests : ::testing::Test {
template <typename FamilyType>
struct MyCsr : public DrmCommandStreamReceiver<FamilyType> {