Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 /*
0003  * Copyright © 2019 Intel Corporation
0004  */
0005 
0006 #ifndef __INTEL_DP_LINK_TRAINING_H__
0007 #define __INTEL_DP_LINK_TRAINING_H__
0008 
0009 #include <drm/display/drm_dp_helper.h>
0010 
0011 struct intel_crtc_state;
0012 struct intel_dp;
0013 
0014 int intel_dp_init_lttpr_and_dprx_caps(struct intel_dp *intel_dp);
0015 
0016 void intel_dp_get_adjust_train(struct intel_dp *intel_dp,
0017                    const struct intel_crtc_state *crtc_state,
0018                    enum drm_dp_phy dp_phy,
0019                    const u8 link_status[DP_LINK_STATUS_SIZE]);
0020 void intel_dp_program_link_training_pattern(struct intel_dp *intel_dp,
0021                         const struct intel_crtc_state *crtc_state,
0022                         enum drm_dp_phy dp_phy,
0023                         u8 dp_train_pat);
0024 void intel_dp_set_signal_levels(struct intel_dp *intel_dp,
0025                 const struct intel_crtc_state *crtc_state,
0026                 enum drm_dp_phy dp_phy);
0027 void intel_dp_start_link_train(struct intel_dp *intel_dp,
0028                    const struct intel_crtc_state *crtc_state);
0029 void intel_dp_stop_link_train(struct intel_dp *intel_dp,
0030                   const struct intel_crtc_state *crtc_state);
0031 
0032 void
0033 intel_dp_dump_link_status(struct intel_dp *intel_dp, enum drm_dp_phy dp_phy,
0034               const u8 link_status[DP_LINK_STATUS_SIZE]);
0035 
0036 /* Get the TPSx symbol type of the value programmed to DP_TRAINING_PATTERN_SET */
0037 static inline u8 intel_dp_training_pattern_symbol(u8 pattern)
0038 {
0039     return pattern & ~DP_LINK_SCRAMBLING_DISABLE;
0040 }
0041 
0042 #endif /* __INTEL_DP_LINK_TRAINING_H__ */