mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Create enum values for I915 tiling mode
Related-To: NEO-6852, NEO-6999 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f46f409cc4
commit
70cef0cfe8
@@ -55,21 +55,24 @@ TEST_F(DrmBufferObjectTest, GivenDetectedGpuHangDuringEvictUnusedAllocationsWhen
|
||||
|
||||
TEST_F(DrmBufferObjectTest, WhenSettingTilingThenCallSucceeds) {
|
||||
mock->ioctl_expected.total = 1; //set_tiling
|
||||
auto ret = bo->setTiling(I915_TILING_X, 0);
|
||||
auto tilingY = mock->getIoctlHelper()->getDrmParamValue(DrmParam::TilingY);
|
||||
auto ret = bo->setTiling(tilingY, 0);
|
||||
EXPECT_TRUE(ret);
|
||||
}
|
||||
|
||||
TEST_F(DrmBufferObjectTest, WhenSettingSameTilingThenCallSucceeds) {
|
||||
mock->ioctl_expected.total = 0; //set_tiling
|
||||
bo->tileBy(I915_TILING_X);
|
||||
auto ret = bo->setTiling(I915_TILING_X, 0);
|
||||
auto tilingY = mock->getIoctlHelper()->getDrmParamValue(DrmParam::TilingY);
|
||||
bo->tilingMode = tilingY;
|
||||
auto ret = bo->setTiling(tilingY, 0);
|
||||
EXPECT_TRUE(ret);
|
||||
}
|
||||
|
||||
TEST_F(DrmBufferObjectTest, GivenInvalidTilingWhenSettingTilingThenCallFails) {
|
||||
mock->ioctl_expected.total = 1; //set_tiling
|
||||
auto tilingY = mock->getIoctlHelper()->getDrmParamValue(DrmParam::TilingY);
|
||||
mock->ioctl_res = -1;
|
||||
auto ret = bo->setTiling(I915_TILING_X, 0);
|
||||
auto ret = bo->setTiling(tilingY, 0);
|
||||
EXPECT_FALSE(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -1435,7 +1435,8 @@ TEST_F(DrmMemoryManagerTest, GivenMemoryManagerWhenAllocateGraphicsMemoryForImag
|
||||
|
||||
EXPECT_EQ(1u, this->mock->createParamsHandle);
|
||||
EXPECT_EQ(imgInfo.size, this->mock->createParamsSize);
|
||||
__u32 tilingMode = I915_TILING_Y;
|
||||
auto ioctlHelper = this->mock->getIoctlHelper();
|
||||
uint32_t tilingMode = ioctlHelper->getDrmParamValue(DrmParam::TilingY);
|
||||
EXPECT_EQ(tilingMode, this->mock->setTilingMode);
|
||||
EXPECT_EQ(imgInfo.rowPitch, this->mock->setTilingStride);
|
||||
EXPECT_EQ(1u, this->mock->setTilingHandle);
|
||||
|
||||
@@ -88,6 +88,8 @@ TEST_F(IoctlPrelimHelperTests, whenGettingDrmParamValueThenPropertValueIsReturne
|
||||
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::QueryHwconfigTable), static_cast<int>(PRELIM_DRM_I915_QUERY_HWCONFIG_TABLE));
|
||||
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::QueryMemoryRegions), static_cast<int>(DRM_I915_QUERY_MEMORY_REGIONS));
|
||||
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::QueryComputeSlices), static_cast<int>(PRELIM_DRM_I915_QUERY_COMPUTE_SLICES));
|
||||
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::TilingNone), static_cast<int>(I915_TILING_NONE));
|
||||
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::TilingY), static_cast<int>(I915_TILING_Y));
|
||||
}
|
||||
|
||||
TEST_F(IoctlPrelimHelperTests, givenPrelimsWhenTranslateToMemoryRegionsThenReturnSameData) {
|
||||
|
||||
@@ -77,6 +77,8 @@ TEST(IoctlHelperUpstreamTest, whenGettingDrmParamValueThenPropertValueIsReturned
|
||||
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::QueryHwconfigTable), static_cast<int>(DRM_I915_QUERY_HWCONFIG_TABLE));
|
||||
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::QueryMemoryRegions), static_cast<int>(DRM_I915_QUERY_MEMORY_REGIONS));
|
||||
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::QueryComputeSlices), 0);
|
||||
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::TilingNone), static_cast<int>(I915_TILING_NONE));
|
||||
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::TilingY), static_cast<int>(I915_TILING_Y));
|
||||
}
|
||||
|
||||
TEST(IoctlHelperUpstreamTest, whenCreatingVmControlRegionExtThenNullptrIsReturned) {
|
||||
|
||||
Reference in New Issue
Block a user