mutex_lock(&vc4_hdmi->mutex);
+ vc4_hdmi->output_enabled = false;
spin_lock_irqsave(&vc4_hdmi->hw_lock, flags);
HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, 0);
VC4_HDMI_RAM_PACKET_ENABLE);
spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags);
+ vc4_hdmi->output_enabled = true;
vc4_hdmi_set_infoframes(encoder);
}
spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags);
memcpy(&vc4_hdmi->audio.infoframe, ¶ms->cea, sizeof(params->cea));
- vc4_hdmi_set_audio_infoframe(encoder);
+ if (vc4_hdmi->output_enabled)
+ vc4_hdmi_set_audio_infoframe(encoder);
mutex_unlock(&vc4_hdmi->mutex);
struct drm_display_mode saved_adjusted_mode;
/**
+ * @output_enabled: Is the HDMI controller currently active?
+ * Protected by @mutex.
+ */
+ bool output_enabled;
+
+ /**
* @scdc_enabled: Is the HDMI controller currently running with
* the scrambler on? Protected by @mutex.
*/