This patchset sits on top Maxime's HDMI connector patchset ([1]). Currently this is an RFC exploring the interface between HDMI bridges and HDMI connector code. This has been lightly verified on the Qualcomm DB820c, which has native HDMI output. If this approach is considered to be acceptable, I'll finish MSM HDMI bridge conversion (reworking the Audio Infoframe code). Other bridges can follow the same approach (we have lt9611 / lt9611uxc / adv7511 on Qualcomm hardware). [1] https://patchwork.freedesktop.org/series/122421/ Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> --- Changes in v7: - Updated Audio commit message to mention InfoFrame vs audio packet difference (Abhinav) - Brought back msm_audio_update() calls to atomic_pre_enable() and atomic_post_disable() callbacks (Abhinav) - Moved the call to msm_hdmi_set_timings() to the beginning of the atomic_pre_enable() (Abhinav) - Link to v6: https://lore.kernel.org/r/20250124-bridge-hdmi-connector-v6-0-1592632327f7@xxxxxxxxxx Changes in v6: - Moved HDMI timing engine programming to the end of the atomic_prepare (Abhinav) - Rebased on top of drm-misc-next, incorporating changes to drm_bridge_connector - Switched to the DRM HDMI Audio framework for the HDMI codec implementation - Link to v5: https://lore.kernel.org/r/20240607-bridge-hdmi-connector-v5-0-ab384e6021af@xxxxxxxxxx Changes in v5: - Made drm_bridge_funcs::hdmi_clear_infoframe() callback mandatory for DRM_BRIDGE_OP_HDMI bridges (Maxime) - Added drm_atomic_helper_connector_hdmi_disable_audio_infoframe() instead of passing NULL frame to drm_atomic_helper_connector_hdmi_update_audio_infoframe() (Maxime) - Disable Audio Infoframe in MSM HDMI driver on audio shutdown. - Link to v4: https://lore.kernel.org/r/20240531-bridge-hdmi-connector-v4-0-5110f7943622@xxxxxxxxxx Changes in v4: - Reworked drm_bridge_connector functions to remove ternary operators and to reduce indentation level (Maxime) - Added hdmi_ prefix to all HDMI-related drm_bridge_funcs calls (Maxime) - Made vendor and product mandatory to the HDMI bridges (Maxime) - Documented that max_bpc can be 8, 10 or 12 (Maxime) - Changed hdmi->pixclock to be set using tmds_char_rate instead of calculating that manually (Maxime) - Changed mode_valid to use helper function instead of manually doing mode->clock * 1000 - Removed hdmi_mode in favour of connector->display_info.is_hdmi - Link to v3: https://lore.kernel.org/r/20240530-bridge-hdmi-connector-v3-0-a1d184d68fe3@xxxxxxxxxx Changes in v3: - Rebased on top of the merged HDMI connector patchset. - Changed drm_bridge_connector to use drmm_connector_init() (Maxime) - Added a check that write_infoframe callback is present if BRIDGE_OP_HDMI is set. - Moved drm_atomic_helper_connector_hdmi_check() call from drm_bridge_connector to the HDMI bridge driver to remove dependency from drm_kms_helpers on the optional HDMI state helpers. - Converted Audio InfoFrame handling code. - Added support for HDMI Vendor Specific and SPD InfoFrames. - Link to v2: https://lore.kernel.org/r/20240309-bridge-hdmi-connector-v2-0-1380bea3ee70@xxxxxxxxxx Changes in v2: - Dropped drm_connector_hdmi_setup(). Instead added drm_connector_hdmi_init() to be used by drm_bridge_connector. - Changed the drm_bridge_connector to act as a proxy for the HDMI connector infrastructure. This removes most of the logic from the bridge drivers. - Link to v1: https://lore.kernel.org/r/20240308-bridge-hdmi-connector-v1-0-90b693550260@xxxxxxxxxx --- Dmitry Baryshkov (7): drm/msm/hdmi: switch to atomic bridge callbacks drm/msm/hdmi: program HDMI timings during atomic_pre_enable drm/msm/hdmi: make use of the drm_connector_hdmi framework drm/msm/hdmi: get rid of hdmi_mode drm/msm/hdmi: update HDMI_GEN_PKT_CTRL_GENERIC0_UPDATE definition drm/msm/hdmi: also send the SPD and HDMI Vendor Specific InfoFrames drm/msm/hdmi: use DRM HDMI Audio framework drivers/gpu/drm/msm/Kconfig | 2 + drivers/gpu/drm/msm/hdmi/hdmi.c | 120 +-------- drivers/gpu/drm/msm/hdmi/hdmi.h | 31 +-- drivers/gpu/drm/msm/hdmi/hdmi_audio.c | 124 +++++----- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 325 +++++++++++++++++++------ drivers/gpu/drm/msm/registers/display/hdmi.xml | 2 +- 6 files changed, 336 insertions(+), 268 deletions(-) --- base-commit: ed58d103e6da15a442ff87567898768dc3a66987 change-id: 20240307-bridge-hdmi-connector-7e3754e661d0 Best regards, -- Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>