From patchwork Wed Jul 31 16:51:53 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: 2836482 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 302DB9F4D4 for ; Wed, 31 Jul 2013 16:52:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3FB542041A for ; Wed, 31 Jul 2013 16:52:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 23D1120418 for ; Wed, 31 Jul 2013 16:52:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0EAC4E7474 for ; Wed, 31 Jul 2013 09:52:17 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ea0-f176.google.com (mail-ea0-f176.google.com [209.85.215.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 12326E5EEB for ; Wed, 31 Jul 2013 09:51:59 -0700 (PDT) Received: by mail-ea0-f176.google.com with SMTP id q16so474071ead.7 for ; Wed, 31 Jul 2013 09:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=aoiiPMcgquPXFPi7k75MO85ziNQ6NIvpYzXTE0CVqpw=; b=A8OdHUkRhfBCDFKhrggqG5vxPosI/hG2bj9S4HHcn74TRGprbGTd5pYNjP+GEUqtU5 pGc5M3OJmK6ylfPkZKuCcJPQjGV5ps5uZDqIXflyreS8YKd1U1LuXqXC/rrR3JrkpWlq MubD0UsRGT9PDYarAT0OKdzRtu+QztMnFS0DZAC1MDLfczpWBPn8bmWj8JIjJE22PH91 gowSt5rc+YRmnQTm6HvrRDuYeEWnUHpDgI9tXRf3q2O6PEyDi5OFNVN3FienYJvgAlHk lAa7wCu8mUnNG90RCDblXumcWaizVUyvEW63LZagabmLJ1HgMTCX9TQTZhD+MEq840G2 8T7w== X-Received: by 10.15.32.194 with SMTP id a42mr70445368eev.43.1375289519073; Wed, 31 Jul 2013 09:51:59 -0700 (PDT) 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 n42sm3840763eeh.15.2013.07.31.09.51.57 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 31 Jul 2013 09:51:58 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: dri-devel@lists.freedesktop.org, Dave Airlie Subject: [PATCH] drm/radeon: initialize AFMT blocks on DCE6 Date: Wed, 31 Jul 2013 18:51:53 +0200 Message-Id: <1375289513-3328-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 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+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-5.6 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 So far it was tested on HD7750 (DCE6) only. For DCE61 and DCE64 I assumed that amount of AFMTs equals amount of display controllers. Signed-off-by: Rafa? Mi?ecki --- This patch depends on [PATCH] drm/radeon: use loop for initializing AFMT blocks --- drivers/gpu/drm/radeon/radeon_display.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 31d9fbe..885fce1 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -1267,9 +1267,19 @@ static void radeon_afmt_init(struct radeon_device *rdev) }; int num_afmt; - /* DCE4/5 has 6 audio blocks tied to DIG encoders */ - /* DCE4.1 has 2 audio blocks tied to DIG encoders */ - if (ASIC_IS_DCE5(rdev)) + /* + * DCE64 and DCE61 are just guesses + * DCE6 was verified to have 6th AFMT using HD7750 + * DCE4/5 has 6 audio blocks tied to DIG encoders + * DCE4.1 has 2 audio blocks tied to DIG encoders + */ + if (ASIC_IS_DCE64(rdev)) + num_afmt = 2; + else if (ASIC_IS_DCE61(rdev)) + num_afmt = 4; + else if (ASIC_IS_DCE6(rdev)) + num_afmt = 6; + else if (ASIC_IS_DCE5(rdev)) num_afmt = 6; else if (ASIC_IS_DCE41(rdev)) num_afmt = 2;