summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>2026-01-07 20:14:59 +0200
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>2026-01-19 13:10:35 +0200
commit3a4ceb89a9723088615ea1c960fc589f87caddb7 (patch)
treee7ed99f2a6d26caa34b522893bfb43264e62e65b /drivers/gpu
parent7436a87db99d57196c49d10de35f41531993d5f1 (diff)
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/vc4/vc4_hdmi.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index 1798d1156d10..4cfb7ebc0c81 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -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,
};