|
@@ -2132,6 +2132,25 @@ static void i915_address_space_init(struct i915_address_space *vm,
|
|
list_add_tail(&vm->global_link, &dev_priv->vm_list);
|
|
list_add_tail(&vm->global_link, &dev_priv->vm_list);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void gtt_write_workarounds(struct drm_device *dev)
|
|
|
|
+{
|
|
|
|
+ struct drm_i915_private *dev_priv = dev->dev_private;
|
|
|
|
+
|
|
|
|
+ /* This function is for gtt related workarounds. This function is
|
|
|
|
+ * called on driver load and after a GPU reset, so you can place
|
|
|
|
+ * workarounds here even if they get overwritten by GPU reset.
|
|
|
|
+ */
|
|
|
|
+ /* WaIncreaseDefaultTLBEntries:chv,bdw,skl,bxt */
|
|
|
|
+ if (IS_BROADWELL(dev))
|
|
|
|
+ I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW);
|
|
|
|
+ else if (IS_CHERRYVIEW(dev))
|
|
|
|
+ I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_CHV);
|
|
|
|
+ else if (IS_SKYLAKE(dev))
|
|
|
|
+ I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_SKL);
|
|
|
|
+ else if (IS_BROXTON(dev))
|
|
|
|
+ I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_BXT);
|
|
|
|
+}
|
|
|
|
+
|
|
int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)
|
|
int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)
|
|
{
|
|
{
|
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
|
@@ -2148,6 +2167,8 @@ int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)
|
|
|
|
|
|
int i915_ppgtt_init_hw(struct drm_device *dev)
|
|
int i915_ppgtt_init_hw(struct drm_device *dev)
|
|
{
|
|
{
|
|
|
|
+ gtt_write_workarounds(dev);
|
|
|
|
+
|
|
/* In the case of execlists, PPGTT is enabled by the context descriptor
|
|
/* In the case of execlists, PPGTT is enabled by the context descriptor
|
|
* and the PDPs are contained within the context itself. We don't
|
|
* and the PDPs are contained within the context itself. We don't
|
|
* need to do anything here. */
|
|
* need to do anything here. */
|