]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tegra: hdmi: Setup audio only if configured
authorThierry Reding <treding@nvidia.com>
Tue, 16 Apr 2019 12:43:26 +0000 (14:43 +0200)
committerThierry Reding <treding@nvidia.com>
Wed, 17 Apr 2019 07:28:43 +0000 (09:28 +0200)
commit102d66763f5452a358418d557efc77c1d610b3b4
tree4fcc40792ec0395a5796c1cd4d51e516cc211ea4
parenta6d01dcaf79842bef49e38cf2fb2c83d43b67ade
drm/tegra: hdmi: Setup audio only if configured

The audio configuration is only valid if the HDMI codec has been
properly set up. Do not attempt to set up audio before that happens
because it causes a division by zero.

Note that this is only problematic on Tegra20 and Tegra30. Later chips
implement the division instructions which return zero when dividing by
zero and don't throw an exception.

Fixes: 12037a0f6ac0 ("drm/tegra: hdmi: Fix audio to work with any pixel clock rate")
Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/hdmi.c