From patchwork Mon Sep 2 14:50:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 2853053 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 26DB09F499 for ; Tue, 3 Sep 2013 05:33:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 38312201EA for ; Tue, 3 Sep 2013 05:33:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 110F0201B4 for ; Tue, 3 Sep 2013 05:32:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED8C0E684A for ; Mon, 2 Sep 2013 22:32:58 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from caramon.arm.linux.org.uk (caramon.arm.linux.org.uk [78.32.30.218]) by gabe.freedesktop.org (Postfix) with ESMTP id 21436E629A for ; Mon, 2 Sep 2013 07:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=OYa5iOcAUd/HZJTe6xXhvY6elfb4Xaw5TTm79hwbjHI=; b=gP+PXcS3ZiyzOt22wncDloToTIECXqr+R7fg5XOUvyCVpmPJtlfKeqjTkh9Da8PTii/a9LoecQtdbJcUFSLUw0l/8QYGeav9wU13c1AJD7Xqo2Z/7JPAx6RK+BT4URS/b8EP1xT54xW/Fgwa6zYIZcAOlqUp8GvYRaZ7bq5v8fU=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:44758) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1VGVT1-0005jY-F2; Mon, 02 Sep 2013 15:50:59 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1VGVSz-0003JO-Oz; Mon, 02 Sep 2013 15:50:57 +0100 Date: Mon, 2 Sep 2013 15:50:57 +0100 From: Russell King - ARM Linux To: Sebastian Hesselbarth Subject: Re: [PATCH] drm/i2c: Fix broken TDA998x audio (was: Re: [PATCH v2 5/8] drm/i2c: tda998x: add video and audio input configuration) Message-ID: <20130902145057.GX6617@n2100.arm.linux.org.uk> References: <1376509413-1462-1-git-send-email-sebastian.hesselbarth@gmail.com> <1376509413-1462-6-git-send-email-sebastian.hesselbarth@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1376509413-1462-6-git-send-email-sebastian.hesselbarth@gmail.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-Mailman-Approved-At: Mon, 02 Sep 2013 22:29:02 -0700 Cc: Daniel Vetter , linux-kernel@vger.kernel.org, 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+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=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 On Wed, Aug 14, 2013 at 09:43:30PM +0200, Sebastian Hesselbarth wrote: > From: Russell King > > This patch adds tda998x specific parameters to allow it to be configured > for different boards using it. Also, this implements rudimentary audio > support for S/PDIF attached controllers. > > Signed-off-by: Russell King > Signed-off-by: Sebastian Hesselbarth > Tested-by: Darren Etheridge > --- It looks like there's been a bug introduced in this patch (which wasn't in my original). > @@ -445,8 +681,7 @@ tda998x_encoder_dpms(struct drm_encoder *encoder, int mode) > > switch (mode) { > case DRM_MODE_DPMS_ON: > - /* enable audio and video ports */ > - reg_write(encoder, REG_ENA_AP, 0xff); > + /* enable video ports, audio will be enabled later */ > reg_write(encoder, REG_ENA_VP_0, 0xff); > reg_write(encoder, REG_ENA_VP_1, 0xff); > reg_write(encoder, REG_ENA_VP_2, 0xff); I also disabled the writing to REG_ENA_AP in the DPMS off path as well, which clears this register. That seems to be missing from this patch, and it means that when the display is placed into DPMS-off mode, the audio inputs are disabled, never to be re-enabled. There is no need to disable the audio input in DPMS-off mode. 8<============= From: Russell King Subject: [PATCH] drm/i2c: Fix broken TDA998x audio In patch "drm/i2c: tda998x: add video and audio input configuration" in its original version, disabling the audio input port was removed. The version which was submitted for merging had this change deleted, which results in audio being non-functional. Fix this by removing the write. While here, update the comment too. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 5742cfc..59878af 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -705,8 +705,7 @@ tda998x_encoder_dpms(struct drm_encoder *encoder, int mode) reg_write(encoder, REG_VIP_CNTRL_2, priv->vip_cntrl_2); break; case DRM_MODE_DPMS_OFF: - /* disable audio and video ports */ - reg_write(encoder, REG_ENA_AP, 0x00); + /* disable video ports */ reg_write(encoder, REG_ENA_VP_0, 0x00); reg_write(encoder, REG_ENA_VP_1, 0x00); reg_write(encoder, REG_ENA_VP_2, 0x00);