Do not use simplified Mocs Table on gen8 devices.

- On gen8 devices we are not using index to control caching, but we program
caches directly
- In such case we need to rely on values reported from GMM instead of using
Kernel Mocs indexes.

Change-Id: I6c030847509d8f39f63ac98ebd3ebd0b0907e625
This commit is contained in:
Mrozek, Michal
2018-04-10 13:59:50 +02:00
committed by sys_ocldev
parent 5d296f15e3
commit 86e000f67a
2 changed files with 16 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -203,8 +203,17 @@ TEST_F(DrmTests, failOnParamBoost) {
EXPECT_NE(ptr, nullptr);
}
TEST_F(DrmTests, givenKernelNotSupportingTurboPatchWhenDeviceIsCreatedThenGmmSwitchesToSimplifiedMocsSelection) {
TEST_F(DrmTests, givenKernelNotSupportingTurboPatchWhenDeviceLowerThenGen9IsCreatedThenSimplifiedMocsSelectionIsFalse) {
deviceId = IBDW_GT3_WRK_DEVICE_F0_ID;
failOnParamBoost = -1;
auto ptr = DrmWrap::createDrm(0);
EXPECT_NE(ptr, nullptr);
EXPECT_FALSE(Gmm::useSimplifiedMocsTable);
}
TEST_F(DrmTests, givenKernelNotSupportingTurboPatchWhenDeviceIsNewerThenGen9IsCreatedThenSimplifiedMocsSelectionIsTrue) {
Gmm::useSimplifiedMocsTable = false;
deviceId = IBXT_X_DEVICE_F0_ID;
failOnParamBoost = -1;
auto ptr = DrmWrap::createDrm(0);
EXPECT_NE(ptr, nullptr);