From patchwork Tue Nov 5 19:39:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 3143501 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A4A61BEEB2 for ; Tue, 5 Nov 2013 19:39:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 511C6205C6 for ; Tue, 5 Nov 2013 19:39:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 19B42205C1 for ; Tue, 5 Nov 2013 19:39:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F27AEE073; Tue, 5 Nov 2013 11:39:40 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f50.google.com (mail-bk0-f50.google.com [209.85.214.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B9A2EE073 for ; Tue, 5 Nov 2013 11:39:38 -0800 (PST) Received: by mail-bk0-f50.google.com with SMTP id v15so403846bkz.23 for ; Tue, 05 Nov 2013 11:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=gCps3KOjD+dDbx3AISz9S1FnKhydo1Z0+c/zL0yfIqE=; b=bdjLsiQXUlvWisalSXCiEKwYW1GCECwj5OcdZdOaxIVdh98uCjrRUzvFJavNDohRxG yaEKYVF9vqaGygDfsV1o9nuCUxWWff4y12mKN8OVqih8ZxxCQyX8/qw/2GuBwkwrj8o8 CuFb5cYVSawwX9mYJHiz0ckcD9IbnLiJ/zXZzg4Jzx7EdU7hr/NNvUxGfmhSIua0iQ0G ESy8OkpunBpDFF1MniFC+lpiK51nx1f58jKJEMkIbqFekJDSwyRNSYsUIOo9zUsWtQaL UwPTn1g/WTuSuhSPHGfM72lClVP9Qt+s3xdAmofF/j42sBHu6xrkJ2O7zjhLEDtqaOMy I3oA== X-Received: by 10.204.173.6 with SMTP id n6mr14482036bkz.5.1383680375911; Tue, 05 Nov 2013 11:39:35 -0800 (PST) Received: from linux-l420.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id t2sm20576566bkh.3.2013.11.05.11.39.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Nov 2013 11:39:35 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Dave Airlie Subject: [PATCH] avivotool: fix dumping HDMI blocks on DCE2, DCE3 and DCE3.2 Date: Tue, 5 Nov 2013 20:39:23 +0100 Message-Id: <1383680363-3247-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Rafa? Mi?ecki --- avivotool.c | 30 ++++++++++++++++++++++++------ radeon_reg.h | 8 +++++--- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/avivotool.c b/avivotool.c index 4c5c1ce..f5b3f72 100644 --- a/avivotool.c +++ b/avivotool.c @@ -1697,13 +1697,31 @@ void radeon_cmd_regs(const char *type) SHOW_REG(R600_AUDIO_PIN_WIDGET_CNTL); SHOW_REG(R600_AUDIO_STATUS_BITS); - printf("\nHDMI block at 0x%x:\n", R600_HDMI_BLOCK1); - for (i = R600_HDMI_BLOCK1; i < R600_HDMI_BLOCK1 + 0xf0; i += 4) - SHOW_UNKNOWN_REG(i); + if (IS_DISPLAY_DCE3(card_info)) { + printf("\nHDMI block at 0x%x:\n", DCE3_HDMI_BLOCK0); + for (i = DCE3_HDMI_BLOCK0; i <= DCE3_HDMI_BLOCK0 + 0xf0; i += 4) + SHOW_UNKNOWN_REG(i); + if (card_info && card_info->chip_family >= CHIP_FAMILY_RV730) { + for (i = DCE3_HDMI_BLOCK0 + 0x200; i <= DCE3_HDMI_BLOCK0 + 0x210; i += 4) + SHOW_UNKNOWN_REG(i); + } - printf("\nHDMI block at 0x%x:\n", R600_HDMI_BLOCK3); - for (i = R600_HDMI_BLOCK3; i < R600_HDMI_BLOCK3 + 0xf0; i += 4) - SHOW_UNKNOWN_REG(i); + printf("\nHDMI block at 0x%x:\n", DCE3_HDMI_BLOCK1); + for (i = DCE3_HDMI_BLOCK1; i <= DCE3_HDMI_BLOCK1 + 0xf0; i += 4) + SHOW_UNKNOWN_REG(i); + if (card_info && card_info->chip_family >= CHIP_FAMILY_RV730) { + for (i = DCE3_HDMI_BLOCK1 + 0x200; i <= DCE3_HDMI_BLOCK1 + 0x210; i += 4) + SHOW_UNKNOWN_REG(i); + } + } else { + printf("\nHDMI block at 0x%x:\n", DCE2_HDMI_BLOCK0); + for (i = DCE2_HDMI_BLOCK0; i <= DCE2_HDMI_BLOCK0 + 0xf0; i += 4) + SHOW_UNKNOWN_REG(i); + + printf("\nHDMI block at 0x%x:\n", DCE2_HDMI_BLOCK1); + for (i = DCE2_HDMI_BLOCK1; i <= DCE2_HDMI_BLOCK1 + 0xf0; i += 4) + SHOW_UNKNOWN_REG(i); + } } } diff --git a/radeon_reg.h b/radeon_reg.h index ea5b6bc..06136e3 100644 --- a/radeon_reg.h +++ b/radeon_reg.h @@ -3063,9 +3063,11 @@ #define R600_AUDIO_STATUS_BITS 0x73d8 /* HDMI base register addresses */ -#define R600_HDMI_BLOCK1 0x7400 -#define R600_HDMI_BLOCK2 0x7700 -#define R600_HDMI_BLOCK3 0x7800 +#define DCE2_HDMI_BLOCK0 0x7400 +#define DCE2_HDMI_BLOCK1 0x7700 +/* DCE3 second instance starts at 0x7800 */ +#define DCE3_HDMI_BLOCK0 0x7400 +#define DCE3_HDMI_BLOCK1 0x7800 #define RADEON_MC_ARB_CNTL 0x18c #define RADEON_PWRMAN_MISC 0x16