@@ -370,6 +370,18 @@ static int i915_getparam(struct drm_device *dev, void *data,
mutex_unlock(&dev_priv->drm.struct_mutex);
break;
}
+ case I915_PARAM_SUBSLICE_MASK: {
+ const const struct sseu_dev_info *sseu;
+ int ret = i915_mutex_lock_interruptible(&dev_priv->drm);
+ if (ret)
+ return ret;
+
+ sseu = i915_oa_get_sseu(dev_priv, NULL);
+ value = sseu->subslice_mask;
+
+ mutex_unlock(&dev_priv->drm.struct_mutex);
+ break;
+ }
default:
DRM_DEBUG("Unknown parameter %d\n", param->param);
return -EINVAL;
@@ -421,6 +421,11 @@ typedef struct drm_i915_irq_wait {
/* Query the mask of slices available for this system */
#define I915_PARAM_SLICE_MASK 46
+/* Assuming it's uniform for each slice, this queries the mask of subslices
+ * per-slice for this system.
+ */
+#define I915_PARAM_SUBSLICE_MASK 47
+
typedef struct drm_i915_getparam {
__s32 param;
/*