Merge tag 'io_uring-5.11-2021-01-16' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / i915 / display / intel_dp_link_training.h
blob86905aa24db76a6c079118b32fca14beb91cc65f
1 /* SPDX-License-Identifier: MIT */
2 /*
3 * Copyright © 2019 Intel Corporation
4 */
6 #ifndef __INTEL_DP_LINK_TRAINING_H__
7 #define __INTEL_DP_LINK_TRAINING_H__
9 #include <drm/drm_dp_helper.h>
11 struct intel_crtc_state;
12 struct intel_dp;
14 int intel_dp_lttpr_init(struct intel_dp *intel_dp);
16 void intel_dp_get_adjust_train(struct intel_dp *intel_dp,
17 const struct intel_crtc_state *crtc_state,
18 enum drm_dp_phy dp_phy,
19 const u8 link_status[DP_LINK_STATUS_SIZE]);
20 void intel_dp_start_link_train(struct intel_dp *intel_dp,
21 const struct intel_crtc_state *crtc_state);
22 void intel_dp_stop_link_train(struct intel_dp *intel_dp,
23 const struct intel_crtc_state *crtc_state);
25 /* Get the TPSx symbol type of the value programmed to DP_TRAINING_PATTERN_SET */
26 static inline u8 intel_dp_training_pattern_symbol(u8 pattern)
28 return pattern & ~DP_LINK_SCRAMBLING_DISABLE;
31 #endif /* __INTEL_DP_LINK_TRAINING_H__ */