1 | /* SPDX-License-Identifier: MIT */ |
2 | /* |
3 | * Copyright © 2019 Intel Corporation |
4 | */ |
5 | |
6 | #ifndef __INTEL_DDI_H__ |
7 | #define __INTEL_DDI_H__ |
8 | |
9 | #include "i915_reg_defs.h" |
10 | |
11 | struct drm_connector_state; |
12 | struct intel_atomic_state; |
13 | struct intel_bios_encoder_data; |
14 | struct intel_connector; |
15 | struct intel_crtc; |
16 | struct intel_crtc_state; |
17 | struct intel_display; |
18 | struct intel_dp; |
19 | struct intel_dpll_hw_state; |
20 | struct intel_encoder; |
21 | struct intel_shared_dpll; |
22 | enum pipe; |
23 | enum port; |
24 | enum transcoder; |
25 | |
26 | i915_reg_t dp_tp_ctl_reg(struct intel_encoder *encoder, |
27 | const struct intel_crtc_state *crtc_state); |
28 | |
29 | void intel_ddi_clear_act_sent(struct intel_encoder *encoder, |
30 | const struct intel_crtc_state *crtc_state); |
31 | void intel_ddi_wait_for_act_sent(struct intel_encoder *encoder, |
32 | const struct intel_crtc_state *crtc_state); |
33 | |
34 | void intel_ddi_fdi_post_disable(struct intel_atomic_state *state, |
35 | struct intel_encoder *intel_encoder, |
36 | const struct intel_crtc_state *old_crtc_state, |
37 | const struct drm_connector_state *old_conn_state); |
38 | void intel_ddi_enable_clock(struct intel_encoder *encoder, |
39 | const struct intel_crtc_state *crtc_state); |
40 | void intel_ddi_disable_clock(struct intel_encoder *encoder); |
41 | void intel_ddi_get_clock(struct intel_encoder *encoder, |
42 | struct intel_crtc_state *crtc_state, |
43 | struct intel_shared_dpll *pll); |
44 | void hsw_ddi_enable_clock(struct intel_encoder *encoder, |
45 | const struct intel_crtc_state *crtc_state); |
46 | void hsw_ddi_disable_clock(struct intel_encoder *encoder); |
47 | bool hsw_ddi_is_clock_enabled(struct intel_encoder *encoder); |
48 | enum icl_port_dpll_id |
49 | intel_ddi_port_pll_type(struct intel_encoder *encoder, |
50 | const struct intel_crtc_state *crtc_state); |
51 | void hsw_ddi_get_config(struct intel_encoder *encoder, |
52 | struct intel_crtc_state *crtc_state); |
53 | struct intel_shared_dpll *icl_ddi_combo_get_pll(struct intel_encoder *encoder); |
54 | void hsw_prepare_dp_ddi_buffers(struct intel_encoder *encoder, |
55 | const struct intel_crtc_state *crtc_state); |
56 | void intel_wait_ddi_buf_idle(struct intel_display *display, enum port port); |
57 | void intel_ddi_init(struct intel_display *display, |
58 | const struct intel_bios_encoder_data *devdata); |
59 | bool intel_ddi_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe); |
60 | void intel_ddi_config_transcoder_func(struct intel_encoder *encoder, |
61 | const struct intel_crtc_state *crtc_state); |
62 | void intel_ddi_enable_transcoder_func(struct intel_encoder *encoder, |
63 | const struct intel_crtc_state *crtc_state); |
64 | void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state); |
65 | void intel_ddi_enable_transcoder_clock(struct intel_encoder *encoder, |
66 | const struct intel_crtc_state *crtc_state); |
67 | void intel_ddi_disable_transcoder_clock(const struct intel_crtc_state *crtc_state); |
68 | int intel_ddi_wait_for_fec_status(struct intel_encoder *encoder, |
69 | const struct intel_crtc_state *crtc_state, |
70 | bool enabled); |
71 | void intel_ddi_set_dp_msa(const struct intel_crtc_state *crtc_state, |
72 | const struct drm_connector_state *conn_state); |
73 | bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector); |
74 | void intel_ddi_set_vc_payload_alloc(const struct intel_crtc_state *crtc_state, |
75 | bool state); |
76 | void intel_ddi_compute_min_voltage_level(struct intel_crtc_state *crtc_state); |
77 | int intel_ddi_toggle_hdcp_bits(struct intel_encoder *intel_encoder, |
78 | enum transcoder cpu_transcoder, |
79 | bool enable, u32 hdcp_mask); |
80 | void intel_ddi_sanitize_encoder_pll_mapping(struct intel_encoder *encoder); |
81 | int intel_ddi_level(struct intel_encoder *encoder, |
82 | const struct intel_crtc_state *crtc_state, |
83 | int lane); |
84 | void intel_ddi_update_active_dpll(struct intel_atomic_state *state, |
85 | struct intel_encoder *encoder, |
86 | struct intel_crtc *crtc); |
87 | |
88 | #endif /* __INTEL_DDI_H__ */ |
89 | |