diff options
| -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) | |||
| 1260 | 1260 | ||
| 1261 | hdmi->dvi = !tegra_output_is_hdmi(output); | 1261 | hdmi->dvi = !tegra_output_is_hdmi(output); |
| 1262 | if (!hdmi->dvi) { | 1262 | if (!hdmi->dvi) { |
| 1263 | err = tegra_hdmi_setup_audio(hdmi); | 1263 | /* |
| 1264 | if (err < 0) | 1264 | * Make sure that the audio format has been configured before |
| 1265 | hdmi->dvi = true; | 1265 | * enabling audio, otherwise we may try to divide by zero. |
| 1266 | */ | ||
| 1267 | if (hdmi->format.sample_rate > 0) { | ||
| 1268 | err = tegra_hdmi_setup_audio(hdmi); | ||
| 1269 | if (err < 0) | ||
| 1270 | hdmi->dvi = true; | ||
| 1271 | } | ||
| 1266 | } | 1272 | } |
| 1267 | 1273 | ||
| 1268 | if (hdmi->config->has_hda) | 1274 | if (hdmi->config->has_hda) |
