|
@@ -208,10 +208,19 @@ static int assign_hw_id(struct drm_i915_private *dev_priv, unsigned *out)
|
|
|
int ret;
|
|
|
unsigned int max;
|
|
|
|
|
|
- if (INTEL_GEN(dev_priv) >= 11)
|
|
|
+ if (INTEL_GEN(dev_priv) >= 11) {
|
|
|
max = GEN11_MAX_CONTEXT_HW_ID;
|
|
|
- else
|
|
|
- max = MAX_CONTEXT_HW_ID;
|
|
|
+ } else {
|
|
|
+ /*
|
|
|
+ * When using GuC in proxy submission, GuC consumes the
|
|
|
+ * highest bit in the context id to indicate proxy submission.
|
|
|
+ */
|
|
|
+ if (USES_GUC_SUBMISSION(dev_priv))
|
|
|
+ max = MAX_GUC_CONTEXT_HW_ID;
|
|
|
+ else
|
|
|
+ max = MAX_CONTEXT_HW_ID;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
ret = ida_simple_get(&dev_priv->contexts.hw_ida,
|
|
|
0, max, GFP_KERNEL);
|