From patchwork Sat Apr 13 23:26:24 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: 2441461 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 4DA753FC71 for ; Sat, 13 Apr 2013 23:31:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26F5CE5F1D for ; Sat, 13 Apr 2013 16:31:42 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ea0-f172.google.com (mail-ea0-f172.google.com [209.85.215.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FA28E5EA3 for ; Sat, 13 Apr 2013 16:26:55 -0700 (PDT) Received: by mail-ea0-f172.google.com with SMTP id z7so1744188eaf.3 for ; Sat, 13 Apr 2013 16:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Ks+eYxVXtC88FY7v6I8HBO8tY+InGKaQ7fiRF1cUaNw=; b=UBkuy0CGgxVFZwx/spDrMZKXwioSGPU/xBtMKURjg7AkS0SlsikJlWm/mLpiirQuQ1 081RSzLaqhLCS5dFtch7ZSbdRq/fvLziY1QLnLRSY+ySKVJQ+62blpih8w8ecdMYlyKw IJMFTjJHIKLt3rV1mXm45N9CB2KnjzoVSZdoToFCF4iIFtDyeasqhsXcXA153ZLoa+1k 60PDZyR/d8rMyfS/64QAk9ABND6iA5r+QmwWtOV55VUpDX+tkuqJiDN7e9Yt+22ksbSb rTeUYvO8NqdlwI2WoIPqGSIBq0cDaP7itWj9XHM62B297r+BDZTLWvvUOrhZGw4+Uzof auKg== X-Received: by 10.14.89.69 with SMTP id b45mr44185543eef.10.1365895614618; Sat, 13 Apr 2013 16:26:54 -0700 (PDT) Received: from linux-samsung700g7a.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPS id r48sm14160016eeg.2.2013.04.13.16.26.52 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Apr 2013 16:26:53 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: dri-devel@lists.freedesktop.org, Dave Airlie Subject: [PATCH 6/6] drm/radeon/evergreen: write default channel numbers Date: Sun, 14 Apr 2013 01:26:24 +0200 Message-Id: <1365895584-20999-7-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1365895584-20999-1-git-send-email-zajec5@gmail.com> References: <1365895584-20999-1-git-send-email-zajec5@gmail.com> 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 Signed-off-by: Rafa? Mi?ecki --- drivers/gpu/drm/radeon/evergreen_hdmi.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index 24d13ac..ed46dad 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c @@ -150,6 +150,27 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode evergreen_hdmi_update_ACR(encoder, mode->clock); + WREG32(AFMT_60958_0 + offset, + AFMT_60958_CS_CHANNEL_NUMBER_L(1)); + + WREG32(AFMT_60958_1 + offset, + AFMT_60958_CS_CHANNEL_NUMBER_R(2)); + + WREG32(AFMT_60958_2 + offset, + AFMT_60958_CS_CHANNEL_NUMBER_2(3) | + AFMT_60958_CS_CHANNEL_NUMBER_3(4) | + AFMT_60958_CS_CHANNEL_NUMBER_4(5) | + AFMT_60958_CS_CHANNEL_NUMBER_5(6) | + AFMT_60958_CS_CHANNEL_NUMBER_6(7) | + AFMT_60958_CS_CHANNEL_NUMBER_7(8)); + + /* fglrx sets 0x0001005f | (x & 0x00fc0000) in 0x5f78 here */ + + WREG32(AFMT_AUDIO_PACKET_CONTROL2 + offset, + AFMT_AUDIO_CHANNEL_ENABLE(0xff)); + + /* fglrx sets 0x40 in 0x5f80 here */ + err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode); if (err < 0) { DRM_ERROR("failed to setup AVI infoframe: %zd\n", err);