From d8c2930da0e36b4d4e952003cbb63d67982cc5aa Mon Sep 17 00:00:00 2001 From: Sushma Venkatesh Reddy Date: Mon, 24 Jun 2024 16:56:39 -0700 Subject: [PATCH] drm-uapi: Sync i915_drm.h with a78313bb206e Sync i915_drm.h with a78313bb206e commit a78313bb206e0c456a989f380c4cbd8af8af7c76 Author: Dave Airlie Date: Thu Jun 27 17:21:43 2024 +1000 Merge tag 'drm-intel-gt-next-2024-06-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Fixes: a9f1151de27 ("intel/hang_replay: use hw image param") Signed-off-by: Sushma Venkatesh Reddy Reviewed-by: Jordan Justen Part-of: --- include/drm-uapi/i915_drm.h | 47 ++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h index f1d48a7ff66..8d72d6f941c 100644 --- a/include/drm-uapi/i915_drm.h +++ b/include/drm-uapi/i915_drm.h @@ -806,6 +806,12 @@ typedef struct drm_i915_irq_wait { */ #define I915_PARAM_PXP_STATUS 58 +/* + * Query if kernel allows marking a context to send a Freq hint to SLPC. This + * will enable use of the strategies allowed by the SLPC algorithm. + */ +#define I915_PARAM_HAS_CONTEXT_FREQ_HINT 59 + /* Must be kept compact -- no holes and well documented */ /** @@ -2148,18 +2154,29 @@ struct drm_i915_gem_context_param { * -EIO: The firmware did not succeed in creating the protected context. */ #define I915_CONTEXT_PARAM_PROTECTED_CONTENT 0xd -/* Must be kept compact -- no holes and well documented */ - /** @value: Context parameter value to be set or queried */ - __u64 value; -}; +/* + * I915_CONTEXT_PARAM_LOW_LATENCY: + * + * Mark this context as a low latency workload which requires aggressive GT + * frequency scaling. Use I915_PARAM_HAS_CONTEXT_FREQ_HINT to check if the kernel + * supports this per context flag. + */ +#define I915_CONTEXT_PARAM_LOW_LATENCY 0xe /* * I915_CONTEXT_PARAM_CONTEXT_IMAGE: * * Allows userspace to provide own context images. + * + * Note that this is a debug API not available on production kernel builds. */ -#define I915_CONTEXT_PARAM_CONTEXT_IMAGE 0xe +#define I915_CONTEXT_PARAM_CONTEXT_IMAGE 0xf +/* Must be kept compact -- no holes and well documented */ + + /** @value: Context parameter value to be set or queried */ + __u64 value; +}; /* * Context SSEU programming @@ -2648,19 +2665,29 @@ struct drm_i915_reg_read { * */ +/* + * struct drm_i915_reset_stats - Return global reset and other context stats + * + * Driver keeps few stats for each contexts and also global reset count. + * This struct can be used to query those stats. + */ struct drm_i915_reset_stats { + /** @ctx_id: ID of the requested context */ __u32 ctx_id; + + /** @flags: MBZ */ __u32 flags; - /* All resets since boot/module reload, for all contexts */ + /** @reset_count: All resets since boot/module reload, for all contexts */ __u32 reset_count; - /* Number of batches lost when active in GPU, for this context */ + /** @batch_active: Number of batches lost when active in GPU, for this context */ __u32 batch_active; - /* Number of batches lost pending for execution, for this context */ + /** @batch_pending: Number of batches lost pending for execution, for this context */ __u32 batch_pending; + /** @pad: MBZ */ __u32 pad; }; @@ -3597,9 +3624,13 @@ struct drm_i915_query_memory_regions { * struct drm_i915_query_guc_submission_version - query GuC submission interface version */ struct drm_i915_query_guc_submission_version { + /** @branch: Firmware branch version. */ __u32 branch; + /** @major: Firmware major version. */ __u32 major; + /** @minor: Firmware minor version. */ __u32 minor; + /** @patch: Firmware patch version. */ __u32 patch; };