mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-05 04:46:54 -04:00
drm/display: bridge_connector: move audio_infoframe checks to OP_HDMI
There are DRM_BRIDGE_OP_HDMI_AUDIO bridges (e.g. Lontium LT9611UXC)
which don't implement DRM_BRIDGE_OP_HDMI and don't implement
hdmi_clear_audio_infoframe / hdmi_write_audio_infoframe callbacks.
Move corresponding checks under the DRM_BRIDGE_OP_HDMI condition, making
sure that we require those callbacks only from the bridges which are
actually going to use them.
Fixes: b626b1a1c9 ("drm/bridge: refactor HDMI InfoFrame callbacks")
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260126-drm-fix-lt9611uxc-v1-1-04a635a8f5cf@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
@@ -851,6 +851,11 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
|
||||
!bridge->funcs->hdmi_clear_hdmi_infoframe)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
if (bridge->ops & DRM_BRIDGE_OP_HDMI_AUDIO &&
|
||||
(!bridge->funcs->hdmi_write_audio_infoframe ||
|
||||
!bridge->funcs->hdmi_clear_audio_infoframe))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
if (bridge->ops & DRM_BRIDGE_OP_HDMI_HDR_DRM_INFOFRAME &&
|
||||
(!bridge->funcs->hdmi_write_hdr_drm_infoframe ||
|
||||
!bridge->funcs->hdmi_clear_hdr_drm_infoframe))
|
||||
@@ -880,9 +885,7 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
|
||||
!bridge->hdmi_audio_spdif_playback)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
if (!bridge->funcs->hdmi_write_audio_infoframe ||
|
||||
!bridge->funcs->hdmi_clear_audio_infoframe ||
|
||||
!bridge->funcs->hdmi_audio_prepare ||
|
||||
if (!bridge->funcs->hdmi_audio_prepare ||
|
||||
!bridge->funcs->hdmi_audio_shutdown)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user