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 <ankit.k.nautiyal@intel.com>
This commit is contained in:
Ankit Nautiyal 2019-08-30 19:40:46 +05:30
parent fbfcc304a4
commit fc2c180926
1 changed files with 3 additions and 0 deletions

View File

@ -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,