summaryrefslogtreecommitdiff
path: root/lib/i915/i915_drm_local.h
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2021-10-05 09:47:44 -0700
committerAshutosh Dixit <ashutosh.dixit@intel.com>2021-11-11 08:43:02 -0800
commit5f856084c0f8b2edbfd01e115ab341da7a1b27a6 (patch)
tree60b7c85b77e6755793ebdff4722c4540b0d072f2 /lib/i915/i915_drm_local.h
parent7201d343fced07a1951feea119480d55bce787e4 (diff)
i915/gem_exec_schedule: Make gem_exec_schedule understand static priority mapping
The i915 currently has 2k visible priority levels which are currently unique. This is changing to statically map these 2k levels into 3 buckets: low: < 0 mid: 0 high: > 0 Update gem_exec_schedule to understand this. This entails updating promotion test to use 3 levels that will map into different buckets and also add bit of delay after releasing a cork beforing completing the spinners to give time to the i915 schedule to process the fence and release and queue the requests. Also skip any tests that rely on having more than 3 priority levels. v2: Add a delay between starting releasing spinner and cork in promotion, add local define for static mapping engine info v3: (Daniele) - Update commit message explaining why delay is needed, unconditionally add delay v4: (Tvrtko) - Reduce sleep period (Daniele) - Add comment in code by sleep Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Diffstat (limited to 'lib/i915/i915_drm_local.h')
-rw-r--r--lib/i915/i915_drm_local.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/i915/i915_drm_local.h b/lib/i915/i915_drm_local.h
index 74b85c85..b1f6f013 100644
--- a/lib/i915/i915_drm_local.h
+++ b/lib/i915/i915_drm_local.h
@@ -34,6 +34,16 @@ struct drm_i915_gem_create_ext_protected_content {
__u32 flags;
};
+/*
+ * Indicates the 2k user priority levels are statically mapped into 3 buckets as
+ * follows:
+ *
+ * -1k to -1 Low priority
+ * 0 Normal priority
+ * 1 to 1k Highest priority
+ */
+#define I915_SCHEDULER_CAP_STATIC_PRIORITY_MAP (1ul << 5)
+
#if defined(__cplusplus)
}
#endif