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. -----BEGIN PGP SIGNATURE----- iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAly21jwTHHRyZWRpbmdA bnZpZGlhLmNvbQAKCRDdI6zXfz6zofMPD/sEDPjL57s8ApM3g/EZuvcanvsCNNJh BoY0IaKvfgzhhMjKfyha5PvJG8yl054C57fMMSrbqb9S38CBcWnxa4X0H3SJ7iIz 18TcnDz3uJ6qVqKGxvToNv9+E6Fy4Gg+p4LAgZww6lQb4u8uO+WXZKX/W4OvSpPH a8lze9LaPE5Z9QokEya5Huj4UN6fH07RPsWlaGdDYN2sLlKkNo8TrIfHloZO53C2 sNAEVwbPaOd8BrNdbJT7Z5L7ZOQAM8LHGlipyOa1wGwkaX5A8tOpkVSptTJYPhqY VFgnWxE+Oh3ex013AeUH4lmyojSI1NFuL2vDf/gLzgOmxI0zdtK3N4FtZTxf9A6d BSQLxa1FcbIiCP52S2yryfyBPXrZflSuqVwq4NT6AYZ/tCaprZrvv2nvCnNJMJWa 2ayVMZDl2zDnY1jw06NnOLvDL9OsLgNkSiY9MLGlgTroJEbPCt3WOas5wKDXo/Hw a4GViCAb7RWDyN8pguyrod4jUGo/PE8o+XcObUhhufvRX/LOTYL72esPd8mwL0RN Vkxqe4EciAbFQDr6g36fSosftwxcJp649rhBHKiEvLLHk8nlpAiZJz+JoyXKVoC2 SV2e3KMZKcd5wPfSFt02Nr89tOtKcVm0pOuNjAprE00UYMvCFNHso79RkO7zVZH5 J1DtWoH3Z/rxrA== =o0aV -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
ce519c1baa
|
@ -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)
|
||||
|
|
|
@ -114,9 +114,13 @@ static inline void synchronize_syncpt_base(struct host1x_job *job)
|
|||
|
||||
static void host1x_channel_set_streamid(struct host1x_channel *channel)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_IOMMU_API) && HOST1X_HW >= 6
|
||||
#if HOST1X_HW >= 6
|
||||
u32 sid = 0x7f;
|
||||
#ifdef CONFIG_IOMMU_API
|
||||
struct iommu_fwspec *spec = dev_iommu_fwspec_get(channel->dev->parent);
|
||||
u32 sid = spec ? spec->ids[0] & 0xffff : 0x7f;
|
||||
if (spec)
|
||||
sid = spec->ids[0] & 0xffff;
|
||||
#endif
|
||||
|
||||
host1x_ch_writel(channel, sid, HOST1X_CHANNEL_SMMU_STREAMID);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue