Lines Matching refs:link

52 	link->ctx->logger
167 static enum signal_type link_detect_sink_signal_type(struct dc_link *link, in link_detect_sink_signal_type() argument
173 if (link->is_dig_mapping_flexible) in link_detect_sink_signal_type()
176 enc_id = link->link_enc->id; in link_detect_sink_signal_type()
177 result = get_basic_signal_type(enc_id, link->link_id); in link_detect_sink_signal_type()
180 if (link->ep_type != DISPLAY_ENDPOINT_PHY) in link_detect_sink_signal_type()
196 if (link->link_id.id == CONNECTOR_ID_PCIE) { in link_detect_sink_signal_type()
200 switch (link->link_id.id) { in link_detect_sink_signal_type()
206 &link->dc->res_pool->audio_support; in link_detect_sink_signal_type()
209 if (link->link_id.id == CONNECTOR_ID_HDMI_TYPE_A) in link_detect_sink_signal_type()
223 if (!dm_helpers_is_dp_sink_present(link)) in link_detect_sink_signal_type()
308 ddc->link, in i2c_read()
328 struct dc_link *link = ddc->link; in query_dp_dual_mode_adaptor() local
353 CONN_DATA_DETECT(ddc->link, type2_dongle_buf, sizeof(type2_dongle_buf), in query_dp_dual_mode_adaptor()
400 CONN_DATA_DETECT(ddc->link, type2_dongle_buf, in query_dp_dual_mode_adaptor()
408 CONN_DATA_DETECT(ddc->link, type2_dongle_buf, in query_dp_dual_mode_adaptor()
415 CONN_DATA_DETECT(ddc->link, type2_dongle_buf, in query_dp_dual_mode_adaptor()
432 CONN_DATA_DETECT(ddc->link, type2_dongle_buf, in query_dp_dual_mode_adaptor()
439 CONN_DATA_DETECT(ddc->link, type2_dongle_buf, in query_dp_dual_mode_adaptor()
460 static void link_disconnect_sink(struct dc_link *link) in link_disconnect_sink() argument
462 if (link->local_sink) { in link_disconnect_sink()
463 dc_sink_release(link->local_sink); in link_disconnect_sink()
464 link->local_sink = NULL; in link_disconnect_sink()
467 link->dpcd_sink_count = 0; in link_disconnect_sink()
471 static void link_disconnect_remap(struct dc_sink *prev_sink, struct dc_link *link) in link_disconnect_remap() argument
473 dc_sink_release(link->local_sink); in link_disconnect_remap()
474 link->local_sink = prev_sink; in link_disconnect_remap()
477 static void query_hdcp_capability(enum signal_type signal, struct dc_link *link) in query_hdcp_capability() argument
484 memset(link->hdcp_caps.rx_caps.raw, 0, in query_hdcp_capability()
485 sizeof(link->hdcp_caps.rx_caps.raw)); in query_hdcp_capability()
487 if ((link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT && in query_hdcp_capability()
488 link->ddc->transaction_type == in query_hdcp_capability()
490 link->connector_signal == SIGNAL_TYPE_EDP) { in query_hdcp_capability()
491 msg22.data = link->hdcp_caps.rx_caps.raw; in query_hdcp_capability()
492 msg22.length = sizeof(link->hdcp_caps.rx_caps.raw); in query_hdcp_capability()
495 msg22.data = &link->hdcp_caps.rx_caps.fields.version; in query_hdcp_capability()
496 msg22.length = sizeof(link->hdcp_caps.rx_caps.fields.version); in query_hdcp_capability()
500 msg22.link = HDCP_LINK_PRIMARY; in query_hdcp_capability()
502 dc_process_hdcp_msg(signal, link, &msg22); in query_hdcp_capability()
505 msg14.data = &link->hdcp_caps.bcaps.raw; in query_hdcp_capability()
506 msg14.length = sizeof(link->hdcp_caps.bcaps.raw); in query_hdcp_capability()
509 msg14.link = HDCP_LINK_PRIMARY; in query_hdcp_capability()
512 dc_process_hdcp_msg(signal, link, &msg14); in query_hdcp_capability()
516 static void read_current_link_settings_on_detect(struct dc_link *link) in read_current_link_settings_on_detect() argument
528 status = core_link_read_dpcd(link, in read_current_link_settings_on_detect()
538 link->cur_link_settings.lane_count = in read_current_link_settings_on_detect()
547 core_link_read_dpcd(link, DP_LINK_BW_SET, in read_current_link_settings_on_detect()
551 if (link->connector_signal == SIGNAL_TYPE_EDP) { in read_current_link_settings_on_detect()
555 core_link_read_dpcd(link, DP_LINK_RATE_SET, in read_current_link_settings_on_detect()
559 if (link_rate_set < link->dpcd_caps.edp_supported_link_rates_count) { in read_current_link_settings_on_detect()
560 link->cur_link_settings.link_rate = in read_current_link_settings_on_detect()
561 link->dpcd_caps.edp_supported_link_rates[link_rate_set]; in read_current_link_settings_on_detect()
562 link->cur_link_settings.link_rate_set = link_rate_set; in read_current_link_settings_on_detect()
563 link->cur_link_settings.use_link_rate_set = true; in read_current_link_settings_on_detect()
570 link->cur_link_settings.link_rate = link_bw_set; in read_current_link_settings_on_detect()
571 link->cur_link_settings.use_link_rate_set = false; in read_current_link_settings_on_detect()
574 core_link_read_dpcd(link, DP_MAX_DOWNSPREAD, in read_current_link_settings_on_detect()
576 link->cur_link_settings.link_spread = in read_current_link_settings_on_detect()
581 static bool detect_dp(struct dc_link *link, in detect_dp() argument
585 struct audio_support *audio_support = &link->dc->res_pool->audio_support; in detect_dp()
587 sink_caps->signal = link_detect_sink_signal_type(link, reason); in detect_dp()
593 if (!detect_dp_sink_caps(link)) in detect_dp()
596 if (is_dp_branch_device(link)) in detect_dp()
598 link->type = dc_connection_sst_branch; in detect_dp()
600 if (link->dc->debug.disable_dp_plus_plus_wa && in detect_dp()
601 link->link_enc->features.flags.bits.IS_UHBR20_CAPABLE) in detect_dp()
605 sink_caps->signal = dp_passive_dongle_detection(link->ddc, in detect_dp()
608 link->dpcd_caps.dongle_type = sink_caps->dongle_type; in detect_dp()
609 link->dpcd_caps.is_dongle_type_one = sink_caps->is_dongle_type_one; in detect_dp()
610 link->dpcd_caps.dpcd_rev.raw = 0; in detect_dp()
628 static bool wait_for_entering_dp_alt_mode(struct dc_link *link) in wait_for_entering_dp_alt_mode() argument
643 DC_LOGGER_INIT(link->ctx->logger); in wait_for_entering_dp_alt_mode()
650 if (!link->link_enc->funcs->is_in_alt_mode) in wait_for_entering_dp_alt_mode()
653 is_in_alt_mode = link->link_enc->funcs->is_in_alt_mode(link->link_enc); in wait_for_entering_dp_alt_mode()
659 enter_timestamp = dm_get_timestamp(link->ctx); in wait_for_entering_dp_alt_mode()
664 if (link->link_enc->funcs->is_in_alt_mode(link->link_enc)) { in wait_for_entering_dp_alt_mode()
665 finish_timestamp = dm_get_timestamp(link->ctx); in wait_for_entering_dp_alt_mode()
667 dm_get_elapse_time_in_ns(link->ctx, in wait_for_entering_dp_alt_mode()
675 finish_timestamp = dm_get_timestamp(link->ctx); in wait_for_entering_dp_alt_mode()
676 time_taken_in_ns = dm_get_elapse_time_in_ns(link->ctx, finish_timestamp, in wait_for_entering_dp_alt_mode()
683 static void apply_dpia_mst_dsc_always_on_wa(struct dc_link *link) in apply_dpia_mst_dsc_always_on_wa() argument
688 if (link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA && in apply_dpia_mst_dsc_always_on_wa()
689 link->type == dc_connection_mst_branch && in apply_dpia_mst_dsc_always_on_wa()
690 link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_90CC24 && in apply_dpia_mst_dsc_always_on_wa()
691 link->dpcd_caps.branch_hw_revision == DP_BRANCH_HW_REV_20 && in apply_dpia_mst_dsc_always_on_wa()
692 link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT && in apply_dpia_mst_dsc_always_on_wa()
693 !link->dc->debug.dpia_debug.bits.disable_mst_dsc_work_around) in apply_dpia_mst_dsc_always_on_wa()
694 link->wa_flags.dpia_mst_dsc_always_on = true; in apply_dpia_mst_dsc_always_on_wa()
697 static void revert_dpia_mst_dsc_always_on_wa(struct dc_link *link) in revert_dpia_mst_dsc_always_on_wa() argument
700 if (link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA) in revert_dpia_mst_dsc_always_on_wa()
701 link->wa_flags.dpia_mst_dsc_always_on = false; in revert_dpia_mst_dsc_always_on_wa()
704 static bool discover_dp_mst_topology(struct dc_link *link, enum dc_detect_reason reason) in discover_dp_mst_topology() argument
706 DC_LOGGER_INIT(link->ctx->logger); in discover_dp_mst_topology()
709 link->link_index); in discover_dp_mst_topology()
711 link->type = dc_connection_mst_branch; in discover_dp_mst_topology()
712 apply_dpia_mst_dsc_always_on_wa(link); in discover_dp_mst_topology()
714 dm_helpers_dp_update_branch_info(link->ctx, link); in discover_dp_mst_topology()
715 if (dm_helpers_dp_mst_start_top_mgr(link->ctx, in discover_dp_mst_topology()
716 link, (reason == DETECT_REASON_BOOT || reason == DETECT_REASON_RESUMEFROMS3S4))) { in discover_dp_mst_topology()
717 link_disconnect_sink(link); in discover_dp_mst_topology()
719 link->type = dc_connection_sst_branch; in discover_dp_mst_topology()
722 return link->type == dc_connection_mst_branch; in discover_dp_mst_topology()
725 bool link_reset_cur_dp_mst_topology(struct dc_link *link) in link_reset_cur_dp_mst_topology() argument
727 DC_LOGGER_INIT(link->ctx->logger); in link_reset_cur_dp_mst_topology()
730 link->link_index); in link_reset_cur_dp_mst_topology()
732 revert_dpia_mst_dsc_always_on_wa(link); in link_reset_cur_dp_mst_topology()
733 return dm_helpers_dp_mst_stop_top_mgr(link->ctx, link); in link_reset_cur_dp_mst_topology()
763 static void verify_link_capability_destructive(struct dc_link *link, in verify_link_capability_destructive() argument
768 should_prepare_phy_clocks_for_link_verification(link->dc, reason); in verify_link_capability_destructive()
771 prepare_phy_clocks_for_destructive_link_verification(link->dc); in verify_link_capability_destructive()
773 if (dc_is_dp_signal(link->local_sink->sink_signal)) { in verify_link_capability_destructive()
775 dp_get_max_link_cap(link); in verify_link_capability_destructive()
776 link_set_all_streams_dpms_off_for_link(link); in verify_link_capability_destructive()
778 link, &known_limit_link_setting, in verify_link_capability_destructive()
785 restore_phy_clocks_for_destructive_link_verification(link->dc); in verify_link_capability_destructive()
788 static void verify_link_capability_non_destructive(struct dc_link *link) in verify_link_capability_non_destructive() argument
790 if (dc_is_dp_signal(link->local_sink->sink_signal)) { in verify_link_capability_non_destructive()
791 if (dc_is_embedded_signal(link->local_sink->sink_signal) || in verify_link_capability_non_destructive()
792 link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA) in verify_link_capability_non_destructive()
796 link->verified_link_cap = link->reported_link_cap; in verify_link_capability_non_destructive()
798 link->verified_link_cap = dp_get_max_link_cap(link); in verify_link_capability_non_destructive()
802 static bool should_verify_link_capability_destructively(struct dc_link *link, in should_verify_link_capability_destructively() argument
807 bool is_link_enc_unavailable = link->link_enc && in should_verify_link_capability_destructively()
808 link->dc->res_pool->funcs->link_encs_assign && in should_verify_link_capability_destructively()
810 link->ctx->dc, in should_verify_link_capability_destructively()
811 link->link_enc->preferred_engine, in should_verify_link_capability_destructively()
812 link); in should_verify_link_capability_destructively()
814 if (dc_is_dp_signal(link->local_sink->sink_signal)) { in should_verify_link_capability_destructively()
815 max_link_cap = dp_get_max_link_cap(link); in should_verify_link_capability_destructively()
818 if (link->dc->debug.skip_detection_link_training || in should_verify_link_capability_destructively()
819 dc_is_embedded_signal(link->local_sink->sink_signal) || in should_verify_link_capability_destructively()
820 link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA) { in should_verify_link_capability_destructively()
824 if (link->dpcd_caps.is_mst_capable || in should_verify_link_capability_destructively()
834 static void verify_link_capability(struct dc_link *link, struct dc_sink *sink, in verify_link_capability() argument
837 if (should_verify_link_capability_destructively(link, reason)) in verify_link_capability()
838 verify_link_capability_destructive(link, sink, reason); in verify_link_capability()
840 verify_link_capability_non_destructive(link); in verify_link_capability()
850 static bool detect_link_and_local_sink(struct dc_link *link, in detect_link_and_local_sink() argument
857 struct audio_support *aud_support = &link->dc->res_pool->audio_support; in detect_link_and_local_sink()
860 struct dc_context *dc_ctx = link->ctx; in detect_link_and_local_sink()
868 DC_LOGGER_INIT(link->ctx->logger); in detect_link_and_local_sink()
870 if (dc_is_virtual_signal(link->connector_signal)) in detect_link_and_local_sink()
873 if (((link->connector_signal == SIGNAL_TYPE_LVDS || in detect_link_and_local_sink()
874 link->connector_signal == SIGNAL_TYPE_EDP) && in detect_link_and_local_sink()
875 (!link->dc->config.allow_edp_hotplug_detection)) && in detect_link_and_local_sink()
876 link->local_sink) { in detect_link_and_local_sink()
878 if (link->connector_signal == SIGNAL_TYPE_EDP && in detect_link_and_local_sink()
879 (link->dpcd_sink_ext_caps.bits.oled == 1)) { in detect_link_and_local_sink()
880 dpcd_set_source_specific_data(link); in detect_link_and_local_sink()
882 set_default_brightness_aux(link); in detect_link_and_local_sink()
888 if (!link_detect_connection_type(link, &new_connection_type)) { in detect_link_and_local_sink()
893 prev_sink = link->local_sink; in detect_link_and_local_sink()
896 memcpy(&prev_dpcd_caps, &link->dpcd_caps, sizeof(struct dpcd_caps)); in detect_link_and_local_sink()
899 link_disconnect_sink(link); in detect_link_and_local_sink()
901 link->type = new_connection_type; in detect_link_and_local_sink()
902 link->link_state_valid = false; in detect_link_and_local_sink()
905 switch (link->connector_signal) { in detect_link_and_local_sink()
934 detect_edp_sink_caps(link); in detect_link_and_local_sink()
935 read_current_link_settings_on_detect(link); in detect_link_and_local_sink()
941 link->dpcd_caps.sink_dev_id == DP_BRANCH_DEVICE_ID_0022B9 && in detect_link_and_local_sink()
942 memcmp(&link->dpcd_caps.branch_dev_name, DP_SINK_BRANCH_DEV_NAME_7580, in detect_link_and_local_sink()
943 sizeof(link->dpcd_caps.branch_dev_name)) == 0) { in detect_link_and_local_sink()
946 if (!link->dpcd_caps.set_power_state_capable_edp) in detect_link_and_local_sink()
947 link->wa_flags.dp_keep_receiver_powered = true; in detect_link_and_local_sink()
958 if (link->ep_type == DISPLAY_ENDPOINT_PHY && in detect_link_and_local_sink()
959 link->link_enc->features.flags.bits.DP_IS_USB_C == 1) { in detect_link_and_local_sink()
962 if (!wait_for_entering_dp_alt_mode(link)) in detect_link_and_local_sink()
966 if (!detect_dp(link, &sink_caps, reason)) { in detect_link_and_local_sink()
974 if (link->type == dc_connection_sst_branch && in detect_link_and_local_sink()
975 link->dpcd_caps.sink_count.bits.SINK_COUNT == 0) { in detect_link_and_local_sink()
983 if (link->type == dc_connection_sst_branch && in detect_link_and_local_sink()
984 is_dp_active_dongle(link) && in detect_link_and_local_sink()
985 (link->dpcd_caps.dongle_type != in detect_link_and_local_sink()
990 if (link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA && in detect_link_and_local_sink()
991 link->reported_link_cap.link_rate > LINK_RATE_HIGH3) in detect_link_and_local_sink()
992 link->reported_link_cap.link_rate = LINK_RATE_HIGH3; in detect_link_and_local_sink()
999 if (link_dp_dpia_set_dptx_usb4_bw_alloc_support(link)) { in detect_link_and_local_sink()
1001 if (link->dpia_bw_alloc_config.nrd_max_link_rate && in detect_link_and_local_sink()
1002 link->dpia_bw_alloc_config.nrd_max_lane_count) { in detect_link_and_local_sink()
1003 link->reported_link_cap.link_rate = in detect_link_and_local_sink()
1004 link->dpia_bw_alloc_config.nrd_max_link_rate; in detect_link_and_local_sink()
1005 link->reported_link_cap.lane_count = in detect_link_and_local_sink()
1006 link->dpia_bw_alloc_config.nrd_max_lane_count; in detect_link_and_local_sink()
1015 link->connector_signal); in detect_link_and_local_sink()
1021 if (link->dpcd_caps.sink_count.bits.SINK_COUNT) in detect_link_and_local_sink()
1022 link->dpcd_sink_count = in detect_link_and_local_sink()
1023 link->dpcd_caps.sink_count.bits.SINK_COUNT; in detect_link_and_local_sink()
1025 link->dpcd_sink_count = 1; in detect_link_and_local_sink()
1027 set_ddc_transaction_type(link->ddc, in detect_link_and_local_sink()
1030 link->aux_mode = in detect_link_and_local_sink()
1031 link_is_in_aux_transaction_mode(link->ddc); in detect_link_and_local_sink()
1033 sink_init_data.link = link; in detect_link_and_local_sink()
1044 sink->link->dongle_max_pix_clk = sink_caps.max_hdmi_pixel_clock; in detect_link_and_local_sink()
1048 link->local_sink = sink; in detect_link_and_local_sink()
1050 edid_status = dm_helpers_read_local_edid(link->ctx, in detect_link_and_local_sink()
1051 link, sink); in detect_link_and_local_sink()
1070 if (dc_is_hdmi_signal(link->connector_signal) || in detect_link_and_local_sink()
1071 dc_is_dvi_signal(link->connector_signal)) { in detect_link_and_local_sink()
1078 if (link->type == dc_connection_sst_branch && in detect_link_and_local_sink()
1079 link->dpcd_caps.dongle_type == in detect_link_and_local_sink()
1088 link_disconnect_sink(link); in detect_link_and_local_sink()
1105 link->ctx->dc->debug.hdmi20_disable = true; in detect_link_and_local_sink()
1108 link->dpcd_sink_ext_caps.raw = 0; in detect_link_and_local_sink()
1110 if (dc_is_hdmi_signal(link->connector_signal)) in detect_link_and_local_sink()
1111 read_scdc_caps(link->ddc, link->local_sink); in detect_link_and_local_sink()
1113 if (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT && in detect_link_and_local_sink()
1120 query_hdcp_capability(sink->sink_signal, link); in detect_link_and_local_sink()
1124 link_disconnect_remap(prev_sink, link); in detect_link_and_local_sink()
1128 query_hdcp_capability(sink->sink_signal, link); in detect_link_and_local_sink()
1136 if (link->local_sink && dc_is_dp_signal(sink_caps.signal)) in detect_link_and_local_sink()
1137 dp_trace_init(link); in detect_link_and_local_sink()
1141 CONN_DATA_DETECT(link, in detect_link_and_local_sink()
1180 if (link->connector_signal == SIGNAL_TYPE_EDP) { in detect_link_and_local_sink()
1183 dc_ctx->dc->res_pool->funcs->get_panel_config_defaults(&link->panel_config); in detect_link_and_local_sink()
1185 dm_helpers_init_panel_settings(dc_ctx, &link->panel_config, sink); in detect_link_and_local_sink()
1187 dm_helpers_override_panel_settings(dc_ctx, &link->panel_config); in detect_link_and_local_sink()
1190 if (link->reported_link_cap.link_rate == LINK_RATE_UNKNOWN) in detect_link_and_local_sink()
1191 link->panel_config.ilr.optimize_edp_link_rate = true; in detect_link_and_local_sink()
1192 link->reported_link_cap.link_rate = get_max_edp_link_rate(link); in detect_link_and_local_sink()
1197 link->type = dc_connection_none; in detect_link_and_local_sink()
1199 memset(&link->hdcp_caps, 0, sizeof(struct hdcp_caps)); in detect_link_and_local_sink()
1205 link->dongle_max_pix_clk = 0; in detect_link_and_local_sink()
1207 dc_link_clear_dprx_states(link); in detect_link_and_local_sink()
1208 dp_trace_reset(link); in detect_link_and_local_sink()
1212 link->link_index, sink, in detect_link_and_local_sink()
1230 bool link_detect_connection_type(struct dc_link *link, enum dc_connection_type *type) in link_detect_connection_type() argument
1234 if (link->connector_signal == SIGNAL_TYPE_LVDS) { in link_detect_connection_type()
1239 if (link->connector_signal == SIGNAL_TYPE_EDP) { in link_detect_connection_type()
1241 if (!link->dc->config.edp_no_power_sequencing) in link_detect_connection_type()
1242 link->dc->hwss.edp_power_control(link, true); in link_detect_connection_type()
1243 link->dc->hwss.edp_wait_for_hpd_ready(link, true); in link_detect_connection_type()
1247 if (link->ep_type != DISPLAY_ENDPOINT_PHY) { in link_detect_connection_type()
1248 if (link->is_hpd_pending || !dpia_query_hpd_status(link)) in link_detect_connection_type()
1257 if (!query_hpd_status(link, &is_hpd_high)) in link_detect_connection_type()
1265 if (link->connector_signal == SIGNAL_TYPE_EDP) { in link_detect_connection_type()
1267 if (!link->dc->config.edp_no_power_sequencing) in link_detect_connection_type()
1268 link->dc->hwss.edp_power_control(link, false); in link_detect_connection_type()
1278 bool link_detect(struct dc_link *link, enum dc_detect_reason reason) in link_detect() argument
1282 enum dc_connection_type pre_link_type = link->type; in link_detect()
1284 DC_LOGGER_INIT(link->ctx->logger); in link_detect()
1286 is_local_sink_detect_success = detect_link_and_local_sink(link, reason); in link_detect()
1288 if (is_local_sink_detect_success && link->local_sink) in link_detect()
1289 verify_link_capability(link, link->local_sink, reason); in link_detect()
1292 link->link_index, is_local_sink_detect_success, pre_link_type, link->type); in link_detect()
1294 if (is_local_sink_detect_success && link->local_sink && in link_detect()
1295 dc_is_dp_signal(link->local_sink->sink_signal) && in link_detect()
1296 link->dpcd_caps.is_mst_capable) in link_detect()
1297 is_delegated_to_mst_top_mgr = discover_dp_mst_topology(link, reason); in link_detect()
1300 link->type != dc_connection_mst_branch) in link_detect()
1301 is_delegated_to_mst_top_mgr = link_reset_cur_dp_mst_topology(link); in link_detect()
1306 void link_clear_dprx_states(struct dc_link *link) in link_clear_dprx_states() argument
1308 memset(&link->dprx_states, 0, sizeof(link->dprx_states)); in link_clear_dprx_states()
1311 bool link_is_hdcp14(struct dc_link *link, enum signal_type signal) in link_is_hdcp14() argument
1318 ret = link->hdcp_caps.bcaps.bits.HDCP_CAPABLE; in link_is_hdcp14()
1335 bool link_is_hdcp22(struct dc_link *link, enum signal_type signal) in link_is_hdcp22() argument
1342 ret = (link->hdcp_caps.bcaps.bits.HDCP_CAPABLE && in link_is_hdcp22()
1343 link->hdcp_caps.rx_caps.fields.byte0.hdcp_capable && in link_is_hdcp22()
1344 (link->hdcp_caps.rx_caps.fields.version == 0x2)) ? 1 : 0; in link_is_hdcp22()
1349 ret = (link->hdcp_caps.rx_caps.fields.version == 0x4) ? 1:0; in link_is_hdcp22()
1358 const struct dc_link_status *link_get_status(const struct dc_link *link) in link_get_status() argument
1360 return &link->link_status; in link_get_status()
1380 struct dc_link *link, in link_add_remote_sink() argument
1398 if (!init_data->link) { in link_add_remote_sink()
1412 link, in link_add_remote_sink()
1417 link, in link_add_remote_sink()
1437 void link_remove_remote_sink(struct dc_link *link, struct dc_sink *sink) in link_remove_remote_sink() argument
1441 if (!link->sink_count) { in link_remove_remote_sink()
1446 for (i = 0; i < link->sink_count; i++) { in link_remove_remote_sink()
1447 if (link->remote_sinks[i] == sink) { in link_remove_remote_sink()
1449 link->remote_sinks[i] = NULL; in link_remove_remote_sink()
1452 while (i < link->sink_count - 1) { in link_remove_remote_sink()
1453 link->remote_sinks[i] = link->remote_sinks[i+1]; in link_remove_remote_sink()
1456 link->remote_sinks[i] = NULL; in link_remove_remote_sink()
1457 link->sink_count--; in link_remove_remote_sink()