Return true from 48BitAddressing when GTT size > max64BitAppAddress

Related-To: NEO-3133

Change-Id: I18711642a5f092be423fb921bc4940ef9b6312d4
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2019-04-25 13:13:28 +02:00
parent 188c0797b6
commit 582fc9cf10
2 changed files with 5 additions and 1 deletions

View File

@ -132,7 +132,7 @@ bool Drm::is48BitAddressRangeSupported() {
auto ret = ioctl(DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM, &contextParam);
if (ret == 0) {
return contextParam.value == MemoryConstants::max64BitAppAddress + 1;
return contextParam.value > MemoryConstants::max64BitAppAddress;
}
return true;
}

View File

@ -127,6 +127,10 @@ TEST(DrmTest, GivenDrmWhenAskedFor48BitAddressCorrectValueReturned) {
drm->StoredRetVal = 0;
drm->storedGTTSize = 1ull << 31;
EXPECT_FALSE(drm->is48BitAddressRangeSupported());
drm->storedGTTSize = MemoryConstants::max64BitAppAddress + 1;
EXPECT_TRUE(drm->is48BitAddressRangeSupported());
drm->storedGTTSize = MemoryConstants::max64BitAppAddress;
EXPECT_FALSE(drm->is48BitAddressRangeSupported());
}
TEST(DrmTest, GivenDrmWhenAskedForPreemptionCorrectValueReturned) {