All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] intel/gtt: unmap pages after rewriting GTT table.
@ 2011-01-11  1:17 Dave Airlie
  2011-01-11 13:28 ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Airlie @ 2011-01-11  1:17 UTC (permalink / raw)
  To: intel-gfx

This fixes a regression caused by the GTT rework that
450f2b3d51025a1749b694ee13f0e4e23ed58750 is part off.

On my ILK laptop with DMAR enabled I was seeing the occasional
DMAR warning.

The ordering in the previous code was to rewrite the GTT table
before unampping the pages and that makes sense to me.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/char/agp/intel-gtt.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 29ac6d4..bc8f759 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1058,15 +1058,14 @@ static int intel_fake_agp_remove_entries(struct agp_memory *mem,
 		return -EINVAL;
 	}
 
-	if (USE_PCI_DMA_API && INTEL_GTT_GEN > 2)
-		intel_agp_unmap_memory(mem);
-
 	for (i = pg_start; i < (mem->page_count + pg_start); i++) {
 		intel_private.driver->write_entry(intel_private.scratch_page_dma,
 						  i, 0);
 	}
 	readl(intel_private.gtt+i-1);
 
+	if (USE_PCI_DMA_API && INTEL_GTT_GEN > 2)
+		intel_agp_unmap_memory(mem);
 	return 0;
 }
 
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-11 23:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-11  1:17 [PATCH] intel/gtt: unmap pages after rewriting GTT table Dave Airlie
2011-01-11 13:28 ` Chris Wilson
2011-01-11 20:11   ` Dave Airlie
2011-01-11 23:12     ` [git pull] outstanding fixes for i915 from d-i-n Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.