]> git.baikalelectronics.ru Git - kernel.git/commit
drm: dw-hdmi: gate audio clock from the I2S enablement callbacks
authorRomain Perier <romain.perier@collabora.com>
Thu, 20 Apr 2017 09:04:34 +0000 (14:34 +0530)
committerArchit Taneja <architt@codeaurora.org>
Thu, 20 Apr 2017 09:24:13 +0000 (14:54 +0530)
commite538e96f6fd2d9000edb90074380ebbb42714afd
tree75f3a3719ea53f685aa3eb1ef200721ead2a9f0d
parent6925ee8af484fdc92322bccfb8a80f35483cbbc8
drm: dw-hdmi: gate audio clock from the I2S enablement callbacks

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). Furthermore, as described by the datasheet, the I2S
variant needs to gate/ungate the clock when the stream is
enabled/disabled.

This commit adds a parameter to hdmi_audio_enable_clk() that controls
when the audio sample clock must be enabled or disabled. Then, it adds
the call to this function from dw_hdmi_i2s_audio_enable() and
dw_hdmi_i2s_audio_disable().

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170414083113.4255-3-romain.perier@collabora.com
Signed-off-by: Archit Taneja <architt@codeaurora.org>
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c