Lines Matching refs:link

50 					struct dp_link_info *link)  in dp_aux_link_power_up()  argument
56 if (link->revision < 0x11) in dp_aux_link_power_up()
78 struct dp_link_info *link) in dp_aux_link_power_down() argument
83 if (link->revision < 0x11) in dp_aux_link_power_down()
100 static int dp_link_get_period(struct dp_link_private *link, int const addr) in dp_link_get_period() argument
107 if (drm_dp_dpcd_readb(link->aux, addr, &data) < 0) { in dp_link_get_period()
126 static int dp_link_parse_audio_channel_period(struct dp_link_private *link) in dp_link_parse_audio_channel_period() argument
129 struct dp_link_test_audio *req = &link->dp_link.test_audio; in dp_link_parse_audio_channel_period()
131 ret = dp_link_get_period(link, DP_TEST_AUDIO_PERIOD_CH1); in dp_link_parse_audio_channel_period()
136 drm_dbg_dp(link->drm_dev, "test_audio_period_ch_1 = 0x%x\n", ret); in dp_link_parse_audio_channel_period()
138 ret = dp_link_get_period(link, DP_TEST_AUDIO_PERIOD_CH2); in dp_link_parse_audio_channel_period()
143 drm_dbg_dp(link->drm_dev, "test_audio_period_ch_2 = 0x%x\n", ret); in dp_link_parse_audio_channel_period()
146 ret = dp_link_get_period(link, DP_TEST_AUDIO_PERIOD_CH3); in dp_link_parse_audio_channel_period()
151 drm_dbg_dp(link->drm_dev, "test_audio_period_ch_3 = 0x%x\n", ret); in dp_link_parse_audio_channel_period()
153 ret = dp_link_get_period(link, DP_TEST_AUDIO_PERIOD_CH4); in dp_link_parse_audio_channel_period()
158 drm_dbg_dp(link->drm_dev, "test_audio_period_ch_4 = 0x%x\n", ret); in dp_link_parse_audio_channel_period()
160 ret = dp_link_get_period(link, DP_TEST_AUDIO_PERIOD_CH5); in dp_link_parse_audio_channel_period()
165 drm_dbg_dp(link->drm_dev, "test_audio_period_ch_5 = 0x%x\n", ret); in dp_link_parse_audio_channel_period()
167 ret = dp_link_get_period(link, DP_TEST_AUDIO_PERIOD_CH6); in dp_link_parse_audio_channel_period()
172 drm_dbg_dp(link->drm_dev, "test_audio_period_ch_6 = 0x%x\n", ret); in dp_link_parse_audio_channel_period()
174 ret = dp_link_get_period(link, DP_TEST_AUDIO_PERIOD_CH7); in dp_link_parse_audio_channel_period()
179 drm_dbg_dp(link->drm_dev, "test_audio_period_ch_7 = 0x%x\n", ret); in dp_link_parse_audio_channel_period()
181 ret = dp_link_get_period(link, DP_TEST_AUDIO_PERIOD_CH8); in dp_link_parse_audio_channel_period()
186 drm_dbg_dp(link->drm_dev, "test_audio_period_ch_8 = 0x%x\n", ret); in dp_link_parse_audio_channel_period()
191 static int dp_link_parse_audio_pattern_type(struct dp_link_private *link) in dp_link_parse_audio_pattern_type() argument
198 rlen = drm_dp_dpcd_readb(link->aux, in dp_link_parse_audio_pattern_type()
212 link->dp_link.test_audio.test_audio_pattern_type = data; in dp_link_parse_audio_pattern_type()
213 drm_dbg_dp(link->drm_dev, "audio pattern type = 0x%x\n", data); in dp_link_parse_audio_pattern_type()
218 static int dp_link_parse_audio_mode(struct dp_link_private *link) in dp_link_parse_audio_mode() argument
228 rlen = drm_dp_dpcd_readb(link->aux, DP_TEST_AUDIO_MODE, &data); in dp_link_parse_audio_mode()
252 link->dp_link.test_audio.test_audio_sampling_rate = sampling_rate; in dp_link_parse_audio_mode()
253 link->dp_link.test_audio.test_audio_channel_count = channel_count; in dp_link_parse_audio_mode()
254 drm_dbg_dp(link->drm_dev, in dp_link_parse_audio_mode()
261 static int dp_link_parse_audio_pattern_params(struct dp_link_private *link) in dp_link_parse_audio_pattern_params() argument
265 ret = dp_link_parse_audio_mode(link); in dp_link_parse_audio_pattern_params()
269 ret = dp_link_parse_audio_pattern_type(link); in dp_link_parse_audio_pattern_params()
273 ret = dp_link_parse_audio_channel_period(link); in dp_link_parse_audio_pattern_params()
311 static int dp_link_parse_timing_params1(struct dp_link_private *link, in dp_link_parse_timing_params1() argument
321 rlen = drm_dp_dpcd_read(link->aux, addr, bp, len); in dp_link_parse_timing_params1()
332 static int dp_link_parse_timing_params2(struct dp_link_private *link, in dp_link_parse_timing_params2() argument
343 rlen = drm_dp_dpcd_read(link->aux, addr, bp, len); in dp_link_parse_timing_params2()
355 static int dp_link_parse_timing_params3(struct dp_link_private *link, in dp_link_parse_timing_params3() argument
362 rlen = drm_dp_dpcd_read(link->aux, addr, &bp, len); in dp_link_parse_timing_params3()
379 static int dp_link_parse_video_pattern_params(struct dp_link_private *link) in dp_link_parse_video_pattern_params() argument
385 rlen = drm_dp_dpcd_readb(link->aux, DP_TEST_PATTERN, &bp); in dp_link_parse_video_pattern_params()
398 link->dp_link.test_video.test_video_pattern = bp; in dp_link_parse_video_pattern_params()
401 rlen = drm_dp_dpcd_readb(link->aux, DP_TEST_MISC0, &bp); in dp_link_parse_video_pattern_params()
408 link->dp_link.test_video.test_dyn_range = in dp_link_parse_video_pattern_params()
419 link->dp_link.test_video.test_bit_depth = bp; in dp_link_parse_video_pattern_params()
422 ret = dp_link_parse_timing_params1(link, DP_TEST_H_TOTAL_HI, 2, in dp_link_parse_video_pattern_params()
423 &link->dp_link.test_video.test_h_total); in dp_link_parse_video_pattern_params()
429 ret = dp_link_parse_timing_params1(link, DP_TEST_V_TOTAL_HI, 2, in dp_link_parse_video_pattern_params()
430 &link->dp_link.test_video.test_v_total); in dp_link_parse_video_pattern_params()
436 ret = dp_link_parse_timing_params1(link, DP_TEST_H_START_HI, 2, in dp_link_parse_video_pattern_params()
437 &link->dp_link.test_video.test_h_start); in dp_link_parse_video_pattern_params()
443 ret = dp_link_parse_timing_params1(link, DP_TEST_V_START_HI, 2, in dp_link_parse_video_pattern_params()
444 &link->dp_link.test_video.test_v_start); in dp_link_parse_video_pattern_params()
450 ret = dp_link_parse_timing_params2(link, DP_TEST_HSYNC_HI, 2, in dp_link_parse_video_pattern_params()
451 &link->dp_link.test_video.test_hsync_pol, in dp_link_parse_video_pattern_params()
452 &link->dp_link.test_video.test_hsync_width); in dp_link_parse_video_pattern_params()
458 ret = dp_link_parse_timing_params2(link, DP_TEST_VSYNC_HI, 2, in dp_link_parse_video_pattern_params()
459 &link->dp_link.test_video.test_vsync_pol, in dp_link_parse_video_pattern_params()
460 &link->dp_link.test_video.test_vsync_width); in dp_link_parse_video_pattern_params()
466 ret = dp_link_parse_timing_params1(link, DP_TEST_H_WIDTH_HI, 2, in dp_link_parse_video_pattern_params()
467 &link->dp_link.test_video.test_h_width); in dp_link_parse_video_pattern_params()
473 ret = dp_link_parse_timing_params1(link, DP_TEST_V_HEIGHT_HI, 2, in dp_link_parse_video_pattern_params()
474 &link->dp_link.test_video.test_v_height); in dp_link_parse_video_pattern_params()
480 ret = dp_link_parse_timing_params3(link, DP_TEST_MISC1, in dp_link_parse_video_pattern_params()
481 &link->dp_link.test_video.test_rr_d); in dp_link_parse_video_pattern_params()
482 link->dp_link.test_video.test_rr_d &= DP_TEST_REFRESH_DENOMINATOR; in dp_link_parse_video_pattern_params()
488 ret = dp_link_parse_timing_params3(link, DP_TEST_REFRESH_RATE_NUMERATOR, in dp_link_parse_video_pattern_params()
489 &link->dp_link.test_video.test_rr_n); in dp_link_parse_video_pattern_params()
495 drm_dbg_dp(link->drm_dev, in dp_link_parse_video_pattern_params()
509 link->dp_link.test_video.test_video_pattern, in dp_link_parse_video_pattern_params()
510 link->dp_link.test_video.test_dyn_range, in dp_link_parse_video_pattern_params()
511 link->dp_link.test_video.test_bit_depth, in dp_link_parse_video_pattern_params()
512 link->dp_link.test_video.test_h_total, in dp_link_parse_video_pattern_params()
513 link->dp_link.test_video.test_v_total, in dp_link_parse_video_pattern_params()
514 link->dp_link.test_video.test_h_start, in dp_link_parse_video_pattern_params()
515 link->dp_link.test_video.test_v_start, in dp_link_parse_video_pattern_params()
516 link->dp_link.test_video.test_hsync_pol, in dp_link_parse_video_pattern_params()
517 link->dp_link.test_video.test_hsync_width, in dp_link_parse_video_pattern_params()
518 link->dp_link.test_video.test_vsync_pol, in dp_link_parse_video_pattern_params()
519 link->dp_link.test_video.test_vsync_width, in dp_link_parse_video_pattern_params()
520 link->dp_link.test_video.test_h_width, in dp_link_parse_video_pattern_params()
521 link->dp_link.test_video.test_v_height, in dp_link_parse_video_pattern_params()
522 link->dp_link.test_video.test_rr_d, in dp_link_parse_video_pattern_params()
523 link->dp_link.test_video.test_rr_n); in dp_link_parse_video_pattern_params()
536 static int dp_link_parse_link_training_params(struct dp_link_private *link) in dp_link_parse_link_training_params() argument
541 rlen = drm_dp_dpcd_readb(link->aux, DP_TEST_LINK_RATE, &bp); in dp_link_parse_link_training_params()
552 link->request.test_link_rate = bp; in dp_link_parse_link_training_params()
553 drm_dbg_dp(link->drm_dev, "link rate = 0x%x\n", in dp_link_parse_link_training_params()
554 link->request.test_link_rate); in dp_link_parse_link_training_params()
556 rlen = drm_dp_dpcd_readb(link->aux, DP_TEST_LANE_COUNT, &bp); in dp_link_parse_link_training_params()
568 link->request.test_lane_count = bp; in dp_link_parse_link_training_params()
569 drm_dbg_dp(link->drm_dev, "lane count = 0x%x\n", in dp_link_parse_link_training_params()
570 link->request.test_lane_count); in dp_link_parse_link_training_params()
581 static int dp_link_parse_phy_test_params(struct dp_link_private *link) in dp_link_parse_phy_test_params() argument
586 rlen = drm_dp_dpcd_readb(link->aux, DP_PHY_TEST_PATTERN, in dp_link_parse_phy_test_params()
593 link->dp_link.phy_params.phy_test_pattern_sel = data & 0x07; in dp_link_parse_phy_test_params()
595 drm_dbg_dp(link->drm_dev, "phy_test_pattern_sel = 0x%x\n", data); in dp_link_parse_phy_test_params()
617 static bool dp_link_is_video_audio_test_requested(u32 link) in dp_link_is_video_audio_test_requested() argument
623 return ((link & video_audio_test) && in dp_link_is_video_audio_test_requested()
624 !(link & ~video_audio_test)); in dp_link_is_video_audio_test_requested()
634 static int dp_link_parse_request(struct dp_link_private *link) in dp_link_parse_request() argument
644 rlen = drm_dp_dpcd_readb(link->aux, in dp_link_parse_request()
651 drm_dbg_dp(link->drm_dev, "device service irq vector = 0x%x\n", data); in dp_link_parse_request()
654 drm_dbg_dp(link->drm_dev, "no test requested\n"); in dp_link_parse_request()
662 rlen = drm_dp_dpcd_readb(link->aux, DP_TEST_REQUEST, &data); in dp_link_parse_request()
669 drm_dbg_dp(link->drm_dev, "link 0x%x not supported\n", data); in dp_link_parse_request()
673 drm_dbg_dp(link->drm_dev, "Test:(0x%x) requested\n", data); in dp_link_parse_request()
674 link->request.test_requested = data; in dp_link_parse_request()
675 if (link->request.test_requested == DP_TEST_LINK_PHY_TEST_PATTERN) { in dp_link_parse_request()
676 ret = dp_link_parse_phy_test_params(link); in dp_link_parse_request()
679 ret = dp_link_parse_link_training_params(link); in dp_link_parse_request()
684 if (link->request.test_requested == DP_TEST_LINK_TRAINING) { in dp_link_parse_request()
685 ret = dp_link_parse_link_training_params(link); in dp_link_parse_request()
691 link->request.test_requested)) { in dp_link_parse_request()
692 ret = dp_link_parse_video_pattern_params(link); in dp_link_parse_request()
696 ret = dp_link_parse_audio_pattern_params(link); in dp_link_parse_request()
704 link->dp_link.test_response = DP_TEST_NAK; in dp_link_parse_request()
706 if (link->request.test_requested != DP_TEST_LINK_EDID_READ) in dp_link_parse_request()
707 link->dp_link.test_response = DP_TEST_ACK; in dp_link_parse_request()
709 link->dp_link.test_response = in dp_link_parse_request()
729 struct dp_link_private *link = container_of(dp_link, in dp_link_parse_sink_count() local
732 rlen = drm_dp_dpcd_readb(link->aux, DP_SINK_COUNT, in dp_link_parse_sink_count()
733 &link->dp_link.sink_count); in dp_link_parse_sink_count()
739 cp_ready = link->dp_link.sink_count & DP_SINK_CP_READY; in dp_link_parse_sink_count()
741 link->dp_link.sink_count = in dp_link_parse_sink_count()
742 DP_GET_SINK_COUNT(link->dp_link.sink_count); in dp_link_parse_sink_count()
744 drm_dbg_dp(link->drm_dev, "sink_count = 0x%x, cp_ready = 0x%x\n", in dp_link_parse_sink_count()
745 link->dp_link.sink_count, cp_ready); in dp_link_parse_sink_count()
749 static int dp_link_parse_sink_status_field(struct dp_link_private *link) in dp_link_parse_sink_status_field() argument
753 link->prev_sink_count = link->dp_link.sink_count; in dp_link_parse_sink_status_field()
754 len = dp_link_parse_sink_count(&link->dp_link); in dp_link_parse_sink_status_field()
760 len = drm_dp_dpcd_read_link_status(link->aux, in dp_link_parse_sink_status_field()
761 link->link_status); in dp_link_parse_sink_status_field()
767 return dp_link_parse_request(link); in dp_link_parse_sink_status_field()
781 static int dp_link_process_link_training_request(struct dp_link_private *link) in dp_link_process_link_training_request() argument
783 if (link->request.test_requested != DP_TEST_LINK_TRAINING) in dp_link_process_link_training_request()
786 drm_dbg_dp(link->drm_dev, in dp_link_process_link_training_request()
789 link->request.test_link_rate, in dp_link_process_link_training_request()
790 link->request.test_lane_count); in dp_link_process_link_training_request()
792 link->dp_link.link_params.num_lanes = link->request.test_lane_count; in dp_link_process_link_training_request()
793 link->dp_link.link_params.rate = in dp_link_process_link_training_request()
794 drm_dp_bw_code_to_link_rate(link->request.test_link_rate); in dp_link_process_link_training_request()
801 struct dp_link_private *link = NULL; in dp_link_send_test_response() local
809 link = container_of(dp_link, struct dp_link_private, dp_link); in dp_link_send_test_response()
811 ret = drm_dp_dpcd_writeb(link->aux, DP_TEST_RESPONSE, in dp_link_send_test_response()
820 struct dp_link_private *link = NULL; in dp_link_psm_config() local
828 link = container_of(dp_link, struct dp_link_private, dp_link); in dp_link_psm_config()
830 mutex_lock(&link->psm_mutex); in dp_link_psm_config()
832 ret = dp_aux_link_power_down(link->aux, link_info); in dp_link_psm_config()
834 ret = dp_aux_link_power_up(link->aux, link_info); in dp_link_psm_config()
842 mutex_unlock(&link->psm_mutex); in dp_link_psm_config()
848 struct dp_link_private *link = NULL; in dp_link_send_edid_checksum() local
856 link = container_of(dp_link, struct dp_link_private, dp_link); in dp_link_send_edid_checksum()
858 ret = drm_dp_dpcd_writeb(link->aux, DP_TEST_EDID_CHECKSUM, in dp_link_send_edid_checksum()
863 static void dp_link_parse_vx_px(struct dp_link_private *link) in dp_link_parse_vx_px() argument
865 drm_dbg_dp(link->drm_dev, "vx: 0=%d, 1=%d, 2=%d, 3=%d\n", in dp_link_parse_vx_px()
866 drm_dp_get_adjust_request_voltage(link->link_status, 0), in dp_link_parse_vx_px()
867 drm_dp_get_adjust_request_voltage(link->link_status, 1), in dp_link_parse_vx_px()
868 drm_dp_get_adjust_request_voltage(link->link_status, 2), in dp_link_parse_vx_px()
869 drm_dp_get_adjust_request_voltage(link->link_status, 3)); in dp_link_parse_vx_px()
871 drm_dbg_dp(link->drm_dev, "px: 0=%d, 1=%d, 2=%d, 3=%d\n", in dp_link_parse_vx_px()
872 drm_dp_get_adjust_request_pre_emphasis(link->link_status, 0), in dp_link_parse_vx_px()
873 drm_dp_get_adjust_request_pre_emphasis(link->link_status, 1), in dp_link_parse_vx_px()
874 drm_dp_get_adjust_request_pre_emphasis(link->link_status, 2), in dp_link_parse_vx_px()
875 drm_dp_get_adjust_request_pre_emphasis(link->link_status, 3)); in dp_link_parse_vx_px()
881 drm_dbg_dp(link->drm_dev, in dp_link_parse_vx_px()
883 link->dp_link.phy_params.v_level, in dp_link_parse_vx_px()
884 link->dp_link.phy_params.p_level); in dp_link_parse_vx_px()
885 link->dp_link.phy_params.v_level = in dp_link_parse_vx_px()
886 drm_dp_get_adjust_request_voltage(link->link_status, 0); in dp_link_parse_vx_px()
887 link->dp_link.phy_params.p_level = in dp_link_parse_vx_px()
888 drm_dp_get_adjust_request_pre_emphasis(link->link_status, 0); in dp_link_parse_vx_px()
890 link->dp_link.phy_params.p_level >>= DP_TRAIN_PRE_EMPHASIS_SHIFT; in dp_link_parse_vx_px()
892 drm_dbg_dp(link->drm_dev, in dp_link_parse_vx_px()
894 link->dp_link.phy_params.v_level, in dp_link_parse_vx_px()
895 link->dp_link.phy_params.p_level); in dp_link_parse_vx_px()
907 struct dp_link_private *link) in dp_link_process_phy_test_pattern_request() argument
909 if (!(link->request.test_requested & DP_TEST_LINK_PHY_TEST_PATTERN)) { in dp_link_process_phy_test_pattern_request()
910 drm_dbg_dp(link->drm_dev, "no phy test\n"); in dp_link_process_phy_test_pattern_request()
914 if (!is_link_rate_valid(link->request.test_link_rate) || in dp_link_process_phy_test_pattern_request()
915 !is_lane_count_valid(link->request.test_lane_count)) { in dp_link_process_phy_test_pattern_request()
917 link->request.test_link_rate, in dp_link_process_phy_test_pattern_request()
918 link->request.test_lane_count); in dp_link_process_phy_test_pattern_request()
922 drm_dbg_dp(link->drm_dev, in dp_link_process_phy_test_pattern_request()
924 link->dp_link.link_params.rate, in dp_link_process_phy_test_pattern_request()
925 link->dp_link.link_params.num_lanes); in dp_link_process_phy_test_pattern_request()
927 drm_dbg_dp(link->drm_dev, in dp_link_process_phy_test_pattern_request()
929 link->request.test_link_rate, in dp_link_process_phy_test_pattern_request()
930 link->request.test_lane_count); in dp_link_process_phy_test_pattern_request()
932 link->dp_link.link_params.num_lanes = link->request.test_lane_count; in dp_link_process_phy_test_pattern_request()
933 link->dp_link.link_params.rate = in dp_link_process_phy_test_pattern_request()
934 drm_dp_bw_code_to_link_rate(link->request.test_link_rate); in dp_link_process_phy_test_pattern_request()
936 dp_link_parse_vx_px(link); in dp_link_process_phy_test_pattern_request()
941 static bool dp_link_read_psr_error_status(struct dp_link_private *link) in dp_link_read_psr_error_status() argument
945 drm_dp_dpcd_read(link->aux, DP_PSR_ERROR_STATUS, &status, 1); in dp_link_read_psr_error_status()
959 static bool dp_link_psr_capability_changed(struct dp_link_private *link) in dp_link_psr_capability_changed() argument
963 drm_dp_dpcd_read(link->aux, DP_PSR_ESI, &status, 1); in dp_link_psr_capability_changed()
966 drm_dbg_dp(link->drm_dev, "PSR Capability Change\n"); in dp_link_psr_capability_changed()
989 static int dp_link_process_link_status_update(struct dp_link_private *link) in dp_link_process_link_status_update() argument
991 bool channel_eq_done = drm_dp_channel_eq_ok(link->link_status, in dp_link_process_link_status_update()
992 link->dp_link.link_params.num_lanes); in dp_link_process_link_status_update()
994 bool clock_recovery_done = drm_dp_clock_recovery_ok(link->link_status, in dp_link_process_link_status_update()
995 link->dp_link.link_params.num_lanes); in dp_link_process_link_status_update()
997 drm_dbg_dp(link->drm_dev, in dp_link_process_link_status_update()
1018 static int dp_link_process_ds_port_status_change(struct dp_link_private *link) in dp_link_process_ds_port_status_change() argument
1020 if (get_link_status(link->link_status, DP_LANE_ALIGN_STATUS_UPDATED) & in dp_link_process_ds_port_status_change()
1024 if (link->prev_sink_count == link->dp_link.sink_count) in dp_link_process_ds_port_status_change()
1029 link->prev_sink_count = link->dp_link.sink_count; in dp_link_process_ds_port_status_change()
1034 static bool dp_link_is_video_pattern_requested(struct dp_link_private *link) in dp_link_is_video_pattern_requested() argument
1036 return (link->request.test_requested & DP_TEST_LINK_VIDEO_PATTERN) in dp_link_is_video_pattern_requested()
1037 && !(link->request.test_requested & in dp_link_is_video_pattern_requested()
1041 static bool dp_link_is_audio_pattern_requested(struct dp_link_private *link) in dp_link_is_audio_pattern_requested() argument
1043 return (link->request.test_requested & DP_TEST_LINK_AUDIO_PATTERN); in dp_link_is_audio_pattern_requested()
1046 static void dp_link_reset_data(struct dp_link_private *link) in dp_link_reset_data() argument
1048 link->request = (const struct dp_link_request){ 0 }; in dp_link_reset_data()
1049 link->dp_link.test_video = (const struct dp_link_test_video){ 0 }; in dp_link_reset_data()
1050 link->dp_link.test_video.test_bit_depth = DP_TEST_BIT_DEPTH_UNKNOWN; in dp_link_reset_data()
1051 link->dp_link.test_audio = (const struct dp_link_test_audio){ 0 }; in dp_link_reset_data()
1052 link->dp_link.phy_params.phy_test_pattern_sel = 0; in dp_link_reset_data()
1053 link->dp_link.sink_request = 0; in dp_link_reset_data()
1054 link->dp_link.test_response = 0; in dp_link_reset_data()
1068 struct dp_link_private *link; in dp_link_process_request() local
1075 link = container_of(dp_link, struct dp_link_private, dp_link); in dp_link_process_request()
1077 dp_link_reset_data(link); in dp_link_process_request()
1079 ret = dp_link_parse_sink_status_field(link); in dp_link_process_request()
1083 if (link->request.test_requested == DP_TEST_LINK_EDID_READ) { in dp_link_process_request()
1085 } else if (!dp_link_process_ds_port_status_change(link)) { in dp_link_process_request()
1087 } else if (!dp_link_process_link_training_request(link)) { in dp_link_process_request()
1089 } else if (!dp_link_process_phy_test_pattern_request(link)) { in dp_link_process_request()
1091 } else if (dp_link_read_psr_error_status(link)) { in dp_link_process_request()
1093 } else if (dp_link_psr_capability_changed(link)) { in dp_link_process_request()
1094 drm_dbg_dp(link->drm_dev, "PSR Capability changed\n"); in dp_link_process_request()
1096 ret = dp_link_process_link_status_update(link); in dp_link_process_request()
1100 if (dp_link_is_video_pattern_requested(link)) { in dp_link_process_request()
1104 if (dp_link_is_audio_pattern_requested(link)) { in dp_link_process_request()
1111 drm_dbg_dp(link->drm_dev, "sink request=%#x\n", in dp_link_process_request()
1119 struct dp_link_private *link; in dp_link_get_colorimetry_config() local
1126 link = container_of(dp_link, struct dp_link_private, dp_link); in dp_link_get_colorimetry_config()
1132 if (dp_link_is_video_pattern_requested(link)) { in dp_link_get_colorimetry_config()
1133 if (link->dp_link.test_video.test_dyn_range & in dp_link_get_colorimetry_config()
1145 struct dp_link_private *link; in dp_link_adjust_levels() local
1152 link = container_of(dp_link, struct dp_link_private, dp_link); in dp_link_adjust_levels()
1159 drm_dbg_dp(link->drm_dev, in dp_link_adjust_levels()
1176 drm_dbg_dp(link->drm_dev, in dp_link_adjust_levels()
1184 drm_dbg_dp(link->drm_dev, in dp_link_adjust_levels()
1194 drm_dbg_dp(link->drm_dev, in dp_link_adjust_levels()
1201 drm_dbg_dp(link->drm_dev, "adjusted: v_level=%d, p_level=%d\n", in dp_link_adjust_levels()
1216 struct dp_link_private *link; in dp_link_get_test_bits_depth() local
1218 link = container_of(dp_link, struct dp_link_private, dp_link); in dp_link_get_test_bits_depth()
1236 drm_dbg_dp(link->drm_dev, "bpp=%d not supported, use bpc=8\n", in dp_link_get_test_bits_depth()
1249 struct dp_link_private *link; in dp_link_get() local
1257 link = devm_kzalloc(dev, sizeof(*link), GFP_KERNEL); in dp_link_get()
1258 if (!link) in dp_link_get()
1261 link->dev = dev; in dp_link_get()
1262 link->aux = aux; in dp_link_get()
1264 mutex_init(&link->psm_mutex); in dp_link_get()
1265 dp_link = &link->dp_link; in dp_link_get()