aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/intel-gtt.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2011-01-12 11:39:48 +1000
committerDave Airlie <airlied@gmail.com>2011-01-12 11:39:48 +1000
commitd15eda5c6edff4987af6f4423af0bab0c3251e74 (patch)
tree87400cdc5f74d1258b6456b88beaf6fc3dc5f97a /drivers/char/agp/intel-gtt.c
parenti915/gtt: fix ordering issues with status setup and DMAR (diff)
downloadlinux-dev-d15eda5c6edff4987af6f4423af0bab0c3251e74.tar.xz
linux-dev-d15eda5c6edff4987af6f4423af0bab0c3251e74.zip
i915/gtt: fix ordering causing DMAR errors on object teardown.
Previous to the last GTT rework we always rewrote the GTT then unmapped the object, somehow this got reversed in the rework in 2.6.37-rc5 timeframe. This fix needs to go to stable in an alternate form since the code changed. This fixes DMAR reports on my Ironlake HP2540p. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/char/agp/intel-gtt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index b7c0c7ee67c8..e921b693412b 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1000,14 +1000,14 @@ static int intel_fake_agp_remove_entries(struct agp_memory *mem,
if (mem->page_count == 0)
return 0;
+ intel_gtt_clear_range(pg_start, mem->page_count);
+
if (intel_private.base.needs_dmar) {
intel_gtt_unmap_memory(mem->sg_list, mem->num_sg);
mem->sg_list = NULL;
mem->num_sg = 0;
}
- intel_gtt_clear_range(pg_start, mem->page_count);
-
return 0;
}