union hdmi_infoframe frame;
memcpy(&frame.audio, audio, sizeof(*audio));
- vc4_hdmi_write_infoframe(encoder, &frame);
+
+ if (vc4_hdmi->packet_ram_enabled)
+ vc4_hdmi_write_infoframe(encoder, &frame);
}
static void vc4_hdmi_set_hdr_infoframe(struct drm_encoder *encoder)
mutex_lock(&vc4_hdmi->mutex);
+ vc4_hdmi->packet_ram_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->packet_ram_enabled = true;
vc4_hdmi_set_infoframes(encoder);
}
struct drm_display_mode saved_adjusted_mode;
/**
+ * @packet_ram_enabled: Is the HDMI controller packet RAM currently
+ * on? Protected by @mutex.
+ */
+ bool packet_ram_enabled;
+
+ /**
* @scdc_enabled: Is the HDMI controller currently running with
* the scrambler on? Protected by @mutex.
*/