mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
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:

committed by
Compute-Runtime-Automation

parent
58b1fbb2d1
commit
17d2d6087a
@ -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;
|
||||
}
|
||||
|
@ -255,6 +255,7 @@ enum class DrmParam {
|
||||
QueryHwconfigTable,
|
||||
QueryComputeSlices,
|
||||
QueryMemoryRegions,
|
||||
QueryTopologyInfo,
|
||||
TilingNone,
|
||||
TilingY,
|
||||
};
|
||||
|
@ -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:
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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));
|
||||
|
Reference in New Issue
Block a user