All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] intel/gtt: unmap pages after rewriting GTT table.
Date: Tue, 11 Jan 2011 11:17:16 +1000	[thread overview]
Message-ID: <1294708636-18201-1-git-send-email-airlied@gmail.com> (raw)

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

             reply	other threads:[~2011-01-11  1:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11  1:17 Dave Airlie [this message]
2011-01-11 13:28 ` [PATCH] intel/gtt: unmap pages after rewriting GTT table 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294708636-18201-1-git-send-email-airlied@gmail.com \
    --to=airlied@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.