@@ -143,6 +143,26 @@ static int i915_getparam(struct drm_device *dev, void *data,
case I915_PARAM_HAS_COHERENT_PHYS_GTT:
value = 1;
break;
+ case I915_PARAM_SLICE_TOTAL:
+ value = INTEL_INFO(dev)->slice_total;
+ if (!value)
+ return -ENODEV;
+ break;
+ case I915_PARAM_SUBSLICE_TOTAL:
+ value = INTEL_INFO(dev)->subslice_total;
+ if (!value)
+ return -ENODEV;
+ break;
+ case I915_PARAM_EU_TOTAL:
+ value = INTEL_INFO(dev)->eu_total;
+ if (!value)
+ return -ENODEV;
+ break;
+ case I915_PARAM_THREADS_PER_EU:
+ value = INTEL_INFO(dev)->threads_per_eu;
+ if (!value)
+ return -ENODEV;
+ break;
default:
DRM_DEBUG("Unknown parameter %d\n", param->param);
return -EINVAL;
@@ -653,6 +653,11 @@ struct intel_device_info {
int trans_offsets[I915_MAX_TRANSCODERS];
int palette_offsets[I915_MAX_PIPES];
int cursor_offsets[I915_MAX_PIPES];
+
+ unsigned int slice_total;
+ unsigned int subslice_total;
+ unsigned int eu_total;
+ unsigned int threads_per_eu;
};
#undef DEFINE_FLAG
@@ -341,6 +341,10 @@ typedef struct drm_i915_irq_wait {
#define I915_PARAM_HAS_WT 27
#define I915_PARAM_CMD_PARSER_VERSION 28
#define I915_PARAM_HAS_COHERENT_PHYS_GTT 29
+#define I915_PARAM_SLICE_TOTAL 30
+#define I915_PARAM_SUBSLICE_TOTAL 31
+#define I915_PARAM_EU_TOTAL 32
+#define I915_PARAM_THREADS_PER_EU 33
typedef struct drm_i915_getparam {
int param;