From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936136AbdCJJrs (ORCPT ); Fri, 10 Mar 2017 04:47:48 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:34334 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933353AbdCJJrn (ORCPT ); Fri, 10 Mar 2017 04:47:43 -0500 Date: Fri, 10 Mar 2017 09:46:13 +0000 From: Russell King - ARM Linux To: Romain Perier Cc: Archit Taneja , David Airlie , Heiko Stuebner , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] drm: dw_hdmi: Gate audio sampler clock from the enablement functions Message-ID: <20170310094613.GQ21222@n2100.armlinux.org.uk> References: <20170310093509.19044-1-romain.perier@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170310093509.19044-1-romain.perier@collabora.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 10, 2017 at 10:35:09AM +0100, Romain Perier wrote: > Currently, the audio sampler clock is enabled from dw_hdmi_setup() at > step E. and is kept enabled for later use. This clock should be enabled > and disabled along with the actual audio stream and not always on (that > is bad for PM). Futhermore, this might cause sound glitches with some > HDMI devices, as the CTS+N is forced to zero when the stream is disabled > while the audio clock is still running. > > This commit adds a parameter to hdmi_audio_enable_clk() that controls > when the audio sample clock must be enabled or disabled. Then, it moves > the call to this function into dw_hdmi_audio_enable() and > dw_hdmi_audio_disable(). How does this interact with the workaround given in my commit introducing these functions? (Commit b90120a96608). Setting N=0 is a work-around for iMX6, and we need the audio FIFO to be loaded with data prior to setting N non-zero. If disabling the audio clock prevents the audio FIFO being loaded, your patch will break iMX6. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH] drm: dw_hdmi: Gate audio sampler clock from the enablement functions Date: Fri, 10 Mar 2017 09:46:13 +0000 Message-ID: <20170310094613.GQ21222@n2100.armlinux.org.uk> References: <20170310093509.19044-1-romain.perier@collabora.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170310093509.19044-1-romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Romain Perier Cc: Archit Taneja , Heiko Stuebner , David Airlie , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-rockchip.vger.kernel.org On Fri, Mar 10, 2017 at 10:35:09AM +0100, Romain Perier wrote: > Currently, the audio sampler clock is enabled from dw_hdmi_setup() at > step E. and is kept enabled for later use. This clock should be enabled > and disabled along with the actual audio stream and not always on (that > is bad for PM). Futhermore, this might cause sound glitches with some > HDMI devices, as the CTS+N is forced to zero when the stream is disabled > while the audio clock is still running. > > This commit adds a parameter to hdmi_audio_enable_clk() that controls > when the audio sample clock must be enabled or disabled. Then, it moves > the call to this function into dw_hdmi_audio_enable() and > dw_hdmi_audio_disable(). How does this interact with the workaround given in my commit introducing these functions? (Commit b90120a96608). Setting N=0 is a work-around for iMX6, and we need the audio FIFO to be loaded with data prior to setting N non-zero. If disabling the audio clock prevents the audio FIFO being loaded, your patch will break iMX6. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@armlinux.org.uk (Russell King - ARM Linux) Date: Fri, 10 Mar 2017 09:46:13 +0000 Subject: [PATCH] drm: dw_hdmi: Gate audio sampler clock from the enablement functions In-Reply-To: <20170310093509.19044-1-romain.perier@collabora.com> References: <20170310093509.19044-1-romain.perier@collabora.com> Message-ID: <20170310094613.GQ21222@n2100.armlinux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Mar 10, 2017 at 10:35:09AM +0100, Romain Perier wrote: > Currently, the audio sampler clock is enabled from dw_hdmi_setup() at > step E. and is kept enabled for later use. This clock should be enabled > and disabled along with the actual audio stream and not always on (that > is bad for PM). Futhermore, this might cause sound glitches with some > HDMI devices, as the CTS+N is forced to zero when the stream is disabled > while the audio clock is still running. > > This commit adds a parameter to hdmi_audio_enable_clk() that controls > when the audio sample clock must be enabled or disabled. Then, it moves > the call to this function into dw_hdmi_audio_enable() and > dw_hdmi_audio_disable(). How does this interact with the workaround given in my commit introducing these functions? (Commit b90120a96608). Setting N=0 is a work-around for iMX6, and we need the audio FIFO to be loaded with data prior to setting N non-zero. If disabling the audio clock prevents the audio FIFO being loaded, your patch will break iMX6. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.