Lines Matching full:hdcp

61  * intel_hdcp_required_content_stream selects the most highest common possible HDCP
66 * HDCP 2.2 capable sink because of other sink are not capable of HDCP 2.2 in
128 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_prepare_streams() local
133 data->streams[0].stream_type = hdcp->content_type; in intel_hdcp_prepare_streams()
163 /* HDCP spec states that we must retry the bksv if it is invalid */ in intel_hdcp_read_valid_bksv()
183 const struct intel_hdcp_shim *shim = connector->hdcp.shim; in intel_hdcp_capable()
205 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp2_capable() local
209 if (!hdcp->hdcp2_supported) in intel_hdcp2_capable()
213 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in intel_hdcp2_capable()
214 if (!dev_priv->display.hdcp.comp_added || !dev_priv->display.hdcp.master) { in intel_hdcp2_capable()
215 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in intel_hdcp2_capable()
218 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in intel_hdcp2_capable()
221 hdcp->shim->hdcp_2_2_capable(dig_port, &capable); in intel_hdcp2_capable()
283 * Another req for hdcp key loadability is enabled state of pll for in hdcp_key_loadable()
316 * Initiate loading the HDCP key from fuses. in intel_hdcp_load_keys()
318 * BXT+ platforms, HDCP key needs to be loaded by SW. Only display in intel_hdcp_load_keys()
327 "Failed to initiate HDCP key load (%d)\n", in intel_hdcp_load_keys()
410 enum transcoder cpu_transcoder = connector->hdcp.cpu_transcoder; in intel_hdcp_validate_v_prime()
639 drm_dbg_kms(&dev_priv->drm, "SHA-1 mismatch, HDCP failed\n"); in intel_hdcp_validate_v_prime()
646 /* Implements Part 2 of the HDCP authorization procedure */
652 const struct intel_hdcp_shim *shim = connector->hdcp.shim; in intel_hdcp_auth_downstream()
675 * the HDCP encryption. That implies that repeater can't have its own in intel_hdcp_auth_downstream()
722 drm_dbg_kms(&dev_priv->drm, "HDCP is enabled (%d downstream devices)\n", in intel_hdcp_auth_downstream()
730 /* Implements Part 1 of the HDCP authorization procedure */
735 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_auth() local
736 const struct intel_hdcp_shim *shim = hdcp->shim; in intel_hdcp_auth()
737 enum transcoder cpu_transcoder = connector->hdcp.cpu_transcoder; in intel_hdcp_auth()
756 * Detects whether the display is HDCP capable. Although we check for in intel_hdcp_auth()
757 * valid Bksv below, the HDCP over DP spec requires that we check in intel_hdcp_auth()
758 * whether the display supports HDCP before we write An. For HDMI in intel_hdcp_auth()
767 "Panel is not HDCP capable\n"); in intel_hdcp_auth()
849 * DP HDCP Spec mandates the two more reattempt to read R0, incase in intel_hdcp_auth()
888 drm_err(&dev_priv->drm, "[%s:%d] Failed to enable HDCP 1.4 stream enc\n", in intel_hdcp_auth()
892 drm_dbg_kms(&dev_priv->drm, "HDCP 1.4 transcoder: %s stream encrypted\n", in intel_hdcp_auth()
893 transcoder_name(hdcp->stream_transcoder)); in intel_hdcp_auth()
899 drm_dbg_kms(&dev_priv->drm, "HDCP is enabled (no repeater present)\n"); in intel_hdcp_auth()
907 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp_disable() local
909 enum transcoder cpu_transcoder = hdcp->cpu_transcoder; in _intel_hdcp_disable()
913 drm_dbg_kms(&dev_priv->drm, "[%s:%d] HDCP is being disabled...\n", in _intel_hdcp_disable()
916 if (hdcp->shim->stream_encryption) { in _intel_hdcp_disable()
917 ret = hdcp->shim->stream_encryption(connector, false); in _intel_hdcp_disable()
919 drm_err(&dev_priv->drm, "[%s:%d] Failed to disable HDCP 1.4 stream enc\n", in _intel_hdcp_disable()
923 drm_dbg_kms(&dev_priv->drm, "HDCP 1.4 transcoder: %s stream encryption disabled\n", in _intel_hdcp_disable()
924 transcoder_name(hdcp->stream_transcoder)); in _intel_hdcp_disable()
926 * If there are other connectors on this port using HDCP, in _intel_hdcp_disable()
927 * don't disable it until it disabled HDCP encryption for in _intel_hdcp_disable()
934 hdcp->hdcp_encrypted = false; in _intel_hdcp_disable()
940 "Failed to disable HDCP, timeout clearing status\n"); in _intel_hdcp_disable()
949 ret = hdcp->shim->toggle_signalling(dig_port, cpu_transcoder, false); in _intel_hdcp_disable()
951 drm_err(&dev_priv->drm, "Failed to disable HDCP signalling\n"); in _intel_hdcp_disable()
955 drm_dbg_kms(&dev_priv->drm, "HDCP is disabled\n"); in _intel_hdcp_disable()
962 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp_enable() local
965 drm_dbg_kms(&dev_priv->drm, "[%s:%d] HDCP is being enabled...\n", in _intel_hdcp_enable()
969 drm_err(&dev_priv->drm, "HDCP key Load is not possible\n"); in _intel_hdcp_enable()
980 drm_err(&dev_priv->drm, "Could not load HDCP keys, (%d)\n", in _intel_hdcp_enable()
985 /* Incase of authentication failures, HDCP spec expects reauth. */ in _intel_hdcp_enable()
989 hdcp->hdcp_encrypted = true; in _intel_hdcp_enable()
993 drm_dbg_kms(&dev_priv->drm, "HDCP Auth failure (%d)\n", ret); in _intel_hdcp_enable()
995 /* Ensuring HDCP encryption and signalling are stopped. */ in _intel_hdcp_enable()
1000 "HDCP authentication failed (%d tries/%d)\n", tries, ret); in _intel_hdcp_enable()
1004 static struct intel_connector *intel_hdcp_to_connector(struct intel_hdcp *hdcp) in intel_hdcp_to_connector() argument
1006 return container_of(hdcp, struct intel_connector, hdcp); in intel_hdcp_to_connector()
1014 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_update_value() local
1016 drm_WARN_ON(connector->base.dev, !mutex_is_locked(&hdcp->mutex)); in intel_hdcp_update_value()
1018 if (hdcp->value == value) in intel_hdcp_update_value()
1023 if (hdcp->value == DRM_MODE_CONTENT_PROTECTION_ENABLED) { in intel_hdcp_update_value()
1030 hdcp->value = value; in intel_hdcp_update_value()
1033 schedule_work(&hdcp->prop_work); in intel_hdcp_update_value()
1037 /* Implements Part 3 of the HDCP authorization procedure */
1042 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_check_link() local
1047 mutex_lock(&hdcp->mutex); in intel_hdcp_check_link()
1050 cpu_transcoder = hdcp->cpu_transcoder; in intel_hdcp_check_link()
1053 if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_ENABLED || in intel_hdcp_check_link()
1054 !hdcp->hdcp_encrypted) { in intel_hdcp_check_link()
1062 "%s:%d HDCP link stopped encryption,%x\n", in intel_hdcp_check_link()
1072 if (hdcp->shim->check_link(dig_port, connector)) { in intel_hdcp_check_link()
1073 if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) { in intel_hdcp_check_link()
1081 "[%s:%d] HDCP link failed, retrying authentication\n", in intel_hdcp_check_link()
1086 drm_err(&dev_priv->drm, "Failed to disable hdcp (%d)\n", ret); in intel_hdcp_check_link()
1095 drm_err(&dev_priv->drm, "Failed to enable hdcp (%d)\n", ret); in intel_hdcp_check_link()
1104 mutex_unlock(&hdcp->mutex); in intel_hdcp_check_link()
1110 struct intel_hdcp *hdcp = container_of(work, struct intel_hdcp, in intel_hdcp_prop_work() local
1112 struct intel_connector *connector = intel_hdcp_to_connector(hdcp); in intel_hdcp_prop_work()
1116 mutex_lock(&hdcp->mutex); in intel_hdcp_prop_work()
1121 * we're running just after hdcp has been disabled, so just exit in intel_hdcp_prop_work()
1123 if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) in intel_hdcp_prop_work()
1125 hdcp->value); in intel_hdcp_prop_work()
1127 mutex_unlock(&hdcp->mutex); in intel_hdcp_prop_work()
1149 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_prepare_ake_init()
1150 comp = dev_priv->display.hdcp.master; in hdcp2_prepare_ake_init()
1153 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_prepare_ake_init()
1161 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_prepare_ake_init()
1179 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_rx_cert_prepare_km()
1180 comp = dev_priv->display.hdcp.master; in hdcp2_verify_rx_cert_prepare_km()
1183 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_rx_cert_prepare_km()
1193 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_rx_cert_prepare_km()
1207 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_hprime()
1208 comp = dev_priv->display.hdcp.master; in hdcp2_verify_hprime()
1211 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_hprime()
1218 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_hprime()
1233 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_store_pairing_info()
1234 comp = dev_priv->display.hdcp.master; in hdcp2_store_pairing_info()
1237 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_store_pairing_info()
1245 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_store_pairing_info()
1260 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_prepare_lc_init()
1261 comp = dev_priv->display.hdcp.master; in hdcp2_prepare_lc_init()
1264 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_prepare_lc_init()
1272 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_prepare_lc_init()
1287 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_lprime()
1288 comp = dev_priv->display.hdcp.master; in hdcp2_verify_lprime()
1291 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_lprime()
1299 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_lprime()
1313 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_prepare_skey()
1314 comp = dev_priv->display.hdcp.master; in hdcp2_prepare_skey()
1317 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_prepare_skey()
1325 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_prepare_skey()
1342 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_rep_topology_prepare_ack()
1343 comp = dev_priv->display.hdcp.master; in hdcp2_verify_rep_topology_prepare_ack()
1346 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_rep_topology_prepare_ack()
1356 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_rep_topology_prepare_ack()
1371 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_mprime()
1372 comp = dev_priv->display.hdcp.master; in hdcp2_verify_mprime()
1375 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_mprime()
1382 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_verify_mprime()
1395 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_authenticate_port()
1396 comp = dev_priv->display.hdcp.master; in hdcp2_authenticate_port()
1399 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_authenticate_port()
1405 drm_dbg_kms(&dev_priv->drm, "Enable hdcp auth failed. %d\n", in hdcp2_authenticate_port()
1407 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_authenticate_port()
1419 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_close_mei_session()
1420 comp = dev_priv->display.hdcp.master; in hdcp2_close_mei_session()
1423 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_close_mei_session()
1429 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in hdcp2_close_mei_session()
1444 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_authentication_key_exchange() local
1452 const struct intel_hdcp_shim *shim = hdcp->shim; in hdcp2_authentication_key_exchange()
1457 hdcp->seq_num_v = 0; in hdcp2_authentication_key_exchange()
1458 hdcp->seq_num_m = 0; in hdcp2_authentication_key_exchange()
1479 hdcp->is_repeater = HDCP_2_2_RX_REPEATER(msgs.send_cert.rx_caps[2]); in hdcp2_authentication_key_exchange()
1493 &hdcp->is_paired, in hdcp2_authentication_key_exchange()
1511 if (!hdcp->is_paired) { in hdcp2_authentication_key_exchange()
1523 hdcp->is_paired = true; in hdcp2_authentication_key_exchange()
1532 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_locality_check() local
1537 const struct intel_hdcp_shim *shim = hdcp->shim; in hdcp2_locality_check()
1568 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_session_key_exchange() local
1576 ret = hdcp->shim->write_2_2_msg(dig_port, &send_eks, in hdcp2_session_key_exchange()
1589 struct intel_hdcp *hdcp = &connector->hdcp; in _hdcp2_propagate_stream_management_info() local
1594 const struct intel_hdcp_shim *shim = hdcp->shim; in _hdcp2_propagate_stream_management_info()
1597 if (connector->hdcp.seq_num_m > HDCP_2_2_SEQ_NUM_MAX) in _hdcp2_propagate_stream_management_info()
1602 drm_hdcp_cpu_to_be24(msgs.stream_manage.seq_num_m, hdcp->seq_num_m); in _hdcp2_propagate_stream_management_info()
1624 data->seq_num_m = hdcp->seq_num_m; in _hdcp2_propagate_stream_management_info()
1629 hdcp->seq_num_m++; in _hdcp2_propagate_stream_management_info()
1639 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_authenticate_repeater_topology() local
1644 const struct intel_hdcp_shim *shim = hdcp->shim; in hdcp2_authenticate_repeater_topology()
1664 * device that is only HDCP 1.x or Legacy HDCP 2.0/2.1 compliant. in hdcp2_authenticate_repeater_topology()
1674 if (!hdcp->hdcp2_encrypted && seq_num_v) { in hdcp2_authenticate_repeater_topology()
1680 if (seq_num_v < hdcp->seq_num_v) { in hdcp2_authenticate_repeater_topology()
1701 hdcp->seq_num_v = seq_num_v; in hdcp2_authenticate_repeater_topology()
1714 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_authenticate_sink() local
1715 const struct intel_hdcp_shim *shim = hdcp->shim; in hdcp2_authenticate_sink()
1739 hdcp->is_repeater, in hdcp2_authenticate_sink()
1740 hdcp->content_type); in hdcp2_authenticate_sink()
1745 if (hdcp->is_repeater) { in hdcp2_authenticate_sink()
1762 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_enable_stream_encryption() local
1763 enum transcoder cpu_transcoder = hdcp->cpu_transcoder; in hdcp2_enable_stream_encryption()
1769 drm_err(&dev_priv->drm, "[%s:%d] HDCP 2.2 Link is not encrypted\n", in hdcp2_enable_stream_encryption()
1775 if (hdcp->shim->stream_2_2_encryption) { in hdcp2_enable_stream_encryption()
1776 ret = hdcp->shim->stream_2_2_encryption(connector, true); in hdcp2_enable_stream_encryption()
1778 drm_err(&dev_priv->drm, "[%s:%d] Failed to enable HDCP 2.2 stream enc\n", in hdcp2_enable_stream_encryption()
1782 drm_dbg_kms(&dev_priv->drm, "HDCP 2.2 transcoder: %s stream encrypted\n", in hdcp2_enable_stream_encryption()
1783 transcoder_name(hdcp->stream_transcoder)); in hdcp2_enable_stream_encryption()
1802 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_enable_encryption() local
1804 enum transcoder cpu_transcoder = hdcp->cpu_transcoder; in hdcp2_enable_encryption()
1810 if (hdcp->shim->toggle_signalling) { in hdcp2_enable_encryption()
1811 ret = hdcp->shim->toggle_signalling(dig_port, cpu_transcoder, in hdcp2_enable_encryption()
1815 "Failed to enable HDCP signalling. %d\n", in hdcp2_enable_encryption()
1843 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_disable_encryption() local
1845 enum transcoder cpu_transcoder = hdcp->cpu_transcoder; in hdcp2_disable_encryption()
1862 if (hdcp->shim->toggle_signalling) { in hdcp2_disable_encryption()
1863 ret = hdcp->shim->toggle_signalling(dig_port, cpu_transcoder, in hdcp2_disable_encryption()
1867 "Failed to disable HDCP signalling. %d\n", in hdcp2_disable_encryption()
1882 if (!connector->hdcp.is_repeater) in hdcp2_propagate_stream_management_info()
1891 if (connector->hdcp.seq_num_m > HDCP_2_2_SEQ_NUM_MAX) { in hdcp2_propagate_stream_management_info()
1937 /* Clearing the mei hdcp session */ in hdcp2_authenticate_and_encrypt()
1968 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp2_enable() local
1973 hdcp->content_type); in _intel_hdcp2_enable()
1978 hdcp->content_type, ret); in _intel_hdcp2_enable()
1984 hdcp->content_type); in _intel_hdcp2_enable()
1986 hdcp->hdcp2_encrypted = true; in _intel_hdcp2_enable()
1996 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp2_disable() local
2002 if (hdcp->shim->stream_2_2_encryption) { in _intel_hdcp2_disable()
2003 ret = hdcp->shim->stream_2_2_encryption(connector, false); in _intel_hdcp2_disable()
2005 drm_err(&i915->drm, "[%s:%d] Failed to disable HDCP 2.2 stream enc\n", in _intel_hdcp2_disable()
2009 drm_dbg_kms(&i915->drm, "HDCP 2.2 transcoder: %s stream encryption disabled\n", in _intel_hdcp2_disable()
2010 transcoder_name(hdcp->stream_transcoder)); in _intel_hdcp2_disable()
2021 connector->hdcp.hdcp2_encrypted = false; in _intel_hdcp2_disable()
2033 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp2_check_link() local
2038 mutex_lock(&hdcp->mutex); in intel_hdcp2_check_link()
2040 cpu_transcoder = hdcp->cpu_transcoder; in intel_hdcp2_check_link()
2043 if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_ENABLED || in intel_hdcp2_check_link()
2044 !hdcp->hdcp2_encrypted) { in intel_hdcp2_check_link()
2062 ret = hdcp->shim->check_2_2_link(dig_port, connector); in intel_hdcp2_check_link()
2064 if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) { in intel_hdcp2_check_link()
2073 if (hdcp->value == DRM_MODE_CONTENT_PROTECTION_UNDESIRED) in intel_hdcp2_check_link()
2119 mutex_unlock(&hdcp->mutex); in intel_hdcp2_check_link()
2125 struct intel_hdcp *hdcp = container_of(to_delayed_work(work), in intel_hdcp_check_work() local
2128 struct intel_connector *connector = intel_hdcp_to_connector(hdcp); in intel_hdcp_check_work()
2134 schedule_delayed_work(&hdcp->check_work, in intel_hdcp_check_work()
2137 schedule_delayed_work(&hdcp->check_work, in intel_hdcp_check_work()
2146 drm_dbg(&dev_priv->drm, "I915 HDCP comp bind\n"); in i915_hdcp_component_bind()
2147 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in i915_hdcp_component_bind()
2148 dev_priv->display.hdcp.master = (struct i915_hdcp_comp_master *)data; in i915_hdcp_component_bind()
2149 dev_priv->display.hdcp.master->mei_dev = mei_kdev; in i915_hdcp_component_bind()
2150 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in i915_hdcp_component_bind()
2160 drm_dbg(&dev_priv->drm, "I915 HDCP comp unbind\n"); in i915_hdcp_component_unbind()
2161 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in i915_hdcp_component_unbind()
2162 dev_priv->display.hdcp.master = NULL; in i915_hdcp_component_unbind()
2163 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in i915_hdcp_component_unbind()
2188 default: /* eDP, DSI TRANSCODERS are non HDCP capable */ in intel_get_mei_fw_tc()
2199 struct intel_hdcp *hdcp = &connector->hdcp; in initialize_hdcp_port_data() local
2231 data->streams[0].stream_type = hdcp->content_type; in initialize_hdcp_port_data()
2254 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in intel_hdcp_component_init()
2255 drm_WARN_ON(&dev_priv->drm, dev_priv->display.hdcp.comp_added); in intel_hdcp_component_init()
2257 dev_priv->display.hdcp.comp_added = true; in intel_hdcp_component_init()
2258 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in intel_hdcp_component_init()
2264 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in intel_hdcp_component_init()
2265 dev_priv->display.hdcp.comp_added = false; in intel_hdcp_component_init()
2266 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in intel_hdcp_component_init()
2276 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp2_init() local
2281 drm_dbg_kms(&i915->drm, "Mei hdcp data init failed\n"); in intel_hdcp2_init()
2285 hdcp->hdcp2_supported = true; in intel_hdcp2_init()
2293 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_init() local
2304 hdcp->hdcp2_supported); in intel_hdcp_init()
2306 hdcp->hdcp2_supported = false; in intel_hdcp_init()
2311 hdcp->shim = shim; in intel_hdcp_init()
2312 mutex_init(&hdcp->mutex); in intel_hdcp_init()
2313 INIT_DELAYED_WORK(&hdcp->check_work, intel_hdcp_check_work); in intel_hdcp_init()
2314 INIT_WORK(&hdcp->prop_work, intel_hdcp_prop_work); in intel_hdcp_init()
2315 init_waitqueue_head(&hdcp->cp_irq_queue); in intel_hdcp_init()
2325 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_enable() local
2329 if (!hdcp->shim) in intel_hdcp_enable()
2338 mutex_lock(&hdcp->mutex); in intel_hdcp_enable()
2341 hdcp->value == DRM_MODE_CONTENT_PROTECTION_ENABLED); in intel_hdcp_enable()
2342 hdcp->content_type = content_type; in intel_hdcp_enable()
2345 hdcp->cpu_transcoder = pipe_config->mst_master_transcoder; in intel_hdcp_enable()
2346 hdcp->stream_transcoder = pipe_config->cpu_transcoder; in intel_hdcp_enable()
2348 hdcp->cpu_transcoder = pipe_config->cpu_transcoder; in intel_hdcp_enable()
2349 hdcp->stream_transcoder = INVALID_TRANSCODER; in intel_hdcp_enable()
2353 dig_port->hdcp_port_data.fw_tc = intel_get_mei_fw_tc(hdcp->cpu_transcoder); in intel_hdcp_enable()
2370 hdcp->content_type != DRM_MODE_HDCP_CONTENT_TYPE1) { in intel_hdcp_enable()
2375 schedule_delayed_work(&hdcp->check_work, check_link_interval); in intel_hdcp_enable()
2382 mutex_unlock(&hdcp->mutex); in intel_hdcp_enable()
2389 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_disable() local
2392 if (!hdcp->shim) in intel_hdcp_disable()
2395 mutex_lock(&hdcp->mutex); in intel_hdcp_disable()
2398 if (hdcp->value == DRM_MODE_CONTENT_PROTECTION_UNDESIRED) in intel_hdcp_disable()
2403 if (hdcp->hdcp2_encrypted) in intel_hdcp_disable()
2405 else if (hdcp->hdcp_encrypted) in intel_hdcp_disable()
2410 mutex_unlock(&hdcp->mutex); in intel_hdcp_disable()
2411 cancel_delayed_work_sync(&hdcp->check_work); in intel_hdcp_disable()
2422 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_update_pipe() local
2425 if (!connector->hdcp.shim) in intel_hdcp_update_pipe()
2429 (conn_state->hdcp_content_type != hdcp->content_type && in intel_hdcp_update_pipe()
2434 * During the HDCP encryption session if Type change is requested, in intel_hdcp_update_pipe()
2435 * disable the HDCP and reenable it with new TYPE value. in intel_hdcp_update_pipe()
2443 * Mark the hdcp state as DESIRED after the hdcp disable of type in intel_hdcp_update_pipe()
2447 mutex_lock(&hdcp->mutex); in intel_hdcp_update_pipe()
2448 hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED; in intel_hdcp_update_pipe()
2450 schedule_work(&hdcp->prop_work); in intel_hdcp_update_pipe()
2451 mutex_unlock(&hdcp->mutex); in intel_hdcp_update_pipe()
2456 mutex_lock(&hdcp->mutex); in intel_hdcp_update_pipe()
2457 /* Avoid enabling hdcp, if it already ENABLED */ in intel_hdcp_update_pipe()
2459 hdcp->value != DRM_MODE_CONTENT_PROTECTION_ENABLED; in intel_hdcp_update_pipe()
2460 mutex_unlock(&hdcp->mutex); in intel_hdcp_update_pipe()
2462 * If HDCP already ENABLED and CP property is DESIRED, schedule in intel_hdcp_update_pipe()
2467 schedule_work(&hdcp->prop_work); in intel_hdcp_update_pipe()
2479 mutex_lock(&dev_priv->display.hdcp.comp_mutex); in intel_hdcp_component_fini()
2480 if (!dev_priv->display.hdcp.comp_added) { in intel_hdcp_component_fini()
2481 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in intel_hdcp_component_fini()
2485 dev_priv->display.hdcp.comp_added = false; in intel_hdcp_component_fini()
2486 mutex_unlock(&dev_priv->display.hdcp.comp_mutex); in intel_hdcp_component_fini()
2493 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_cleanup() local
2495 if (!hdcp->shim) in intel_hdcp_cleanup()
2500 * off another HDCP enable, which would re-spawn the workers. in intel_hdcp_cleanup()
2509 cancel_delayed_work_sync(&hdcp->check_work); in intel_hdcp_cleanup()
2520 drm_WARN_ON(connector->base.dev, work_pending(&hdcp->prop_work)); in intel_hdcp_cleanup()
2522 mutex_lock(&hdcp->mutex); in intel_hdcp_cleanup()
2523 hdcp->shim = NULL; in intel_hdcp_cleanup()
2524 mutex_unlock(&hdcp->mutex); in intel_hdcp_cleanup()
2549 * Fix the HDCP uapi content protection state in case of modeset. in intel_hdcp_atomic_check()
2550 * FIXME: As per HDCP content protection property uapi doc, an uevent() in intel_hdcp_atomic_check()
2560 * Nothing to do if the state didn't change, or HDCP was activated since in intel_hdcp_atomic_check()
2561 * the last commit. And also no change in hdcp content type. in intel_hdcp_atomic_check()
2574 /* Handles the CP_IRQ raised from the DP HDCP sink */
2577 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_handle_cp_irq() local
2579 if (!hdcp->shim) in intel_hdcp_handle_cp_irq()
2582 atomic_inc(&connector->hdcp.cp_irq_count); in intel_hdcp_handle_cp_irq()
2583 wake_up_all(&connector->hdcp.cp_irq_queue); in intel_hdcp_handle_cp_irq()
2585 schedule_delayed_work(&hdcp->check_work, 0); in intel_hdcp_handle_cp_irq()