drm/tegra: hdmi: Fix audio to work with any pixel clock rate
authorAlban Bedel <alban.bedel@avionic-design.de>
Wed, 14 Dec 2016 17:20:39 +0000 (18:20 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 16 Jan 2019 12:11:45 +0000 (13:11 +0100)
commitdb5adf4d6dced4e3326ce369fe0c213c968095f4
tree35ad0a5cbe0fab5cae9e283e92993bcce6d63c35
parente3c702dcc7b047a5187a5ad132bfdf3850cc33e1
drm/tegra: hdmi: Fix audio to work with any pixel clock rate

The audio setting implementation was limited to a few specific pixel
clocks. This prevented HDMI audio from working on several test devices
as they need a pixel clock that is not supported by this implementation.

Fix this by implementing the algorithm provided in the TRM using fixed
point arithmetic. This allows the driver to cope with any sane pixel
clock rate.

Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
[treding@nvidia.com: fix uninitialized variable warning]
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/hdmi.c