From patchwork Tue Dec 14 05:02:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 408771 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBE53FnZ029525 for ; Tue, 14 Dec 2010 05:03:35 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F9EB9EB6C for ; Mon, 13 Dec 2010 21:03:15 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org 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) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 13 Dec 2010 21:02:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,340,1288594800"; d="asc'?scan'208";a="361300086" Received: from zhen-devel.sh.intel.com (HELO zhen-devel) ([10.239.36.75]) by azsmga001.ch.intel.com with ESMTP; 13 Dec 2010 21:02:50 -0800 Date: Tue, 14 Dec 2010 13:02:50 +0800 From: Zhenyu Wang To: daniel.vetter@ffwll.ch, intel-gfx Message-ID: <20101214050250.GB27927@zhen-devel.sh.intel.com> Mail-Followup-To: daniel.vetter@ffwll.ch, intel-gfx References: <20101214030353.GA27806@zhen-devel.sh.intel.com> MIME-Version: 1.0 In-Reply-To: <20101214030353.GA27806@zhen-devel.sh.intel.com> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Intel-gfx] ignore cached memory flag in i965_write_entry()? X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Zhenyu Wang List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 14 Dec 2010 05:03:35 +0000 (UTC) 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)