Lines Matching refs:hdcp

97 	struct intel_hdcp *hdcp = &connector->hdcp;  in intel_hdcp_prepare_streams()  local
100 data->streams[0].stream_type = hdcp->content_type; in intel_hdcp_prepare_streams()
146 const struct intel_hdcp_shim *shim = connector->hdcp.shim; in intel_hdcp_capable()
168 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp2_capable() local
172 if (!hdcp->hdcp2_supported) in intel_hdcp2_capable()
188 mutex_lock(&i915->display.hdcp.hdcp_mutex); in intel_hdcp2_capable()
189 if (!i915->display.hdcp.comp_added || !i915->display.hdcp.arbiter) { in intel_hdcp2_capable()
190 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in intel_hdcp2_capable()
193 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in intel_hdcp2_capable()
196 hdcp->shim->hdcp_2_2_capable(dig_port, &capable); in intel_hdcp2_capable()
385 enum transcoder cpu_transcoder = connector->hdcp.cpu_transcoder; in intel_hdcp_validate_v_prime()
627 const struct intel_hdcp_shim *shim = connector->hdcp.shim; in intel_hdcp_auth_downstream()
710 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_auth() local
711 const struct intel_hdcp_shim *shim = hdcp->shim; in intel_hdcp_auth()
712 enum transcoder cpu_transcoder = connector->hdcp.cpu_transcoder; in intel_hdcp_auth()
868 transcoder_name(hdcp->stream_transcoder)); in intel_hdcp_auth()
882 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp_disable() local
884 enum transcoder cpu_transcoder = hdcp->cpu_transcoder; in _intel_hdcp_disable()
891 if (hdcp->shim->stream_encryption) { in _intel_hdcp_disable()
892 ret = hdcp->shim->stream_encryption(connector, false); in _intel_hdcp_disable()
899 transcoder_name(hdcp->stream_transcoder)); in _intel_hdcp_disable()
909 hdcp->hdcp_encrypted = false; in _intel_hdcp_disable()
923 ret = hdcp->shim->toggle_signalling(dig_port, cpu_transcoder, false); in _intel_hdcp_disable()
936 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp_enable() local
963 hdcp->hdcp_encrypted = true; in _intel_hdcp_enable()
978 static struct intel_connector *intel_hdcp_to_connector(struct intel_hdcp *hdcp) in intel_hdcp_to_connector() argument
980 return container_of(hdcp, struct intel_connector, hdcp); in intel_hdcp_to_connector()
988 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_update_value() local
991 drm_WARN_ON(connector->base.dev, !mutex_is_locked(&hdcp->mutex)); in intel_hdcp_update_value()
993 if (hdcp->value == value) in intel_hdcp_update_value()
998 if (hdcp->value == DRM_MODE_CONTENT_PROTECTION_ENABLED) { in intel_hdcp_update_value()
1005 hdcp->value = value; in intel_hdcp_update_value()
1008 queue_work(i915->unordered_wq, &hdcp->prop_work); in intel_hdcp_update_value()
1017 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_check_link() local
1022 mutex_lock(&hdcp->mutex); in intel_hdcp_check_link()
1025 cpu_transcoder = hdcp->cpu_transcoder; in intel_hdcp_check_link()
1028 if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_ENABLED || in intel_hdcp_check_link()
1029 !hdcp->hdcp_encrypted) { in intel_hdcp_check_link()
1047 if (hdcp->shim->check_link(dig_port, connector)) { in intel_hdcp_check_link()
1048 if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) { in intel_hdcp_check_link()
1079 mutex_unlock(&hdcp->mutex); in intel_hdcp_check_link()
1085 struct intel_hdcp *hdcp = container_of(work, struct intel_hdcp, in intel_hdcp_prop_work() local
1087 struct intel_connector *connector = intel_hdcp_to_connector(hdcp); in intel_hdcp_prop_work()
1091 mutex_lock(&hdcp->mutex); in intel_hdcp_prop_work()
1098 if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) in intel_hdcp_prop_work()
1100 hdcp->value); in intel_hdcp_prop_work()
1102 mutex_unlock(&hdcp->mutex); in intel_hdcp_prop_work()
1124 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_prepare_ake_init()
1125 arbiter = i915->display.hdcp.arbiter; in hdcp2_prepare_ake_init()
1128 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_prepare_ake_init()
1136 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_prepare_ake_init()
1154 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_rx_cert_prepare_km()
1155 arbiter = i915->display.hdcp.arbiter; in hdcp2_verify_rx_cert_prepare_km()
1158 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_rx_cert_prepare_km()
1168 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_rx_cert_prepare_km()
1182 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_hprime()
1183 arbiter = i915->display.hdcp.arbiter; in hdcp2_verify_hprime()
1186 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_hprime()
1193 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_hprime()
1208 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_store_pairing_info()
1209 arbiter = i915->display.hdcp.arbiter; in hdcp2_store_pairing_info()
1212 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_store_pairing_info()
1220 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_store_pairing_info()
1235 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_prepare_lc_init()
1236 arbiter = i915->display.hdcp.arbiter; in hdcp2_prepare_lc_init()
1239 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_prepare_lc_init()
1247 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_prepare_lc_init()
1262 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_lprime()
1263 arbiter = i915->display.hdcp.arbiter; in hdcp2_verify_lprime()
1266 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_lprime()
1274 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_lprime()
1288 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_prepare_skey()
1289 arbiter = i915->display.hdcp.arbiter; in hdcp2_prepare_skey()
1292 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_prepare_skey()
1300 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_prepare_skey()
1317 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_rep_topology_prepare_ack()
1318 arbiter = i915->display.hdcp.arbiter; in hdcp2_verify_rep_topology_prepare_ack()
1321 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_rep_topology_prepare_ack()
1332 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_rep_topology_prepare_ack()
1347 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_mprime()
1348 arbiter = i915->display.hdcp.arbiter; in hdcp2_verify_mprime()
1351 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_mprime()
1358 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_verify_mprime()
1371 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_authenticate_port()
1372 arbiter = i915->display.hdcp.arbiter; in hdcp2_authenticate_port()
1375 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_authenticate_port()
1383 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_authenticate_port()
1395 mutex_lock(&i915->display.hdcp.hdcp_mutex); in hdcp2_close_session()
1396 arbiter = i915->display.hdcp.arbiter; in hdcp2_close_session()
1399 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_close_session()
1405 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in hdcp2_close_session()
1420 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_authentication_key_exchange() local
1428 const struct intel_hdcp_shim *shim = hdcp->shim; in hdcp2_authentication_key_exchange()
1433 hdcp->seq_num_v = 0; in hdcp2_authentication_key_exchange()
1434 hdcp->seq_num_m = 0; in hdcp2_authentication_key_exchange()
1455 hdcp->is_repeater = HDCP_2_2_RX_REPEATER(msgs.send_cert.rx_caps[2]); in hdcp2_authentication_key_exchange()
1469 &hdcp->is_paired, in hdcp2_authentication_key_exchange()
1487 if (!hdcp->is_paired) { in hdcp2_authentication_key_exchange()
1499 hdcp->is_paired = true; in hdcp2_authentication_key_exchange()
1508 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_locality_check() local
1513 const struct intel_hdcp_shim *shim = hdcp->shim; in hdcp2_locality_check()
1544 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_session_key_exchange() local
1552 ret = hdcp->shim->write_2_2_msg(dig_port, &send_eks, in hdcp2_session_key_exchange()
1565 struct intel_hdcp *hdcp = &connector->hdcp; in _hdcp2_propagate_stream_management_info() local
1570 const struct intel_hdcp_shim *shim = hdcp->shim; in _hdcp2_propagate_stream_management_info()
1573 if (connector->hdcp.seq_num_m > HDCP_2_2_SEQ_NUM_MAX) in _hdcp2_propagate_stream_management_info()
1578 drm_hdcp_cpu_to_be24(msgs.stream_manage.seq_num_m, hdcp->seq_num_m); in _hdcp2_propagate_stream_management_info()
1600 data->seq_num_m = hdcp->seq_num_m; in _hdcp2_propagate_stream_management_info()
1605 hdcp->seq_num_m++; in _hdcp2_propagate_stream_management_info()
1615 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_authenticate_repeater_topology() local
1620 const struct intel_hdcp_shim *shim = hdcp->shim; in hdcp2_authenticate_repeater_topology()
1650 if (!hdcp->hdcp2_encrypted && seq_num_v) { in hdcp2_authenticate_repeater_topology()
1656 if (seq_num_v < hdcp->seq_num_v) { in hdcp2_authenticate_repeater_topology()
1677 hdcp->seq_num_v = seq_num_v; in hdcp2_authenticate_repeater_topology()
1690 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_authenticate_sink() local
1691 const struct intel_hdcp_shim *shim = hdcp->shim; in hdcp2_authenticate_sink()
1715 hdcp->is_repeater, in hdcp2_authenticate_sink()
1716 hdcp->content_type); in hdcp2_authenticate_sink()
1721 if (hdcp->is_repeater) { in hdcp2_authenticate_sink()
1738 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_enable_stream_encryption() local
1739 enum transcoder cpu_transcoder = hdcp->cpu_transcoder; in hdcp2_enable_stream_encryption()
1751 if (hdcp->shim->stream_2_2_encryption) { in hdcp2_enable_stream_encryption()
1752 ret = hdcp->shim->stream_2_2_encryption(connector, true); in hdcp2_enable_stream_encryption()
1759 transcoder_name(hdcp->stream_transcoder)); in hdcp2_enable_stream_encryption()
1778 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_enable_encryption() local
1780 enum transcoder cpu_transcoder = hdcp->cpu_transcoder; in hdcp2_enable_encryption()
1786 if (hdcp->shim->toggle_signalling) { in hdcp2_enable_encryption()
1787 ret = hdcp->shim->toggle_signalling(dig_port, cpu_transcoder, in hdcp2_enable_encryption()
1817 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_disable_encryption() local
1819 enum transcoder cpu_transcoder = hdcp->cpu_transcoder; in hdcp2_disable_encryption()
1836 if (hdcp->shim->toggle_signalling) { in hdcp2_disable_encryption()
1837 ret = hdcp->shim->toggle_signalling(dig_port, cpu_transcoder, in hdcp2_disable_encryption()
1856 if (!connector->hdcp.is_repeater) in hdcp2_propagate_stream_management_info()
1865 if (connector->hdcp.seq_num_m > HDCP_2_2_SEQ_NUM_MAX) { in hdcp2_propagate_stream_management_info()
1936 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp2_enable() local
1941 hdcp->content_type); in _intel_hdcp2_enable()
1946 hdcp->content_type, ret); in _intel_hdcp2_enable()
1952 hdcp->content_type); in _intel_hdcp2_enable()
1954 hdcp->hdcp2_encrypted = true; in _intel_hdcp2_enable()
1964 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp2_disable() local
1970 if (hdcp->shim->stream_2_2_encryption) { in _intel_hdcp2_disable()
1971 ret = hdcp->shim->stream_2_2_encryption(connector, false); in _intel_hdcp2_disable()
1978 transcoder_name(hdcp->stream_transcoder)); in _intel_hdcp2_disable()
1989 connector->hdcp.hdcp2_encrypted = false; in _intel_hdcp2_disable()
2001 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp2_check_link() local
2006 mutex_lock(&hdcp->mutex); in intel_hdcp2_check_link()
2008 cpu_transcoder = hdcp->cpu_transcoder; in intel_hdcp2_check_link()
2011 if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_ENABLED || in intel_hdcp2_check_link()
2012 !hdcp->hdcp2_encrypted) { in intel_hdcp2_check_link()
2030 ret = hdcp->shim->check_2_2_link(dig_port, connector); in intel_hdcp2_check_link()
2032 if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) { in intel_hdcp2_check_link()
2041 if (hdcp->value == DRM_MODE_CONTENT_PROTECTION_UNDESIRED) in intel_hdcp2_check_link()
2087 mutex_unlock(&hdcp->mutex); in intel_hdcp2_check_link()
2093 struct intel_hdcp *hdcp = container_of(to_delayed_work(work), in intel_hdcp_check_work() local
2096 struct intel_connector *connector = intel_hdcp_to_connector(hdcp); in intel_hdcp_check_work()
2103 queue_delayed_work(i915->unordered_wq, &hdcp->check_work, in intel_hdcp_check_work()
2106 queue_delayed_work(i915->unordered_wq, &hdcp->check_work, in intel_hdcp_check_work()
2116 mutex_lock(&i915->display.hdcp.hdcp_mutex); in i915_hdcp_component_bind()
2117 i915->display.hdcp.arbiter = (struct i915_hdcp_arbiter *)data; in i915_hdcp_component_bind()
2118 i915->display.hdcp.arbiter->hdcp_dev = mei_kdev; in i915_hdcp_component_bind()
2119 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in i915_hdcp_component_bind()
2130 mutex_lock(&i915->display.hdcp.hdcp_mutex); in i915_hdcp_component_unbind()
2131 i915->display.hdcp.arbiter = NULL; in i915_hdcp_component_unbind()
2132 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in i915_hdcp_component_unbind()
2222 mutex_lock(&i915->display.hdcp.hdcp_mutex); in intel_hdcp_component_init()
2223 drm_WARN_ON(&i915->drm, i915->display.hdcp.comp_added); in intel_hdcp_component_init()
2225 i915->display.hdcp.comp_added = true; in intel_hdcp_component_init()
2226 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in intel_hdcp_component_init()
2236 mutex_lock(&i915->display.hdcp.hdcp_mutex); in intel_hdcp_component_init()
2237 i915->display.hdcp.comp_added = false; in intel_hdcp_component_init()
2238 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in intel_hdcp_component_init()
2248 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp2_init() local
2257 hdcp->hdcp2_supported = true; in intel_hdcp2_init()
2265 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_init() local
2276 hdcp->hdcp2_supported); in intel_hdcp_init()
2278 hdcp->hdcp2_supported = false; in intel_hdcp_init()
2283 hdcp->shim = shim; in intel_hdcp_init()
2284 mutex_init(&hdcp->mutex); in intel_hdcp_init()
2285 INIT_DELAYED_WORK(&hdcp->check_work, intel_hdcp_check_work); in intel_hdcp_init()
2286 INIT_WORK(&hdcp->prop_work, intel_hdcp_prop_work); in intel_hdcp_init()
2287 init_waitqueue_head(&hdcp->cp_irq_queue); in intel_hdcp_init()
2347 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_enable() local
2351 if (!hdcp->shim) in intel_hdcp_enable()
2360 mutex_lock(&hdcp->mutex); in intel_hdcp_enable()
2363 hdcp->value == DRM_MODE_CONTENT_PROTECTION_ENABLED); in intel_hdcp_enable()
2364 hdcp->content_type = (u8)conn_state->hdcp_content_type; in intel_hdcp_enable()
2367 hdcp->cpu_transcoder = pipe_config->mst_master_transcoder; in intel_hdcp_enable()
2368 hdcp->stream_transcoder = pipe_config->cpu_transcoder; in intel_hdcp_enable()
2370 hdcp->cpu_transcoder = pipe_config->cpu_transcoder; in intel_hdcp_enable()
2371 hdcp->stream_transcoder = INVALID_TRANSCODER; in intel_hdcp_enable()
2376 intel_get_hdcp_transcoder(hdcp->cpu_transcoder); in intel_hdcp_enable()
2401 hdcp->content_type != DRM_MODE_HDCP_CONTENT_TYPE1) { in intel_hdcp_enable()
2406 queue_delayed_work(i915->unordered_wq, &hdcp->check_work, in intel_hdcp_enable()
2414 mutex_unlock(&hdcp->mutex); in intel_hdcp_enable()
2421 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_disable() local
2424 if (!hdcp->shim) in intel_hdcp_disable()
2427 mutex_lock(&hdcp->mutex); in intel_hdcp_disable()
2430 if (hdcp->value == DRM_MODE_CONTENT_PROTECTION_UNDESIRED) in intel_hdcp_disable()
2435 if (hdcp->hdcp2_encrypted) in intel_hdcp_disable()
2437 else if (hdcp->hdcp_encrypted) in intel_hdcp_disable()
2442 mutex_unlock(&hdcp->mutex); in intel_hdcp_disable()
2443 cancel_delayed_work_sync(&hdcp->check_work); in intel_hdcp_disable()
2454 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_update_pipe() local
2458 if (!connector->hdcp.shim) in intel_hdcp_update_pipe()
2462 (conn_state->hdcp_content_type != hdcp->content_type && in intel_hdcp_update_pipe()
2480 mutex_lock(&hdcp->mutex); in intel_hdcp_update_pipe()
2481 hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED; in intel_hdcp_update_pipe()
2483 queue_work(i915->unordered_wq, &hdcp->prop_work); in intel_hdcp_update_pipe()
2484 mutex_unlock(&hdcp->mutex); in intel_hdcp_update_pipe()
2489 mutex_lock(&hdcp->mutex); in intel_hdcp_update_pipe()
2492 hdcp->value != DRM_MODE_CONTENT_PROTECTION_ENABLED; in intel_hdcp_update_pipe()
2493 mutex_unlock(&hdcp->mutex); in intel_hdcp_update_pipe()
2500 queue_work(i915->unordered_wq, &hdcp->prop_work); in intel_hdcp_update_pipe()
2510 mutex_lock(&i915->display.hdcp.hdcp_mutex); in intel_hdcp_component_fini()
2511 if (!i915->display.hdcp.comp_added) { in intel_hdcp_component_fini()
2512 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in intel_hdcp_component_fini()
2516 i915->display.hdcp.comp_added = false; in intel_hdcp_component_fini()
2517 mutex_unlock(&i915->display.hdcp.hdcp_mutex); in intel_hdcp_component_fini()
2527 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_cleanup() local
2529 if (!hdcp->shim) in intel_hdcp_cleanup()
2543 cancel_delayed_work_sync(&hdcp->check_work); in intel_hdcp_cleanup()
2554 drm_WARN_ON(connector->base.dev, work_pending(&hdcp->prop_work)); in intel_hdcp_cleanup()
2556 mutex_lock(&hdcp->mutex); in intel_hdcp_cleanup()
2557 hdcp->shim = NULL; in intel_hdcp_cleanup()
2558 mutex_unlock(&hdcp->mutex); in intel_hdcp_cleanup()
2611 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_handle_cp_irq() local
2614 if (!hdcp->shim) in intel_hdcp_handle_cp_irq()
2617 atomic_inc(&connector->hdcp.cp_irq_count); in intel_hdcp_handle_cp_irq()
2618 wake_up_all(&connector->hdcp.cp_irq_queue); in intel_hdcp_handle_cp_irq()
2620 queue_delayed_work(i915->unordered_wq, &hdcp->check_work, 0); in intel_hdcp_handle_cp_irq()