Linux Audio

Check our new training course

Loading...
v6.9.4
 1/* SPDX-License-Identifier: MIT */
 2/*
 3 * Copyright © 2019 Intel Corporation
 4 */
 5
 6#ifndef __INTEL_DP_LINK_TRAINING_H__
 7#define __INTEL_DP_LINK_TRAINING_H__
 8
 9#include <drm/display/drm_dp_helper.h>
10
11struct intel_crtc_state;
12struct intel_dp;
13
14int intel_dp_read_dprx_caps(struct intel_dp *intel_dp, u8 dpcd[DP_RECEIVER_CAP_SIZE]);
15int intel_dp_init_lttpr_and_dprx_caps(struct intel_dp *intel_dp);
16
17void intel_dp_get_adjust_train(struct intel_dp *intel_dp,
18			       const struct intel_crtc_state *crtc_state,
19			       enum drm_dp_phy dp_phy,
20			       const u8 link_status[DP_LINK_STATUS_SIZE]);
21void intel_dp_program_link_training_pattern(struct intel_dp *intel_dp,
22					    const struct intel_crtc_state *crtc_state,
23					    enum drm_dp_phy dp_phy,
24					    u8 dp_train_pat);
25void intel_dp_set_signal_levels(struct intel_dp *intel_dp,
26				const struct intel_crtc_state *crtc_state,
27				enum drm_dp_phy dp_phy);
28void intel_dp_start_link_train(struct intel_dp *intel_dp,
29			       const struct intel_crtc_state *crtc_state);
30void intel_dp_stop_link_train(struct intel_dp *intel_dp,
31			      const struct intel_crtc_state *crtc_state);
32
33void
34intel_dp_dump_link_status(struct intel_dp *intel_dp, enum drm_dp_phy dp_phy,
35			  const u8 link_status[DP_LINK_STATUS_SIZE]);
36
37/* Get the TPSx symbol type of the value programmed to DP_TRAINING_PATTERN_SET */
38static inline u8 intel_dp_training_pattern_symbol(u8 pattern)
39{
40	return pattern & ~DP_LINK_SCRAMBLING_DISABLE;
41}
42
43void intel_dp_128b132b_sdp_crc16(struct intel_dp *intel_dp,
44				 const struct intel_crtc_state *crtc_state);
45#endif /* __INTEL_DP_LINK_TRAINING_H__ */
v6.8
 1/* SPDX-License-Identifier: MIT */
 2/*
 3 * Copyright © 2019 Intel Corporation
 4 */
 5
 6#ifndef __INTEL_DP_LINK_TRAINING_H__
 7#define __INTEL_DP_LINK_TRAINING_H__
 8
 9#include <drm/display/drm_dp_helper.h>
10
11struct intel_crtc_state;
12struct intel_dp;
13
 
14int intel_dp_init_lttpr_and_dprx_caps(struct intel_dp *intel_dp);
15
16void 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]);
20void intel_dp_program_link_training_pattern(struct intel_dp *intel_dp,
21					    const struct intel_crtc_state *crtc_state,
22					    enum drm_dp_phy dp_phy,
23					    u8 dp_train_pat);
24void intel_dp_set_signal_levels(struct intel_dp *intel_dp,
25				const struct intel_crtc_state *crtc_state,
26				enum drm_dp_phy dp_phy);
27void intel_dp_start_link_train(struct intel_dp *intel_dp,
28			       const struct intel_crtc_state *crtc_state);
29void intel_dp_stop_link_train(struct intel_dp *intel_dp,
30			      const struct intel_crtc_state *crtc_state);
31
32void
33intel_dp_dump_link_status(struct intel_dp *intel_dp, enum drm_dp_phy dp_phy,
34			  const u8 link_status[DP_LINK_STATUS_SIZE]);
35
36/* Get the TPSx symbol type of the value programmed to DP_TRAINING_PATTERN_SET */
37static inline u8 intel_dp_training_pattern_symbol(u8 pattern)
38{
39	return pattern & ~DP_LINK_SCRAMBLING_DISABLE;
40}
41
42void intel_dp_128b132b_sdp_crc16(struct intel_dp *intel_dp,
43				 const struct intel_crtc_state *crtc_state);
44#endif /* __INTEL_DP_LINK_TRAINING_H__ */