Skip to content
Snippets Groups Projects
Commit 18d2749c authored by Oliver Brown's avatar Oliver Brown
Browse files

MLK-20961 drm: imx: hdp: Check the content protection property first.


Need to check the content protection property first in
imx_hdp_imx_encoder_enable. The function may return if
drm_hdmi_infoframe_set_hdr_metadata returns an error. This was preventing
iMX8QM from enabling content protection.

Signed-off-by: default avatarOliver Brown <oliver.brown@nxp.com>
parent 7eaab00f
No related branches found
No related tags found
No related merge requests found
...@@ -1065,6 +1065,10 @@ static void imx_hdp_imx_encoder_enable(struct drm_encoder *encoder) ...@@ -1065,6 +1065,10 @@ static void imx_hdp_imx_encoder_enable(struct drm_encoder *encoder)
struct drm_connector_state *conn_state = hdp->connector.state; struct drm_connector_state *conn_state = hdp->connector.state;
int ret = 0; int ret = 0;
if (conn_state->content_protection ==
DRM_MODE_CONTENT_PROTECTION_DESIRED)
imx_hdcp_enable(hdp);
if (!hdp->ops->write_hdr_metadata) if (!hdp->ops->write_hdr_metadata)
goto out; goto out;
...@@ -1093,10 +1097,6 @@ static void imx_hdp_imx_encoder_enable(struct drm_encoder *encoder) ...@@ -1093,10 +1097,6 @@ static void imx_hdp_imx_encoder_enable(struct drm_encoder *encoder)
hdp->ops->write_hdr_metadata(&hdp->state, &frame); hdp->ops->write_hdr_metadata(&hdp->state, &frame);
if (conn_state->content_protection ==
DRM_MODE_CONTENT_PROTECTION_DESIRED)
imx_hdcp_enable(hdp);
out: out:
imx_hdp_call(hdp, pixel_link_validate, &hdp->state); imx_hdp_call(hdp, pixel_link_validate, &hdp->state);
imx_hdp_call(hdp, pixel_link_sync_ctrl_enable, &hdp->state); imx_hdp_call(hdp, pixel_link_sync_ctrl_enable, &hdp->state);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment