From patchwork Sat Apr 13 23:26:21 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: 2441431 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 11F323FC71 for ; Sat, 13 Apr 2013 23:29:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF854E5F3C for ; Sat, 13 Apr 2013 16:29:14 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ea0-f173.google.com (mail-ea0-f173.google.com [209.85.215.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D6BFE5EDE for ; Sat, 13 Apr 2013 16:26:46 -0700 (PDT) Received: by mail-ea0-f173.google.com with SMTP id k11so1750269eaj.32 for ; Sat, 13 Apr 2013 16:26:46 -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=93e5/A1vLNgNs/Tgs0X8ISoYEVyZn3GUX9N/DEDPpEc=; b=umQxvCjISW1wV8zZZ9s15FbT4LV9g7L44A137Wg55tZEpcLzWAE/kKWn7Mqx1NeAk6 TyYAE5rN/Bi3UOKijtZOf3KvQkkQ+H0NlTF3I+BVWua1BXVkm49ns5ZbbNgGMxx048im Dhk2byukUExkVnkNivGc9f6RkSQeJYrzkbWI6fRAjAvOuahzAhrF/biRnSgJpZ/Docq6 Vp/3FYERRwZhAnF5R/lRLbum6fFx5cMud3OX2uui7/bKPHlQMScQmMAf9lLv5Dk09MyC Rv1u49lYaUpdJa0bNZw7tTYrAonzHsRksyJBTKEg8gghOU62UTWfThLuRl1QHeTaT90C yP7Q== X-Received: by 10.15.102.3 with SMTP id bq3mr44327455eeb.42.1365895606269; Sat, 13 Apr 2013 16:26:46 -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.44 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Apr 2013 16:26:45 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: dri-devel@lists.freedesktop.org, Dave Airlie Subject: [PATCH 3/6] drm/radeon: add some HDMI comments Date: Sun, 14 Apr 2013 01:26:21 +0200 Message-Id: <1365895584-20999-4-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 | 14 ++++++++++++++ drivers/gpu/drm/radeon/radeon_display.c | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index 4fdecc2..8b64bf1 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c @@ -143,6 +143,13 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode WREG32(HDMI_GC + offset, 0); /* unset HDMI_GC_AVMUTE */ + /* + * At this point fglrx reads following regs: + * DCE41: 0x49c + * DCE5: 0x480 0x484 0x488 + * Is that something audio related? + */ + err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode); if (err < 0) { DRM_ERROR("failed to setup AVI infoframe: %zd\n", err); @@ -158,6 +165,13 @@ 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); + /* + * At this point fglrx changes following regs: + * DCE41: 0x7a70 + * DCE5: 0x7a70 and 0x64ec + * Is that something audio related? + */ + /* it's unknown what these bits do excatly, but it's indeed quite useful for debugging */ WREG32(AFMT_RAMP_CONTROL0 + offset, 0x00FFFFFF); WREG32(AFMT_RAMP_CONTROL1 + offset, 0x007FFFFF); diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index e38fd55..a83c272 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -1261,6 +1261,11 @@ static void radeon_afmt_init(struct radeon_device *rdev) rdev->mode_info.afmt[1]->offset = EVERGREEN_CRTC1_REGISTER_OFFSET; rdev->mode_info.afmt[1]->id = 1; } + /* + * According to the commens above we should use !DCE41 || DCE5, + * condition, however there isn't any DCE5 that is DCE41, so + * DCE5 check is not needed. + */ if (!ASIC_IS_DCE41(rdev)) { rdev->mode_info.afmt[2] = kzalloc(sizeof(struct radeon_afmt), GFP_KERNEL); if (rdev->mode_info.afmt[2]) {