From patchwork Fri Aug 19 15:24:17 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: 1080972 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 p7JFdgxZ008347 for ; Fri, 19 Aug 2011 15:40:04 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B30FA0C35 for ; Fri, 19 Aug 2011 08:39:42 -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:04 +0000 (UTC) X-Greylist: delayed 904 seconds by postgrey-1.31 at gabe; Fri, 19 Aug 2011 08:39:33 PDT Received: from AM1EHSOBE005.bigfish.com (am1ehsobe005.messaging.microsoft.com [213.199.154.208]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A1239E806 for ; Fri, 19 Aug 2011 08:39:33 -0700 (PDT) Received: from mail2-am1-R.bigfish.com (10.3.201.242) by AM1EHSOBE005.bigfish.com (10.3.204.25) with Microsoft SMTP Server id 14.1.225.22; Fri, 19 Aug 2011 15:24:28 +0000 Received: from mail2-am1 (localhost.localdomain [127.0.0.1]) by mail2-am1-R.bigfish.com (Postfix) with ESMTP id 8FDB21780487 for ; Fri, 19 Aug 2011 15:24:28 +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 mail2-am1 (localhost.localdomain [127.0.0.1]) by mail2-am1 (MessageSwitch) id 1313767468319654_7640; Fri, 19 Aug 2011 15:24:28 +0000 (UTC) Received: from AM1EHSMHS015.bigfish.com (unknown [10.3.201.254]) by mail2-am1.bigfish.com (Postfix) with ESMTP id 3F0F61630052 for ; Fri, 19 Aug 2011 15:24:28 +0000 (UTC) Received: from ausb3twp02.amd.com (163.181.249.109) by AM1EHSMHS015.bigfish.com (10.3.207.153) with Microsoft SMTP Server id 14.1.225.22; Fri, 19 Aug 2011 15:24:27 +0000 X-WSS-ID: 0LQ6LGN-02-NJ1-02 X-M-MSG: Received: from sausexedgep02.amd.com (sausexedgep02-ext.amd.com [163.181.249.73]) (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 2C610C82AB for ; Fri, 19 Aug 2011 10:24:22 -0500 (CDT) Received: from SAUSEXDAG02.amd.com (163.181.55.2) by sausexedgep02.amd.com (163.181.36.59) 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 1QuQvk-00022M-I5 for dri-devel@lists.freedesktop.org; Fri, 19 Aug 2011 17:24:20 +0200 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= To: Subject: [PATCH] drm/radeon: Explicitly print GTT/VRAM offsets on test failure. Date: Fri, 19 Aug 2011 17:24:17 +0200 Message-ID: <1313767459-7796-2-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 p7JFdgxZ008347 From: Michel Dänzer Otherwise these would need to be painstakingly calculated looking at the source code. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher --- NOTE: Only compile tested. drivers/gpu/drm/radeon/radeon_test.c | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c index 1ebd0fe..602fa35 100644 --- a/drivers/gpu/drm/radeon/radeon_test.c +++ b/drivers/gpu/drm/radeon/radeon_test.c @@ -136,9 +136,15 @@ void radeon_test_moves(struct radeon_device *rdev) gtt_start++, vram_start++) { if (*vram_start != gtt_start) { DRM_ERROR("Incorrect GTT->VRAM copy %d: Got 0x%p, " - "expected 0x%p (GTT map 0x%p-0x%p)\n", - i, *vram_start, gtt_start, gtt_map, - gtt_end); + "expected 0x%p (GTT/VRAM offset " + "0x%16llx/0x%16llx)\n", + i, *vram_start, gtt_start, + (unsigned long long) + (gtt_addr - rdev->mc.gtt_start + + (void*)gtt_start - gtt_map), + (unsigned long long) + (vram_addr - rdev->mc.vram_start + + (void*)gtt_start - gtt_map)); radeon_bo_kunmap(vram_obj); goto out_cleanup; } @@ -179,9 +185,15 @@ void radeon_test_moves(struct radeon_device *rdev) gtt_start++, vram_start++) { if (*gtt_start != vram_start) { DRM_ERROR("Incorrect VRAM->GTT copy %d: Got 0x%p, " - "expected 0x%p (VRAM map 0x%p-0x%p)\n", - i, *gtt_start, vram_start, vram_map, - vram_end); + "expected 0x%p (VRAM/GTT offset " + "0x%16llx/0x%16llx)\n", + i, *gtt_start, vram_start, + (unsigned long long) + (vram_addr - rdev->mc.vram_start + + (void*)vram_start - vram_map), + (unsigned long long) + (gtt_addr - rdev->mc.gtt_start + + (void*)vram_start - vram_map)); radeon_bo_kunmap(gtt_obj[i]); goto out_cleanup; }