summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>2026-01-07 20:15:05 +0200
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>2026-01-19 13:11:47 +0200
commit4fc30c2c5c61db88e3d6644bd3dd2032ec4bee06 (patch)
tree25db45936d059cf86ec1974737afe8b82075ca5b /drivers
parent1d8847f457648ed4932019dcd3081bc27bcea936 (diff)
drm/display: hdmi_state_helper: don't generate unsupported InfoFrames
There is little point in generating InfoFrames which are not supported by the driver. Skip generating the unsupported InfoFrames, making sure that the kernel never tries to write the unsupported frame. As there are no remaining usecases, change write_infoframe / clear_infoframe helpers return an error if the corresponding callback is NULL. Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patch.msgid.link/20260107-limit-infoframes-2-v4-8-213d0d3bd490@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/display/drm_hdmi_state_helper.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
index e8556bf9e1da..a1d16762ac7a 100644
--- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
+++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
@@ -718,6 +718,9 @@ static int hdmi_generate_spd_infoframe(const struct drm_connector *connector,
infoframe->set = false;
+ if (!connector->hdmi.funcs->spd.write_infoframe)
+ return 0;
+
ret = hdmi_spd_infoframe_init(frame,
connector->hdmi.vendor,
connector->hdmi.product);
@@ -742,6 +745,9 @@ static int hdmi_generate_hdr_infoframe(const struct drm_connector *connector,
infoframe->set = false;
+ if (!connector->hdmi.funcs->hdr_drm.write_infoframe)
+ return 0;
+
if (connector->max_bpc < 10)
return 0;
@@ -902,7 +908,7 @@ static int clear_infoframe(struct drm_connector *connector,
if (!funcs->clear_infoframe) {
drm_dbg_kms(dev, "Function not implemented, bailing.\n");
- return 0;
+ return -EOPNOTSUPP;
}
ret = funcs->clear_infoframe(connector);
@@ -928,7 +934,7 @@ static int write_infoframe(struct drm_connector *connector,
if (!funcs->write_infoframe) {
drm_dbg_kms(dev, "Function not implemented, bailing.\n");
- return 0; /* XXX: temporal until we stop generating unsupported frames */
+ return -EOPNOTSUPP;
}
len = hdmi_infoframe_pack(&new_frame->data, buffer, sizeof(buffer));