@@ -689,6 +689,30 @@ static void vc4_hdmi_set_spd_infoframe(struct drm_encoder *encoder)
689689 vc4_hdmi_write_infoframe (encoder , & frame );
690690}
691691
692+ static void vc4_hdmi_set_hdmi_infoframe (struct drm_encoder * encoder )
693+ {
694+ struct vc4_hdmi * vc4_hdmi = encoder_to_vc4_hdmi (encoder );
695+ struct drm_connector * connector = & vc4_hdmi -> connector ;
696+ struct drm_crtc * crtc = encoder -> crtc ;
697+ const struct drm_display_mode * mode = & crtc -> state -> adjusted_mode ;
698+ union hdmi_infoframe frame ;
699+ int ret ;
700+
701+ ret = drm_hdmi_vendor_infoframe_from_display_mode (& frame .vendor .hdmi ,
702+ connector ,
703+ mode );
704+ if (ret < 0 ) {
705+ DRM_ERROR ("couldn't fill HDMI infoframe (%d)\n" , ret );
706+ return ;
707+ }
708+ ret = hdmi_vendor_infoframe_check (& frame .vendor .hdmi );
709+ if (ret < 0 ) {
710+ DRM_ERROR ("Invalid HDMI infoframe (%d)\n" , ret );
711+ return ;
712+ }
713+ vc4_hdmi_write_infoframe (encoder , & frame );
714+ }
715+
692716static void vc4_hdmi_set_audio_infoframe (struct drm_encoder * encoder )
693717{
694718 struct vc4_hdmi * vc4_hdmi = encoder_to_vc4_hdmi (encoder );
@@ -714,6 +738,8 @@ static void vc4_hdmi_set_infoframes(struct drm_encoder *encoder)
714738
715739 vc4_hdmi_set_avi_infoframe (encoder );
716740 vc4_hdmi_set_spd_infoframe (encoder );
741+ vc4_hdmi_set_hdmi_infoframe (encoder );
742+
717743 /*
718744 * If audio was streaming, then we need to reenabled the audio
719745 * infoframe here during encoder_enable.
0 commit comments