@@ -129,6 +129,19 @@ i915_l3_read(struct file *filp, struct kobject *kobj,
if (ret)
return ret;
+ if (IS_HASWELL(drm_dev)) {
+ int last = min_t(int, GEN7_L3LOG_SIZE, count + offset);
+ if ((!dev_priv->l3_parity.remap_info))
+ memset(buf + offset, 0, last - offset);
+ else
+ memcpy(buf + offset,
+ dev_priv->l3_parity.remap_info + (offset/4),
+ last - offset);
+
+ i = last;
+ goto out;
+ }
+
misccpctl = I915_READ(GEN7_MISCCPCTL);
I915_WRITE(GEN7_MISCCPCTL, misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE);
@@ -137,6 +150,7 @@ i915_l3_read(struct file *filp, struct kobject *kobj,
I915_WRITE(GEN7_MISCCPCTL, misccpctl);
+out:
mutex_unlock(&drm_dev->struct_mutex);
return i - offset;