Lines Matching full:connector

57 			      struct intel_connector *connector)  in intel_conn_to_vcpi()  argument
65 if (!connector->port) in intel_conn_to_vcpi()
67 mgr = connector->port->mgr; in intel_conn_to_vcpi()
71 payload = drm_atomic_get_mst_payload_state(mst_state, connector->port); in intel_conn_to_vcpi()
100 struct intel_connector *connector; in intel_hdcp_required_content_stream() local
115 for_each_intel_connector_iter(connector, &conn_iter) { in intel_hdcp_required_content_stream()
116 if (connector->base.status == connector_status_disconnected) in intel_hdcp_required_content_stream()
119 if (!intel_encoder_is_mst(intel_attached_encoder(connector))) in intel_hdcp_required_content_stream()
122 conn_dig_port = intel_attached_dig_port(connector); in intel_hdcp_required_content_stream()
127 intel_conn_to_vcpi(state, connector); in intel_hdcp_required_content_stream()
151 struct intel_connector *connector) in intel_hdcp_prepare_streams() argument
153 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in intel_hdcp_prepare_streams()
155 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_prepare_streams()
157 if (intel_encoder_is_mst(intel_attached_encoder(connector))) in intel_hdcp_prepare_streams()
204 bool intel_hdcp_get_capability(struct intel_connector *connector) in intel_hdcp_get_capability() argument
207 const struct intel_hdcp_shim *shim = connector->hdcp.shim; in intel_hdcp_get_capability()
211 if (!intel_attached_encoder(connector)) in intel_hdcp_get_capability()
214 dig_port = intel_attached_dig_port(connector); in intel_hdcp_get_capability()
233 static bool intel_hdcp2_prerequisite(struct intel_connector *connector) in intel_hdcp2_prerequisite() argument
235 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp2_prerequisite()
236 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp2_prerequisite()
260 bool intel_hdcp2_get_capability(struct intel_connector *connector) in intel_hdcp2_get_capability() argument
262 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp2_get_capability()
265 if (!intel_hdcp2_prerequisite(connector)) in intel_hdcp2_get_capability()
269 hdcp->shim->hdcp_2_2_get_capability(connector, &capable); in intel_hdcp2_get_capability()
274 void intel_hdcp_get_remote_capability(struct intel_connector *connector, in intel_hdcp_get_remote_capability() argument
278 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_get_remote_capability()
283 hdcp->shim->get_remote_hdcp_capability(connector, hdcp_capable, in intel_hdcp_get_remote_capability()
286 if (!intel_hdcp2_prerequisite(connector)) in intel_hdcp_get_remote_capability()
468 int intel_hdcp_validate_v_prime(struct intel_connector *connector, in intel_hdcp_validate_v_prime() argument
472 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in intel_hdcp_validate_v_prime()
473 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp_validate_v_prime()
474 enum transcoder cpu_transcoder = connector->hdcp.cpu_transcoder; in intel_hdcp_validate_v_prime()
712 int intel_hdcp_auth_downstream(struct intel_connector *connector) in intel_hdcp_auth_downstream() argument
714 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in intel_hdcp_auth_downstream()
715 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp_auth_downstream()
716 const struct intel_hdcp_shim *shim = connector->hdcp.shim; in intel_hdcp_auth_downstream()
773 ret = intel_hdcp_validate_v_prime(connector, shim, in intel_hdcp_auth_downstream()
795 static int intel_hdcp_auth(struct intel_connector *connector) in intel_hdcp_auth() argument
797 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in intel_hdcp_auth()
798 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp_auth()
799 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_auth()
801 enum transcoder cpu_transcoder = connector->hdcp.cpu_transcoder; in intel_hdcp_auth()
950 ret = shim->stream_encryption(connector, true); in intel_hdcp_auth()
952 drm_err(&i915->drm, "[CONNECTOR:%d:%s] Failed to enable HDCP 1.4 stream enc\n", in intel_hdcp_auth()
953 connector->base.base.id, connector->base.name); in intel_hdcp_auth()
961 return intel_hdcp_auth_downstream(connector); in intel_hdcp_auth()
967 static int _intel_hdcp_disable(struct intel_connector *connector) in _intel_hdcp_disable() argument
969 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in _intel_hdcp_disable()
970 struct drm_i915_private *i915 = to_i915(connector->base.dev); in _intel_hdcp_disable()
971 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp_disable()
977 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] HDCP is being disabled...\n", in _intel_hdcp_disable()
978 connector->base.base.id, connector->base.name); in _intel_hdcp_disable()
981 ret = hdcp->shim->stream_encryption(connector, false); in _intel_hdcp_disable()
983 drm_err(&i915->drm, "[CONNECTOR:%d:%s] Failed to disable HDCP 1.4 stream enc\n", in _intel_hdcp_disable()
984 connector->base.base.id, connector->base.name); in _intel_hdcp_disable()
1022 static int intel_hdcp1_enable(struct intel_connector *connector) in intel_hdcp1_enable() argument
1024 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp1_enable()
1025 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp1_enable()
1028 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] HDCP is being enabled...\n", in intel_hdcp1_enable()
1029 connector->base.base.id, connector->base.name); in intel_hdcp1_enable()
1050 ret = intel_hdcp_auth(connector); in intel_hdcp1_enable()
1059 _intel_hdcp_disable(connector); in intel_hdcp1_enable()
1072 static void intel_hdcp_update_value(struct intel_connector *connector, in intel_hdcp_update_value() argument
1075 struct drm_device *dev = connector->base.dev; in intel_hdcp_update_value()
1076 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in intel_hdcp_update_value()
1077 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_update_value()
1078 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp_update_value()
1080 drm_WARN_ON(connector->base.dev, !mutex_is_locked(&hdcp->mutex)); in intel_hdcp_update_value()
1096 drm_connector_get(&connector->base); in intel_hdcp_update_value()
1098 drm_connector_put(&connector->base); in intel_hdcp_update_value()
1103 static int intel_hdcp_check_link(struct intel_connector *connector) in intel_hdcp_check_link() argument
1105 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in intel_hdcp_check_link()
1106 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp_check_link()
1107 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_check_link()
1127 "[CONNECTOR:%d:%s] HDCP link stopped encryption,%x\n", in intel_hdcp_check_link()
1128 connector->base.base.id, connector->base.name, in intel_hdcp_check_link()
1131 intel_hdcp_update_value(connector, in intel_hdcp_check_link()
1137 if (hdcp->shim->check_link(dig_port, connector)) { in intel_hdcp_check_link()
1139 intel_hdcp_update_value(connector, in intel_hdcp_check_link()
1146 "[CONNECTOR:%d:%s] HDCP link failed, retrying authentication\n", in intel_hdcp_check_link()
1147 connector->base.base.id, connector->base.name); in intel_hdcp_check_link()
1149 ret = _intel_hdcp_disable(connector); in intel_hdcp_check_link()
1152 intel_hdcp_update_value(connector, in intel_hdcp_check_link()
1158 intel_hdcp_update_value(connector, in intel_hdcp_check_link()
1171 struct intel_connector *connector = intel_hdcp_to_connector(hdcp); in intel_hdcp_prop_work() local
1172 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp_prop_work()
1183 drm_hdcp_update_content_protection(&connector->base, in intel_hdcp_prop_work()
1189 drm_connector_put(&connector->base); in intel_hdcp_prop_work()
1199 hdcp2_prepare_ake_init(struct intel_connector *connector, in hdcp2_prepare_ake_init() argument
1202 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_prepare_ake_init()
1204 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_prepare_ake_init()
1226 hdcp2_verify_rx_cert_prepare_km(struct intel_connector *connector, in hdcp2_verify_rx_cert_prepare_km() argument
1232 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_verify_rx_cert_prepare_km()
1234 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_verify_rx_cert_prepare_km()
1257 static int hdcp2_verify_hprime(struct intel_connector *connector, in hdcp2_verify_hprime() argument
1260 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_verify_hprime()
1262 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_verify_hprime()
1283 hdcp2_store_pairing_info(struct intel_connector *connector, in hdcp2_store_pairing_info() argument
1286 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_store_pairing_info()
1288 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_store_pairing_info()
1310 hdcp2_prepare_lc_init(struct intel_connector *connector, in hdcp2_prepare_lc_init() argument
1313 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_prepare_lc_init()
1315 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_prepare_lc_init()
1337 hdcp2_verify_lprime(struct intel_connector *connector, in hdcp2_verify_lprime() argument
1340 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_verify_lprime()
1342 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_verify_lprime()
1363 static int hdcp2_prepare_skey(struct intel_connector *connector, in hdcp2_prepare_skey() argument
1366 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_prepare_skey()
1368 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_prepare_skey()
1390 hdcp2_verify_rep_topology_prepare_ack(struct intel_connector *connector, in hdcp2_verify_rep_topology_prepare_ack() argument
1395 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_verify_rep_topology_prepare_ack()
1397 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_verify_rep_topology_prepare_ack()
1422 hdcp2_verify_mprime(struct intel_connector *connector, in hdcp2_verify_mprime() argument
1425 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_verify_mprime()
1427 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_verify_mprime()
1447 static int hdcp2_authenticate_port(struct intel_connector *connector) in hdcp2_authenticate_port() argument
1449 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_authenticate_port()
1451 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_authenticate_port()
1472 static int hdcp2_close_session(struct intel_connector *connector) in hdcp2_close_session() argument
1474 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_close_session()
1475 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_close_session()
1494 static int hdcp2_deauthenticate_port(struct intel_connector *connector) in hdcp2_deauthenticate_port() argument
1496 return hdcp2_close_session(connector); in hdcp2_deauthenticate_port()
1500 static int hdcp2_authentication_key_exchange(struct intel_connector *connector) in hdcp2_authentication_key_exchange() argument
1502 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_authentication_key_exchange()
1503 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_authentication_key_exchange()
1519 ret = hdcp2_prepare_ake_init(connector, &msgs.ake_init); in hdcp2_authentication_key_exchange()
1523 ret = shim->write_2_2_msg(connector, &msgs.ake_init, in hdcp2_authentication_key_exchange()
1528 ret = shim->read_2_2_msg(connector, HDCP_2_2_AKE_SEND_CERT, in hdcp2_authentication_key_exchange()
1551 ret = hdcp2_verify_rx_cert_prepare_km(connector, &msgs.send_cert, in hdcp2_authentication_key_exchange()
1557 ret = shim->write_2_2_msg(connector, &msgs.no_stored_km, size); in hdcp2_authentication_key_exchange()
1561 ret = shim->read_2_2_msg(connector, HDCP_2_2_AKE_SEND_HPRIME, in hdcp2_authentication_key_exchange()
1566 ret = hdcp2_verify_hprime(connector, &msgs.send_hprime); in hdcp2_authentication_key_exchange()
1572 ret = shim->read_2_2_msg(connector, in hdcp2_authentication_key_exchange()
1579 ret = hdcp2_store_pairing_info(connector, &msgs.pairing_info); in hdcp2_authentication_key_exchange()
1588 static int hdcp2_locality_check(struct intel_connector *connector) in hdcp2_locality_check() argument
1590 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_locality_check()
1599 ret = hdcp2_prepare_lc_init(connector, &msgs.lc_init); in hdcp2_locality_check()
1603 ret = shim->write_2_2_msg(connector, &msgs.lc_init, in hdcp2_locality_check()
1608 ret = shim->read_2_2_msg(connector, in hdcp2_locality_check()
1615 ret = hdcp2_verify_lprime(connector, &msgs.send_lprime); in hdcp2_locality_check()
1623 static int hdcp2_session_key_exchange(struct intel_connector *connector) in hdcp2_session_key_exchange() argument
1625 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_session_key_exchange()
1629 ret = hdcp2_prepare_skey(connector, &send_eks); in hdcp2_session_key_exchange()
1633 ret = hdcp->shim->write_2_2_msg(connector, &send_eks, in hdcp2_session_key_exchange()
1642 int _hdcp2_propagate_stream_management_info(struct intel_connector *connector) in _hdcp2_propagate_stream_management_info() argument
1644 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in _hdcp2_propagate_stream_management_info()
1646 struct intel_hdcp *hdcp = &connector->hdcp; in _hdcp2_propagate_stream_management_info()
1654 if (connector->hdcp.seq_num_m > HDCP_2_2_SEQ_NUM_MAX) in _hdcp2_propagate_stream_management_info()
1671 ret = shim->write_2_2_msg(connector, &msgs.stream_manage, in _hdcp2_propagate_stream_management_info()
1676 ret = shim->read_2_2_msg(connector, HDCP_2_2_REP_STREAM_READY, in _hdcp2_propagate_stream_management_info()
1683 ret = hdcp2_verify_mprime(connector, &msgs.stream_ready); in _hdcp2_propagate_stream_management_info()
1692 int hdcp2_authenticate_repeater_topology(struct intel_connector *connector) in hdcp2_authenticate_repeater_topology() argument
1694 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_authenticate_repeater_topology()
1695 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_authenticate_repeater_topology()
1696 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_authenticate_repeater_topology()
1706 ret = shim->read_2_2_msg(connector, HDCP_2_2_REP_SEND_RECVID_LIST, in hdcp2_authenticate_repeater_topology()
1758 ret = hdcp2_verify_rep_topology_prepare_ack(connector, in hdcp2_authenticate_repeater_topology()
1765 ret = shim->write_2_2_msg(connector, &msgs.rep_ack, in hdcp2_authenticate_repeater_topology()
1773 static int hdcp2_authenticate_sink(struct intel_connector *connector) in hdcp2_authenticate_sink() argument
1775 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_authenticate_sink()
1776 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_authenticate_sink()
1780 ret = hdcp2_authentication_key_exchange(connector); in hdcp2_authenticate_sink()
1786 ret = hdcp2_locality_check(connector); in hdcp2_authenticate_sink()
1793 ret = hdcp2_session_key_exchange(connector); in hdcp2_authenticate_sink()
1800 ret = shim->config_stream_type(connector, in hdcp2_authenticate_sink()
1808 ret = hdcp2_authenticate_repeater_topology(connector); in hdcp2_authenticate_sink()
1819 static int hdcp2_enable_stream_encryption(struct intel_connector *connector) in hdcp2_enable_stream_encryption() argument
1821 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_enable_stream_encryption()
1822 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_enable_stream_encryption()
1824 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_enable_stream_encryption()
1831 drm_err(&i915->drm, "[CONNECTOR:%d:%s] HDCP 2.2 Link is not encrypted\n", in hdcp2_enable_stream_encryption()
1832 connector->base.base.id, connector->base.name); in hdcp2_enable_stream_encryption()
1838 ret = hdcp->shim->stream_2_2_encryption(connector, true); in hdcp2_enable_stream_encryption()
1840 drm_err(&i915->drm, "[CONNECTOR:%d:%s] Failed to enable HDCP 2.2 stream enc\n", in hdcp2_enable_stream_encryption()
1841 connector->base.base.id, connector->base.name); in hdcp2_enable_stream_encryption()
1851 if (hdcp2_deauthenticate_port(connector) < 0) in hdcp2_enable_stream_encryption()
1860 static int hdcp2_enable_encryption(struct intel_connector *connector) in hdcp2_enable_encryption() argument
1862 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_enable_encryption()
1863 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_enable_encryption()
1864 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_enable_encryption()
1899 static int hdcp2_disable_encryption(struct intel_connector *connector) in hdcp2_disable_encryption() argument
1901 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_disable_encryption()
1902 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_disable_encryption()
1903 struct intel_hdcp *hdcp = &connector->hdcp; in hdcp2_disable_encryption()
1937 hdcp2_propagate_stream_management_info(struct intel_connector *connector) in hdcp2_propagate_stream_management_info() argument
1939 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_propagate_stream_management_info()
1942 if (!connector->hdcp.is_repeater) in hdcp2_propagate_stream_management_info()
1946 ret = _hdcp2_propagate_stream_management_info(connector); in hdcp2_propagate_stream_management_info()
1951 if (connector->hdcp.seq_num_m > HDCP_2_2_SEQ_NUM_MAX) { in hdcp2_propagate_stream_management_info()
1966 struct intel_connector *connector) in hdcp2_authenticate_and_encrypt() argument
1968 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in hdcp2_authenticate_and_encrypt()
1969 struct drm_i915_private *i915 = to_i915(connector->base.dev); in hdcp2_authenticate_and_encrypt()
1973 ret = hdcp2_authenticate_sink(connector); in hdcp2_authenticate_and_encrypt()
1975 ret = intel_hdcp_prepare_streams(state, connector); in hdcp2_authenticate_and_encrypt()
1983 ret = hdcp2_propagate_stream_management_info(connector); in hdcp2_authenticate_and_encrypt()
1991 ret = hdcp2_authenticate_port(connector); in hdcp2_authenticate_and_encrypt()
2001 if (hdcp2_deauthenticate_port(connector) < 0) in hdcp2_authenticate_and_encrypt()
2011 ret = hdcp2_enable_encryption(connector); in hdcp2_authenticate_and_encrypt()
2015 if (hdcp2_deauthenticate_port(connector) < 0) in hdcp2_authenticate_and_encrypt()
2021 ret = hdcp2_enable_stream_encryption(connector); in hdcp2_authenticate_and_encrypt()
2027 struct intel_connector *connector) in _intel_hdcp2_enable() argument
2029 struct drm_i915_private *i915 = to_i915(connector->base.dev); in _intel_hdcp2_enable()
2030 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp2_enable()
2033 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] HDCP2.2 is being enabled. Type: %d\n", in _intel_hdcp2_enable()
2034 connector->base.base.id, connector->base.name, in _intel_hdcp2_enable()
2037 intel_hdcp_disable_hdcp_line_rekeying(connector->encoder, hdcp); in _intel_hdcp2_enable()
2039 ret = hdcp2_authenticate_and_encrypt(state, connector); in _intel_hdcp2_enable()
2046 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] HDCP2.2 is enabled. Type %d\n", in _intel_hdcp2_enable()
2047 connector->base.base.id, connector->base.name, in _intel_hdcp2_enable()
2055 _intel_hdcp2_disable(struct intel_connector *connector, bool hdcp2_link_recovery) in _intel_hdcp2_disable() argument
2057 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in _intel_hdcp2_disable()
2058 struct drm_i915_private *i915 = to_i915(connector->base.dev); in _intel_hdcp2_disable()
2060 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp2_disable()
2063 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] HDCP2.2 is being Disabled\n", in _intel_hdcp2_disable()
2064 connector->base.base.id, connector->base.name); in _intel_hdcp2_disable()
2067 ret = hdcp->shim->stream_2_2_encryption(connector, false); in _intel_hdcp2_disable()
2069 drm_err(&i915->drm, "[CONNECTOR:%d:%s] Failed to disable HDCP 2.2 stream enc\n", in _intel_hdcp2_disable()
2070 connector->base.base.id, connector->base.name); in _intel_hdcp2_disable()
2080 ret = hdcp2_disable_encryption(connector); in _intel_hdcp2_disable()
2082 if (hdcp2_deauthenticate_port(connector) < 0) in _intel_hdcp2_disable()
2085 connector->hdcp.hdcp2_encrypted = false; in _intel_hdcp2_disable()
2093 static int intel_hdcp2_check_link(struct intel_connector *connector) in intel_hdcp2_check_link() argument
2095 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in intel_hdcp2_check_link()
2096 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp2_check_link()
2097 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp2_check_link()
2119 _intel_hdcp2_disable(connector, true); in intel_hdcp2_check_link()
2120 intel_hdcp_update_value(connector, in intel_hdcp2_check_link()
2126 ret = hdcp->shim->check_2_2_link(dig_port, connector); in intel_hdcp2_check_link()
2129 intel_hdcp_update_value(connector, in intel_hdcp2_check_link()
2144 "[CONNECTOR:%d:%s] HDCP2.2 link failed, retrying auth\n", in intel_hdcp2_check_link()
2145 connector->base.base.id, connector->base.name); in intel_hdcp2_check_link()
2148 ret = _intel_hdcp2_disable(connector, true); in intel_hdcp2_check_link()
2151 "[CONNECTOR:%d:%s] Failed to disable hdcp2.2 (%d)\n", in intel_hdcp2_check_link()
2152 connector->base.base.id, connector->base.name, ret); in intel_hdcp2_check_link()
2153 intel_hdcp_update_value(connector, in intel_hdcp2_check_link()
2158 intel_hdcp_update_value(connector, in intel_hdcp2_check_link()
2171 struct intel_connector *connector = intel_hdcp_to_connector(hdcp); in intel_hdcp_check_work() local
2172 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp_check_work()
2174 if (drm_connector_is_unregistered(&connector->base)) in intel_hdcp_check_work()
2177 if (!intel_hdcp2_check_link(connector)) in intel_hdcp_check_work()
2180 else if (!intel_hdcp_check_link(connector)) in intel_hdcp_check_work()
2239 static int initialize_hdcp_port_data(struct intel_connector *connector, in initialize_hdcp_port_data() argument
2243 struct drm_i915_private *i915 = to_i915(connector->base.dev); in initialize_hdcp_port_data()
2320 static void intel_hdcp2_init(struct intel_connector *connector, in intel_hdcp2_init() argument
2324 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp2_init()
2325 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp2_init()
2328 ret = initialize_hdcp_port_data(connector, dig_port, shim); in intel_hdcp2_init()
2337 int intel_hdcp_init(struct intel_connector *connector, in intel_hdcp_init() argument
2341 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp_init()
2342 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_init()
2349 intel_hdcp2_init(connector, dig_port, shim); in intel_hdcp_init()
2352 drm_connector_attach_content_protection_property(&connector->base, in intel_hdcp_init()
2375 struct intel_connector *connector = in _intel_hdcp_enable() local
2376 to_intel_connector(conn_state->connector); in _intel_hdcp_enable()
2377 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in _intel_hdcp_enable()
2378 struct intel_hdcp *hdcp = &connector->hdcp; in _intel_hdcp_enable()
2385 if (!connector->encoder) { in _intel_hdcp_enable()
2386 drm_err(&i915->drm, "[CONNECTOR:%d:%s] encoder is not initialized\n", in _intel_hdcp_enable()
2387 connector->base.base.id, connector->base.name); in _intel_hdcp_enable()
2413 if (intel_hdcp2_get_capability(connector)) { in _intel_hdcp_enable()
2414 ret = _intel_hdcp2_enable(state, connector); in _intel_hdcp_enable()
2424 if (ret && intel_hdcp_get_capability(connector) && in _intel_hdcp_enable()
2426 ret = intel_hdcp1_enable(connector); in _intel_hdcp_enable()
2432 intel_hdcp_update_value(connector, in _intel_hdcp_enable()
2447 struct intel_connector *connector = in intel_hdcp_enable() local
2448 to_intel_connector(conn_state->connector); in intel_hdcp_enable()
2449 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_enable()
2463 int intel_hdcp_disable(struct intel_connector *connector) in intel_hdcp_disable() argument
2465 struct intel_digital_port *dig_port = intel_attached_dig_port(connector); in intel_hdcp_disable()
2466 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_disable()
2478 intel_hdcp_update_value(connector, in intel_hdcp_disable()
2481 ret = _intel_hdcp2_disable(connector, false); in intel_hdcp_disable()
2483 ret = _intel_hdcp_disable(connector); in intel_hdcp_disable()
2497 struct intel_connector *connector = in intel_hdcp_update_pipe() local
2498 to_intel_connector(conn_state->connector); in intel_hdcp_update_pipe()
2499 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_update_pipe()
2501 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp_update_pipe()
2503 if (!connector->hdcp.shim) in intel_hdcp_update_pipe()
2518 intel_hdcp_disable(connector); in intel_hdcp_update_pipe()
2527 drm_connector_get(&connector->base); in intel_hdcp_update_pipe()
2529 drm_connector_put(&connector->base); in intel_hdcp_update_pipe()
2545 drm_connector_get(&connector->base); in intel_hdcp_update_pipe()
2547 drm_connector_put(&connector->base); in intel_hdcp_update_pipe()
2573 void intel_hdcp_cleanup(struct intel_connector *connector) in intel_hdcp_cleanup() argument
2575 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_cleanup()
2581 * If the connector is registered, it's possible userspace could kick in intel_hdcp_cleanup()
2584 drm_WARN_ON(connector->base.dev, in intel_hdcp_cleanup()
2585 connector->base.registration_state == DRM_CONNECTOR_REGISTERED); in intel_hdcp_cleanup()
2588 * Now that the connector is not registered, check_work won't be run, in intel_hdcp_cleanup()
2596 * function. Instead, we rely on the connector references grabbed before in intel_hdcp_cleanup()
2597 * scheduling prop_work to ensure the connector is alive when prop_work in intel_hdcp_cleanup()
2602 drm_WARN_ON(connector->base.dev, work_pending(&hdcp->prop_work)); in intel_hdcp_cleanup()
2609 void intel_hdcp_atomic_check(struct drm_connector *connector, in intel_hdcp_atomic_check() argument
2619 * If the connector is being disabled with CP enabled, mark it in intel_hdcp_atomic_check()
2620 * desired so it's re-enabled when the connector is brought back in intel_hdcp_atomic_check()
2657 void intel_hdcp_handle_cp_irq(struct intel_connector *connector) in intel_hdcp_handle_cp_irq() argument
2659 struct intel_hdcp *hdcp = &connector->hdcp; in intel_hdcp_handle_cp_irq()
2660 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_hdcp_handle_cp_irq()
2665 atomic_inc(&connector->hdcp.cp_irq_count); in intel_hdcp_handle_cp_irq()
2666 wake_up_all(&connector->hdcp.cp_irq_queue); in intel_hdcp_handle_cp_irq()