|
@@ -35,13 +35,21 @@ static void chv_setup_private_ppat(struct drm_i915_private *dev_priv);
|
|
|
|
|
|
static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
|
|
static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
|
|
{
|
|
{
|
|
- if (enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
|
|
|
|
|
|
+ bool has_aliasing_ppgtt;
|
|
|
|
+ bool has_full_ppgtt;
|
|
|
|
+
|
|
|
|
+ has_aliasing_ppgtt = INTEL_INFO(dev)->gen >= 6;
|
|
|
|
+ has_full_ppgtt = INTEL_INFO(dev)->gen >= 7;
|
|
|
|
+ if (IS_GEN8(dev))
|
|
|
|
+ has_full_ppgtt = false; /* XXX why? */
|
|
|
|
+
|
|
|
|
+ if (enable_ppgtt == 0 || !has_aliasing_ppgtt)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
if (enable_ppgtt == 1)
|
|
if (enable_ppgtt == 1)
|
|
return 1;
|
|
return 1;
|
|
|
|
|
|
- if (enable_ppgtt == 2 && HAS_PPGTT(dev))
|
|
|
|
|
|
+ if (enable_ppgtt == 2 && has_full_ppgtt)
|
|
return 2;
|
|
return 2;
|
|
|
|
|
|
#ifdef CONFIG_INTEL_IOMMU
|
|
#ifdef CONFIG_INTEL_IOMMU
|
|
@@ -59,7 +67,7 @@ static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
- return HAS_PPGTT(dev) ? 2 : HAS_ALIASING_PPGTT(dev) ? 1 : 0;
|
|
|
|
|
|
+ return has_full_ppgtt ? 2 : has_aliasing_ppgtt ? 1 : 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|