Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306960
b: refs/heads/master
c: e2b665c
h: refs/heads/master
v: v3
  • Loading branch information
Adam Jackson authored and Daniel Vetter committed Mar 18, 2012
1 parent 92b5bf6 commit 85cdbd4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa37d39e4c6622d80bd8061d600701bcea1d6870
refs/heads/master: e2b665c48099d9c2229a187467761da4882eb066
29 changes: 17 additions & 12 deletions trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1914,6 +1914,22 @@ ips_ping_for_i915_load(void)
}
}

static void
i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base,
unsigned long size)
{
/* Set up a WC MTRR for non-PAT systems. This is more common than
* one would think, because the kernel disables PAT on first
* generation Core chips because WC PAT gets overridden by a UC
* MTRR if present. Even if a UC MTRR isn't present.
*/
dev_priv->mm.gtt_mtrr = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
if (dev_priv->mm.gtt_mtrr < 0) {
DRM_INFO("MTRR allocation failed. Graphics "
"performance may suffer.\n");
}
}

/**
* i915_driver_load - setup chip and create an initial config
* @dev: DRM device
Expand Down Expand Up @@ -1992,18 +2008,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
goto out_rmmap;
}

/* Set up a WC MTRR for non-PAT systems. This is more common than
* one would think, because the kernel disables PAT on first
* generation Core chips because WC PAT gets overridden by a UC
* MTRR if present. Even if a UC MTRR isn't present.
*/
dev_priv->mm.gtt_mtrr = mtrr_add(dev->agp->base,
agp_size,
MTRR_TYPE_WRCOMB, 1);
if (dev_priv->mm.gtt_mtrr < 0) {
DRM_INFO("MTRR allocation failed. Graphics "
"performance may suffer.\n");
}
i915_mtrr_setup(dev_priv, dev->agp->base, agp_size);

/* The i915 workqueue is primarily used for batched retirement of
* requests (and thus managing bo) once the task has been completed
Expand Down

0 comments on commit 85cdbd4

Please sign in to comment.