All of lore.kernel.org
 help / color / mirror / Atom feed
* ignore cached memory flag in i965_write_entry()?
@ 2010-12-14  3:03 Zhenyu Wang
  2010-12-14  5:02 ` Zhenyu Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Zhenyu Wang @ 2010-12-14  3:03 UTC (permalink / raw)
  To: daniel.vetter, intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 289 bytes --]


Looks from a6963596a13e62f8e65b1cf3403a330ff2db407c, setting
GTT entry on i965-ish totally ignored cached memory flag?
That might break r/w consistent for pages like hw status.

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: ignore cached memory flag in i965_write_entry()?
  2010-12-14  3:03 ignore cached memory flag in i965_write_entry()? Zhenyu Wang
@ 2010-12-14  5:02 ` Zhenyu Wang
  2010-12-14  9:26   ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Zhenyu Wang @ 2010-12-14  5:02 UTC (permalink / raw)
  To: daniel.vetter, intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 1625 bytes --]

On 2010.12.14 11:03:53 +0800, Zhenyu Wang wrote:
> 
> Looks from a6963596a13e62f8e65b1cf3403a330ff2db407c, setting
> GTT entry on i965-ish totally ignored cached memory flag?
> That might break r/w consistent for pages like hw status.
> 

This should recover that.

From ca8cca3ffe03353c4bacdb30d77ff9c10ff0e4e0 Mon Sep 17 00:00:00 2001
From: Zhenyu Wang <zhenyuw@linux.intel.com>
Date: Tue, 14 Dec 2010 11:17:32 +0800
Subject: [PATCH] agp/intel: Fix missed cached memory flags setting in GTT entry write

This fixes regression from a6963596a13e62f8e65b1cf3403a330ff2db407c,
that missed to set cached memory type in GTT entry.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
 drivers/char/agp/intel-gtt.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 326ca2e..c7fe85d 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1138,9 +1138,15 @@ static void i9xx_chipset_flush(void)
 static void i965_write_entry(dma_addr_t addr, unsigned int entry,
 			     unsigned int flags)
 {
+	int pte_flags = I810_PTE_VALID;
+
 	/* Shift high bits down */
 	addr |= (addr >> 28) & 0xf0;
-	writel(addr | I810_PTE_VALID, intel_private.gtt + entry);
+
+	if (flags == AGP_USER_CACHED_MEMORY)
+		pte_flags |= I830_PTE_SYSTEM_CACHED;
+
+	writel(addr | pte_flags, intel_private.gtt + entry);
 }
 
 static bool gen6_check_flags(unsigned int flags)
-- 
1.7.1

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: ignore cached memory flag in i965_write_entry()?
  2010-12-14  5:02 ` Zhenyu Wang
@ 2010-12-14  9:26   ` Chris Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2010-12-14  9:26 UTC (permalink / raw)
  To: Zhenyu Wang, daniel.vetter, intel-gfx

On Tue, 14 Dec 2010 13:02:50 +0800, Zhenyu Wang <zhenyuw@linux.intel.com> wrote:
> On 2010.12.14 11:03:53 +0800, Zhenyu Wang wrote:
> > 
> > Looks from a6963596a13e62f8e65b1cf3403a330ff2db407c, setting
> > GTT entry on i965-ish totally ignored cached memory flag?
> > That might break r/w consistent for pages like hw status.
> > 
> 
> This should recover that.

Nice catch. My fault, I should have spotted that when I applied the patch.
Thanks!
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

end of thread, other threads:[~2010-12-14  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14  3:03 ignore cached memory flag in i965_write_entry()? Zhenyu Wang
2010-12-14  5:02 ` Zhenyu Wang
2010-12-14  9:26   ` 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.