drm/i915/uapi: Add DRM_I915_QUERY_GEOMETRY_SUBSLICES
Newer platforms have DSS that aren't necessarily available for both geometry and compute, two queries will need to exist. This introduces the first, when passing a valid engine class and engine instance in the flags returns a topology describing geometry. Based on past discussion, we currently only support this new query item on Xe_HP and beyond; earlier platforms do not need to worry about geometry and compute pipelines having access to different topology and should continue to use the existing topology query. v2: fix white space errors v3: change flags from hosting 2 8 bit numbers to holding a i915_engine_class_instance struct v4: add error if non rcs engine passed. v5 (by MattR): - Improve kerneldoc and cross references to related structs/enums. (Daniel) - Clarify that geometry query is only supported on render engines (Francisco) - Clarify that the new query is only supported on Xe_HP+. - Fix checkpatch warnings. Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Francisco Jerez <currojerez@riseup.net> UMD (mesa): https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14143 Testcase: igt@i915_query@test-query-geometry-subslices Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Link: https://patchwork.freedesktop.org/patch/msgid/20220414192230.749771-4-matthew.d.roper@intel.com
This commit is contained in:
@@ -172,7 +172,9 @@ enum drm_i915_gem_engine_class {
|
||||
I915_ENGINE_CLASS_INVALID = -1
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* struct i915_engine_class_instance - Engine class/instance identifier
|
||||
*
|
||||
* There may be more than one engine fulfilling any role within the system.
|
||||
* Each engine of a class is given a unique instance number and therefore
|
||||
* any engine can be specified by its class:instance tuplet. APIs that allow
|
||||
@@ -180,10 +182,21 @@ enum drm_i915_gem_engine_class {
|
||||
* for this identification.
|
||||
*/
|
||||
struct i915_engine_class_instance {
|
||||
__u16 engine_class; /* see enum drm_i915_gem_engine_class */
|
||||
__u16 engine_instance;
|
||||
/**
|
||||
* @engine_class:
|
||||
*
|
||||
* Engine class from enum drm_i915_gem_engine_class
|
||||
*/
|
||||
__u16 engine_class;
|
||||
#define I915_ENGINE_CLASS_INVALID_NONE -1
|
||||
#define I915_ENGINE_CLASS_INVALID_VIRTUAL -2
|
||||
|
||||
/**
|
||||
* @engine_instance:
|
||||
*
|
||||
* Engine instance.
|
||||
*/
|
||||
__u16 engine_instance;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2735,6 +2748,7 @@ struct drm_i915_query_item {
|
||||
* - %DRM_I915_QUERY_PERF_CONFIG (see struct drm_i915_query_perf_config)
|
||||
* - %DRM_I915_QUERY_MEMORY_REGIONS (see struct drm_i915_query_memory_regions)
|
||||
* - %DRM_I915_QUERY_HWCONFIG_BLOB (see `GuC HWCONFIG blob uAPI`)
|
||||
* - %DRM_I915_QUERY_GEOMETRY_SUBSLICES (see struct drm_i915_query_topology_info)
|
||||
*/
|
||||
__u64 query_id;
|
||||
#define DRM_I915_QUERY_TOPOLOGY_INFO 1
|
||||
@@ -2742,6 +2756,7 @@ struct drm_i915_query_item {
|
||||
#define DRM_I915_QUERY_PERF_CONFIG 3
|
||||
#define DRM_I915_QUERY_MEMORY_REGIONS 4
|
||||
#define DRM_I915_QUERY_HWCONFIG_BLOB 5
|
||||
#define DRM_I915_QUERY_GEOMETRY_SUBSLICES 6
|
||||
/* Must be kept compact -- no holes and well documented */
|
||||
|
||||
/**
|
||||
@@ -2765,6 +2780,9 @@ struct drm_i915_query_item {
|
||||
* - %DRM_I915_QUERY_PERF_CONFIG_LIST
|
||||
* - %DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID
|
||||
* - %DRM_I915_QUERY_PERF_CONFIG_FOR_UUID
|
||||
*
|
||||
* When &query_id == %DRM_I915_QUERY_GEOMETRY_SUBSLICES must contain
|
||||
* a struct i915_engine_class_instance that references a render engine.
|
||||
*/
|
||||
__u32 flags;
|
||||
#define DRM_I915_QUERY_PERF_CONFIG_LIST 1
|
||||
@@ -3051,7 +3069,8 @@ struct drm_i915_query_engine_info {
|
||||
/**
|
||||
* struct drm_i915_query_perf_config
|
||||
*
|
||||
* Data written by the kernel with query %DRM_I915_QUERY_PERF_CONFIG.
|
||||
* Data written by the kernel with query %DRM_I915_QUERY_PERF_CONFIG and
|
||||
* %DRM_I915_QUERY_GEOMETRY_SUBSLICES.
|
||||
*/
|
||||
struct drm_i915_query_perf_config {
|
||||
union {
|
||||
|
||||
Reference in New Issue
Block a user