From fc2c180926cd62ca93f74165d014e7e580c76ae1 Mon Sep 17 00:00:00 2001 From: Ankit Nautiyal Date: Fri, 30 Aug 2019 19:40:46 +0530 Subject: [PATCH] backend-drm: Check for HDCP Content Type property before setting Currently, a check is missing for the case if the HDCP Content Type property is requested, but is not supported by the driver. Signed-off-by: Ankit Nautiyal --- libweston/backend-drm/kms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libweston/backend-drm/kms.c b/libweston/backend-drm/kms.c index 527768cb..4c942a3d 100644 --- a/libweston/backend-drm/kms.c +++ b/libweston/backend-drm/kms.c @@ -902,6 +902,9 @@ drm_head_set_hdcp_property(struct drm_head *head, prop_val); assert(ret == 0); + if (!drm_head_has_prop(head, WDRM_CONNECTOR_HDCP_CONTENT_TYPE)) + return; + enum_info = head->props_conn[WDRM_CONNECTOR_HDCP_CONTENT_TYPE].enum_values; prop_val = enum_info[drm_cp_type].value; ret = connector_add_prop(req, head, WDRM_CONNECTOR_HDCP_CONTENT_TYPE,