From patchwork Fri Aug 19 15:24:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Michel_D=C3=A4nzer?= X-Patchwork-Id: 1080982 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7JFePH7009236 for ; Fri, 19 Aug 2011 15:40:45 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DE31A0C57 for ; Fri, 19 Aug 2011 08:40:25 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 19 Aug 2011 15:40:45 +0000 (UTC) X-Greylist: delayed 905 seconds by postgrey-1.31 at gabe; Fri, 19 Aug 2011 08:39:33 PDT Received: from TX2EHSOBE001.bigfish.com (tx2ehsobe001.messaging.microsoft.com [65.55.88.11]) by gabe.freedesktop.org (Postfix) with ESMTP id 9CD7C9E815 for ; Fri, 19 Aug 2011 08:39:33 -0700 (PDT) Received: from mail66-tx2-R.bigfish.com (10.9.14.252) by TX2EHSOBE001.bigfish.com (10.9.40.21) with Microsoft SMTP Server id 14.1.225.22; Fri, 19 Aug 2011 15:24:27 +0000 Received: from mail66-tx2 (localhost.localdomain [127.0.0.1]) by mail66-tx2-R.bigfish.com (Postfix) with ESMTP id 766631800445 for ; Fri, 19 Aug 2011 15:24:27 +0000 (UTC) X-SpamScore: 1 X-BigFish: VPS1(zzc89bhzz1202hzz8275bhz32i668h839h93fh61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:163.181.249.109; KIP:(null); UIP:(null); IPVD:NLI; H:ausb3twp02.amd.com; RD:none; EFVD:NLI Received: from mail66-tx2 (localhost.localdomain [127.0.0.1]) by mail66-tx2 (MessageSwitch) id 1313767467354596_28596; Fri, 19 Aug 2011 15:24:27 +0000 (UTC) Received: from TX2EHSMHS026.bigfish.com (unknown [10.9.14.242]) by mail66-tx2.bigfish.com (Postfix) with ESMTP id 4884C1720053 for ; Fri, 19 Aug 2011 15:24:27 +0000 (UTC) Received: from ausb3twp02.amd.com (163.181.249.109) by TX2EHSMHS026.bigfish.com (10.9.99.126) with Microsoft SMTP Server id 14.1.225.22; Fri, 19 Aug 2011 15:24:26 +0000 X-WSS-ID: 0LQ6LGN-02-NJ2-02 X-M-MSG: Received: from sausexedgep01.amd.com (sausexedgep01-ext.amd.com [163.181.249.72]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Axway MailGate 3.8.1) with ESMTP id 226A4C82B2 for ; Fri, 19 Aug 2011 10:24:22 -0500 (CDT) Received: from SAUSEXDAG02.amd.com (163.181.55.2) by sausexedgep01.amd.com (163.181.36.54) with Microsoft SMTP Server (TLS) id 8.3.106.1; Fri, 19 Aug 2011 10:24:54 -0500 Received: from storexhtp01.amd.com (172.24.4.3) by sausexdag02.amd.com (163.181.55.2) with Microsoft SMTP Server (TLS) id 14.1.289.1; Fri, 19 Aug 2011 10:24:24 -0500 Received: from probook.local (10.224.154.229) by storexhtp01.amd.com (172.24.4.3) with Microsoft SMTP Server id 8.3.83.0; Fri, 19 Aug 2011 11:24:23 -0400 Received: from daenzer by probook.local with local (Exim 4.76) (envelope-from ) id 1QuQvj-00022K-MA for dri-devel@lists.freedesktop.org; Fri, 19 Aug 2011 17:24:19 +0200 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= To: Subject: [PATCH] drm/radeon: Take IH ring into account for test size calculation. Date: Fri, 19 Aug 2011 17:24:16 +0200 Message-ID: <1313767459-7796-1-git-send-email-michel@daenzer.net> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-MIME-Autoconverted: from base64 to 8bit by demeter2.kernel.org id p7JFePH7009236 From: Michel Dänzer Signed-off-by: Michel Dänzer --- drivers/gpu/drm/radeon/radeon_test.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c index dee4a0c..1ebd0fe 100644 --- a/drivers/gpu/drm/radeon/radeon_test.c +++ b/drivers/gpu/drm/radeon/radeon_test.c @@ -40,10 +40,14 @@ void radeon_test_moves(struct radeon_device *rdev) size = 1024 * 1024; /* Number of tests = - * (Total GTT - IB pool - writeback page - ring buffer) / test size + * (Total GTT - IB pool - writeback page - ring buffers) / test size */ - n = ((u32)(rdev->mc.gtt_size - RADEON_IB_POOL_SIZE*64*1024 - RADEON_GPU_PAGE_SIZE - - rdev->cp.ring_size)) / size; + n = rdev->mc.gtt_size - RADEON_IB_POOL_SIZE*64*1024 - rdev->cp.ring_size; + if (rdev->wb.wb_obj) + n -= RADEON_GPU_PAGE_SIZE; + if (rdev->ih.ring_obj) + n -= rdev->ih.ring_size; + n /= size; gtt_obj = kzalloc(n * sizeof(*gtt_obj), GFP_KERNEL); if (!gtt_obj) {