From patchwork Sat Apr 13 23:26: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: 2441451 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 95E54DFB78 for ; Sat, 13 Apr 2013 23:30:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FD77E5D74 for ; Sat, 13 Apr 2013 16:30:56 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com [74.125.83.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B4B8E5DFC for ; Sat, 13 Apr 2013 16:26:52 -0700 (PDT) Received: by mail-ee0-f46.google.com with SMTP id d49so1702302eek.5 for ; Sat, 13 Apr 2013 16:26:51 -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=96L9usjpmRbZbjPBK2KdolugiP1OMOUKSziqNLGg8OM=; b=SY63qbZ9MiK/VMTaTXw2MBxQNMK3IIUwyjxNh8ClThj3XCQVEGXmiAK0RkaWKWMS8/ cMfSBeB9cj0DPIIXZ3K2CjtvOU+OBRQpxSoQ6KDJblZcvjbVHxLR0liNtv/S4SDSj96w 97jdcu0v/7q2WLcdBK1zS88NRumROgrZYtCpCeReMgsOZmHqxlpNUSz58noOeLRDHeis SIxHVxHRFEBJzcF+1PTN70h6j0tNd0SF+6ZhpJpqo73UXhNu75UarSwdDjTIXDXzp3Pj COIOrCNfXtuOZ4Wtdd1MWa5FRvOch3WwVGUgQXBaHQWCpGYAWvP+xZ+oEK9AV8m5OXnT rJag== X-Received: by 10.14.215.193 with SMTP id e41mr25247032eep.32.1365895611516; Sat, 13 Apr 2013 16:26:51 -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.49 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Apr 2013 16:26:50 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: dri-devel@lists.freedesktop.org, Dave Airlie Subject: [PATCH 5/6] drm/radeon/evergreen: reorder HDMI setup Date: Sun, 14 Apr 2013 01:26:23 +0200 Message-Id: <1365895584-20999-6-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 Driver fglrx setups audio and ACR packets after basic initialization, which sounds sane, do the same. Signed-off-by: Rafa? Mi?ecki --- drivers/gpu/drm/radeon/evergreen_hdmi.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index 6b25c1b..24d13ac 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c @@ -111,17 +111,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode WREG32(AFMT_AUDIO_CRC_CONTROL + offset, 0x1000); - WREG32(HDMI_AUDIO_PACKET_CONTROL + offset, - HDMI_AUDIO_DELAY_EN(1) | /* set the default audio delay */ - HDMI_AUDIO_PACKETS_PER_LINE(3)); /* should be suffient for all audio modes and small enough for all hblanks */ - - WREG32(AFMT_AUDIO_PACKET_CONTROL + offset, - AFMT_60958_CS_UPDATE); /* allow 60958 channel status fields to be updated */ - - WREG32(HDMI_ACR_PACKET_CONTROL + offset, - HDMI_ACR_AUTO_SEND | /* allow hw to sent ACR packets when required */ - HDMI_ACR_SOURCE); /* select SW CTS value */ - WREG32(HDMI_VBI_PACKET_CONTROL + offset, HDMI_NULL_SEND | /* send null packets when required */ HDMI_GC_SEND | /* send general control packets */ @@ -146,6 +135,21 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode * Is that something audio related? */ + WREG32(HDMI_AUDIO_PACKET_CONTROL + offset, + HDMI_AUDIO_DELAY_EN(1) | /* set the default audio delay */ + HDMI_AUDIO_PACKETS_PER_LINE(3)); /* should be suffient for all audio modes and small enough for all hblanks */ + + WREG32(AFMT_AUDIO_PACKET_CONTROL + offset, + AFMT_60958_CS_UPDATE); /* allow 60958 channel status fields to be updated */ + + /* fglrx clears sth in AFMT_AUDIO_PACKET_CONTROL2 here */ + + WREG32(HDMI_ACR_PACKET_CONTROL + offset, + HDMI_ACR_AUTO_SEND | /* allow hw to sent ACR packets when required */ + HDMI_ACR_SOURCE); /* select SW CTS value */ + + evergreen_hdmi_update_ACR(encoder, mode->clock); + err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode); if (err < 0) { DRM_ERROR("failed to setup AVI infoframe: %zd\n", err); @@ -159,7 +163,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode } evergreen_hdmi_update_avi_infoframe(encoder, buffer, sizeof(buffer)); - evergreen_hdmi_update_ACR(encoder, mode->clock); WREG32_OR(HDMI_INFOFRAME_CONTROL0 + offset, HDMI_AVI_INFO_SEND | /* enable AVI info frames */