diff options
| author | Dave Airlie <airlied@redhat.com> | 2019-04-18 06:55:34 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2019-04-18 06:55:48 +1000 |
| commit | ce519c1baa6a7e24ec7a9e59c77c18e607e910ed (patch) | |
| tree | a5cb6ea037f81da7000c0e2334a540851ed998fc /drivers/gpu/drm | |
| parent | dc4060a5dc2557e6b5aa813bf5b73677299d62d2 (diff) | |
| parent | 83f8bf4b837b0e3417f0e5c717a43fcf71ecc992 (diff) | |
| download | linux-ce519c1baa6a7e24ec7a9e59c77c18e607e910ed.tar.gz linux-ce519c1baa6a7e24ec7a9e59c77c18e607e910ed.tar.bz2 linux-ce519c1baa6a7e24ec7a9e59c77c18e607e910ed.zip | |
Merge tag 'drm/tegra/for-5.1-rc6' of git://anongit.freedesktop.org/tegra/linux into drm-fixes
drm/tegra: Fixes for v5.1-rc6
This contains a follow-up fix for the stream ID programming and a fix
for a regression on older Tegra devices (Tegra20 and Tegra30) that are
running into a division by zero trying to enable audio over HDMI.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thierry Reding <thierry.reding@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190417073525.21680-1-thierry.reding@gmail.com
Diffstat (limited to 'drivers/gpu/drm')
| -rw-r--r-- | drivers/gpu/drm/tegra/hdmi.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 47c55974756d..d23c4bfde790 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -1260,9 +1260,15 @@ static void tegra_hdmi_encoder_enable(struct drm_encoder *encoder) hdmi->dvi = !tegra_output_is_hdmi(output); if (!hdmi->dvi) { - err = tegra_hdmi_setup_audio(hdmi); - if (err < 0) - hdmi->dvi = true; + /* + * Make sure that the audio format has been configured before + * enabling audio, otherwise we may try to divide by zero. + */ + if (hdmi->format.sample_rate > 0) { + err = tegra_hdmi_setup_audio(hdmi); + if (err < 0) + hdmi->dvi = true; + } } if (hdmi->config->has_hda) |
