From: Zhenyu Wang Subject: Re: ignore cached memory flag in i965_write_entry()? Date: Tue, 14 Dec 2010 13:02:50 +0800 Message-ID: <20101214050250.GB27927@zhen-devel.sh.intel.com> References: <20101214030353.GA27806@zhen-devel.sh.intel.com> Reply-To: Zhenyu Wang Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1870763252==" Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id D2A849E738 for ; Mon, 13 Dec 2010 21:02:51 -0800 (PST) In-Reply-To: <20101214030353.GA27806@zhen-devel.sh.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: daniel.vetter@ffwll.ch, intel-gfx List-Id: intel-gfx@lists.freedesktop.org --===============1870763252== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XOIedfhf+7KOe/yw" Content-Disposition: inline --XOIedfhf+7KOe/yw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010.12.14 11:03:53 +0800, Zhenyu Wang wrote: >=20 > 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. >=20 This should recover that. =46rom ca8cca3ffe03353c4bacdb30d77ff9c10ff0e4e0 Mon Sep 17 00:00:00 2001 =46rom: Zhenyu Wang Date: Tue, 14 Dec 2010 11:17:32 +0800 Subject: [PATCH] agp/intel: Fix missed cached memory flags setting in GTT e= ntry write This fixes regression from a6963596a13e62f8e65b1cf3403a330ff2db407c, that missed to set cached memory type in GTT entry. Signed-off-by: Zhenyu Wang --- 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 =3D I810_PTE_VALID; + /* Shift high bits down */ addr |=3D (addr >> 28) & 0xf0; - writel(addr | I810_PTE_VALID, intel_private.gtt + entry); + + if (flags =3D=3D AGP_USER_CACHED_MEMORY) + pte_flags |=3D I830_PTE_SYSTEM_CACHED; + + writel(addr | pte_flags, intel_private.gtt + entry); } =20 static bool gen6_check_flags(unsigned int flags) --=20 1.7.1 --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --XOIedfhf+7KOe/yw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk0G+nkACgkQsQQaM014GCe70wCgj8ntGXa9HW+L6UHPuYzZ+YNi +rYAnR/UN0p1mEvGHC2Cs40F8uaqoQ4O =GXCb -----END PGP SIGNATURE----- --XOIedfhf+7KOe/yw-- --===============1870763252== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1870763252==--