@@ -1025,9 +1025,6 @@ hdmi_generate_infoframes(const struct drm_connector *connector,
if (!info->is_hdmi)
return 0;
- if (!info->has_hdmi_infoframe)
- return 0;
-
ret = hdmi_generate_avi_infoframe(connector, state);
if (ret)
return ret;
@@ -1045,9 +1042,11 @@ hdmi_generate_infoframes(const struct drm_connector *connector,
if (ret)
return ret;
- ret = hdmi_generate_hdmi_vendor_infoframe(connector, state);
- if (ret)
- return ret;
+ if (info->has_hdmi_infoframe) {
+ ret = hdmi_generate_hdmi_vendor_infoframe(connector, state);
+ if (ret)
+ return ret;
+ }
return 0;
}
@@ -1208,9 +1207,6 @@ int drm_atomic_helper_connector_hdmi_update_infoframes(struct drm_connector *con
if (!info->is_hdmi)
return 0;
- if (!info->has_hdmi_infoframe)
- return 0;
-
mutex_lock(&connector->hdmi.infoframes.lock);
ret = UPDATE_INFOFRAME(connector, old_state, new_state, avi);
@@ -1233,9 +1229,11 @@ int drm_atomic_helper_connector_hdmi_update_infoframes(struct drm_connector *con
if (ret)
goto out;
- ret = UPDATE_INFOFRAME(connector, old_state, new_state, hdmi);
- if (ret)
- goto out;
+ if (info->has_hdmi_infoframe) {
+ ret = UPDATE_INFOFRAME(connector, old_state, new_state, hdmi);
+ if (ret)
+ goto out;
+ }
out:
mutex_unlock(&connector->hdmi.infoframes.lock);
@@ -1269,9 +1267,6 @@ drm_atomic_helper_connector_hdmi_update_audio_infoframe(struct drm_connector *co
if (!info->is_hdmi)
return 0;
- if (!info->has_hdmi_infoframe)
- return 0;
-
memcpy(&infoframe.data, frame, sizeof(infoframe.data));
infoframe.set = true;
Gate only HDMI Vendor Infoframe generation on the info->has_hdmi_infoframe. All other infoframes were defined in earlier HDMI specs and should be generated by default. Fixes: 000000000000 ("drm/connector: hdmi: Add Infoframes generation") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/gpu/drm/drm_atomic_state_helper.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-)