From f95106fa456c088ec5464e6f85611adc52f834b8 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Fri, 25 Oct 2013 18:14:49 -0700 Subject: [PATCH] drm/i915: Disable PDEs also at suspend This patch for test only Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index c4c42e7..ecc6583 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -537,6 +537,11 @@ void i915_gem_suspend_gtt_mappings(struct drm_device *dev) dev_priv->gtt.base.start / PAGE_SIZE, dev_priv->gtt.base.total / PAGE_SIZE, false); + + dev_priv->gtt.base.clear_range(&dev_priv->gtt.base, + dev_priv->gtt.base.total / PAGE_SIZE, + GEN6_PPGTT_PD_ENTRIES, + false); } void i915_gem_restore_gtt_mappings(struct drm_device *dev) @@ -626,7 +631,7 @@ static void gen6_ggtt_clear_range(struct i915_address_space *vm, const int max_entries = gtt_total_entries(dev_priv->gtt) - first_entry; int i; - if (WARN(num_entries > max_entries, + if (WARN(num_entries > max_entries + GEN6_PPGTT_PD_ENTRIES, "First entry = %d; Num entries = %d (max=%d)\n", first_entry, num_entries, max_entries)) num_entries = max_entries; -- 1.8.4.1