From 44c1dcd0ed4822bde7fcdf6dcd0460e8dfb525d8 Mon Sep 17 00:00:00 2001 From: Sushma Venkatesh Reddy Date: Tue, 12 Aug 2025 01:13:47 +0000 Subject: [PATCH] intel/dev: Add geometry, color and depth pipes count Geometry, Color and Depth pipelines count are needed for collecting some metrics from perfetto. Reviewed-by: Francisco Jerez Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/dev/intel_device_info.py | 4 ++++ src/intel/dev/intel_hwconfig.c | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/intel/dev/intel_device_info.py b/src/intel/dev/intel_device_info.py index f704ec39bc5..1cf6eb617db 100644 --- a/src/intel/dev/intel_device_info.py +++ b/src/intel/dev/intel_device_info.py @@ -443,6 +443,10 @@ Struct("intel_device_info", Thread count * number of EUs per subslice""")), + Member("unsigned", "num_geom_pipes", comment="Number of geometry pipes"), + Member("unsigned", "num_depth_pipes", comment="Number of depth pipes"), + Member("unsigned", "num_color_pipes", comment="Number of color pipes"), + Member("unsigned", "max_cs_workgroup_threads", compiler_field=True, comment=dedent("""\ Maximum number of threads per workgroup supported by the GPGPU_WALKER or diff --git a/src/intel/dev/intel_hwconfig.c b/src/intel/dev/intel_hwconfig.c index b140f106b64..387fdd963a3 100644 --- a/src/intel/dev/intel_hwconfig.c +++ b/src/intel/dev/intel_hwconfig.c @@ -301,6 +301,12 @@ process_hwconfig_item(struct intel_device_info *devinfo, case INTEL_HWCONFIG_MAX_DS_URB_ENTRIES: DEVINFO_HWCONFIG(200, urb.max_entries[MESA_SHADER_TESS_EVAL], item); break; + case INTEL_HWCONFIG_NUM_PIXEL_PIPES: + DEVINFO_HWCONFIG_KV(200, num_color_pipes, item->key, item->val[0]); + break; + case INTEL_HWCONFIG_GEOMETRY_PIPES_PER_SLICE: + DEVINFO_HWCONFIG_KV(200, num_geom_pipes, item->key, item->val[0]); + break; default: break; /* ignore */ } @@ -320,6 +326,13 @@ late_apply_hwconfig(struct intel_device_info *devinfo) assert((devinfo->max_subslices_per_slice % devinfo->max_slices) == 0); devinfo->max_subslices_per_slice /= devinfo->max_slices; } + + /* Calculate total pipes count from stored values */ + if (devinfo->verx10 >= 200) { + devinfo->num_color_pipes *= devinfo->max_slices; + devinfo->num_depth_pipes = devinfo->num_color_pipes; + devinfo->num_geom_pipes *= devinfo->max_slices; + } } bool