On Tue, Apr 16, 2019 at 04:41:37PM +0200, Thierry Reding wrote:
> From: Thierry Reding <tred...@nvidia.com>
> 
> 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: db5adf4d6dce ("drm/tegra: hdmi: Fix audio to work with any pixel clock 
> rate")
> Reported-by: Marcel Ziswiler <marcel.ziswi...@toradex.com>
> Signed-off-by: Thierry Reding <tred...@nvidia.com>
> ---
>  drivers/gpu/drm/tegra/hdmi.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
> index 47c55974756d..e6c60bbc0fec 100644
> --- a/drivers/gpu/drm/tegra/hdmi.c
> +++ b/drivers/gpu/drm/tegra/hdmi.c
> @@ -1259,11 +1259,6 @@ static void tegra_hdmi_encoder_enable(struct 
> drm_encoder *encoder)
>       tegra_hdmi_writel(hdmi, value, HDMI_NV_PDISP_SOR_REFCLK);
>  
>       hdmi->dvi = !tegra_output_is_hdmi(output);
> -     if (!hdmi->dvi) {
> -             err = tegra_hdmi_setup_audio(hdmi);
> -             if (err < 0)
> -                     hdmi->dvi = true;
> -     }

This has the disadvantage of keeping audio disabled after a disable/
enable sequence, even if userspace is still playing audio. I'll send
out a better fix that keeps audio working after disable/enable.

Thierry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to