In preparation to tightening driver control over generated InfoFrames,
make sure to warn the user if the driver rejects the InfoFrames on the
grounds of it being unsupported.

Signed-off-by: Dmitry Baryshkov <[email protected]>
---
 drivers/gpu/drm/display/drm_hdmi_state_helper.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c 
b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
index 
a561f124be99a0cd4259dbacf5f5f6651ff8a0ea..e85a6cf6e67232528861521bb21251bfdce6f8b9
 100644
--- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
+++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
@@ -920,6 +920,9 @@ static int clear_infoframe(struct drm_connector *connector,
        int ret;
 
        ret = clear_device_infoframe(connector, old_frame->data.any.type);
+       if (ret == -EOPNOTSUPP)
+               drm_warn_once(connector->dev, "unsupported HDMI infoframe 
0x%x\n",
+                             old_frame->data.any.type);
        if (ret)
                return ret;
 
@@ -947,6 +950,9 @@ static int write_device_infoframe(struct drm_connector 
*connector,
                return len;
 
        ret = funcs->write_infoframe(connector, frame->any.type, buffer, len);
+       if (ret == -EOPNOTSUPP)
+               drm_warn_once(connector->dev, "unsupported HDMI infoframe 
0x%x\n",
+                             frame->any.type);
        if (ret) {
                drm_dbg_kms(dev, "Call failed: %d\n", ret);
                return ret;

-- 
2.47.3

Reply via email to