From patchwork Fri Feb 19 01:25:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bugzilla-daemon@freedesktop.org X-Patchwork-Id: 80514 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1J1QiX1017571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Feb 2010 01:27:21 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NiHcj-0003vR-5t; Fri, 19 Feb 2010 01:25:41 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NiHch-0003v6-Ga for dri-devel@lists.sourceforge.net; Fri, 19 Feb 2010 01:25:39 +0000 X-ACL-Warn: Received: from gabe.freedesktop.org ([131.252.210.177]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NiHcg-0008GO-Gm for dri-devel@lists.sourceforge.net; Fri, 19 Feb 2010 01:25:39 +0000 Received: from annarchy.freedesktop.org (annarchy.freedesktop.org [131.252.210.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 02062A024A for ; Thu, 18 Feb 2010 17:25:32 -0800 (PST) Received: by annarchy.freedesktop.org (Postfix, from userid 33) id D6CDE1300D9; Thu, 18 Feb 2010 17:25:32 -0800 (PST) From: bugzilla-daemon@freedesktop.org To: dri-devel@lists.sourceforge.net Subject: [Bug 26641] RV730 agp xf86-video-ati with kms poor performance X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: newchanged X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Mesa X-Bugzilla-Component: Drivers/DRI/R600 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lists@andyfurniss.entadsl.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: medium X-Bugzilla-Assigned-To: dri-devel@lists.sourceforge.net X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: MIME-Version: 1.0 Message-Id: <20100219012532.D6CDE1300D9@annarchy.freedesktop.org> Date: Thu, 18 Feb 2010 17:25:32 -0800 (PST) X-Spam-Score: -1.0 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.0 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [131.252.210.177 listed in list.dnswl.org] 0.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NiHcg-0008GO-Gm X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 19 Feb 2010 01:27:21 +0000 (UTC) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index e2123af..9c2b1cc 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -198,26 +198,17 @@ EXPORT_SYMBOL(ttm_tt_populate); static inline int ttm_tt_set_page_caching(struct page *p, enum ttm_caching_state c_state) { - int ret = 0; - if (PageHighMem(p)) return 0; - if (get_page_memtype(p) != -1) { - /* p isn't in the default caching state, set it to - * writeback first to free its current memtype. */ - - ret = set_pages_wb(p, 1); - if (ret) - return ret; + switch (c_state) { + case tt_cached: + return set_pages_wb(p, 1); + case tt_wc: + return set_memory_wc((unsigned long) page_address(p), 1); + default: + return set_pages_uc(p, 1); } - - if (c_state == tt_wc) - ret = set_memory_wc((unsigned long) page_address(p), 1); - else if (c_state == tt_uncached) - ret = set_pages_uc(p, 1); - - return ret; } #else /* CONFIG_X86 */ static inline int ttm_tt_set_page_caching(struct page *p,