Add enum value for drm query topology info

Related-To: NEO-6999
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-07-26 12:11:50 +00:00
committed by Compute-Runtime-Automation
parent 58b1fbb2d1
commit 17d2d6087a
5 changed files with 7 additions and 1 deletions

View File

@ -1108,7 +1108,8 @@ bool Drm::queryTopology(const HardwareInfo &hwInfo, QueryTopologyData &topologyD
// fallback to DRM_I915_QUERY_TOPOLOGY_INFO
auto dataQuery = this->query(DRM_I915_QUERY_TOPOLOGY_INFO, 0);
request = ioctlHelper->getDrmParamValue(DrmParam::QueryTopologyInfo);
auto dataQuery = this->query(request, 0);
if (dataQuery.empty()) {
return false;
}

View File

@ -255,6 +255,7 @@ enum class DrmParam {
QueryHwconfigTable,
QueryComputeSlices,
QueryMemoryRegions,
QueryTopologyInfo,
TilingNone,
TilingY,
};

View File

@ -239,6 +239,8 @@ int IoctlHelper::getDrmParamValueBase(DrmParam drmParam) const {
return DRM_I915_QUERY_ENGINE_INFO;
case DrmParam::QueryMemoryRegions:
return DRM_I915_QUERY_MEMORY_REGIONS;
case DrmParam::QueryTopologyInfo:
return DRM_I915_QUERY_TOPOLOGY_INFO;
case DrmParam::TilingNone:
return I915_TILING_NONE;
case DrmParam::TilingY:

View File

@ -143,6 +143,7 @@ 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::QueryTopologyInfo), static_cast<int>(DRM_I915_QUERY_TOPOLOGY_INFO));
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::TilingNone), static_cast<int>(I915_TILING_NONE));
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::TilingY), static_cast<int>(I915_TILING_Y));
}

View File

@ -124,6 +124,7 @@ TEST(IoctlHelperUpstreamTest, whenGettingDrmParamValueThenPropertValueIsReturned
EXPECT_EQ(ioctlHelper.getDrmParamValue(DrmParam::QueryEngineInfo), static_cast<int>(DRM_I915_QUERY_ENGINE_INFO));
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::QueryTopologyInfo), static_cast<int>(DRM_I915_QUERY_TOPOLOGY_INFO));
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));