drm/vc4: hdmi: implement clear_infoframe

Implement the clear_infoframe callback, disabling corresponding
InfoFrame type.

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260107-limit-infoframes-2-v4-2-213d0d3bd490@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
Dmitry Baryshkov 2026-01-07 20:14:59 +02:00
parent 7436a87db9
commit 3a4ceb89a9

View File

@ -624,6 +624,30 @@ static int vc4_hdmi_stop_packet(struct vc4_hdmi *vc4_hdmi,
return ret;
}
static int vc4_hdmi_clear_infoframe(struct drm_connector *connector,
enum hdmi_infoframe_type type)
{
struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector);
struct drm_device *drm = connector->dev;
int ret;
int idx;
if (!drm_dev_enter(drm, &idx))
return 0;
WARN_ONCE(!(HDMI_READ(HDMI_RAM_PACKET_CONFIG) &
VC4_HDMI_RAM_PACKET_ENABLE),
"Packet RAM has to be on to store the packet.");
ret = vc4_hdmi_stop_packet(vc4_hdmi, type, true);
if (ret)
drm_err(drm, "Failed to wait for infoframe to go idle: %d\n", ret);
drm_dev_exit(idx);
return ret;
}
static int vc4_hdmi_write_infoframe(struct drm_connector *connector,
enum hdmi_infoframe_type type,
const u8 *infoframe, size_t len)
@ -1660,6 +1684,7 @@ vc4_hdmi_connector_clock_valid(const struct drm_connector *connector,
static const struct drm_connector_hdmi_funcs vc4_hdmi_hdmi_connector_funcs = {
.tmds_char_rate_valid = vc4_hdmi_connector_clock_valid,
.clear_infoframe = vc4_hdmi_clear_infoframe,
.write_infoframe = vc4_hdmi_write_infoframe,
};