Linux Audio

Check our new training course

Loading...
Note: File does not exist in v3.1.
 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
11struct drm_connector_state;
12struct drm_i915_private;
13struct intel_atomic_state;
14struct intel_bios_encoder_data;
15struct intel_connector;
16struct intel_crtc;
17struct intel_crtc_state;
18struct intel_display;
19struct intel_dp;
20struct intel_dpll_hw_state;
21struct intel_encoder;
22struct intel_shared_dpll;
23enum pipe;
24enum port;
25enum transcoder;
26
27i915_reg_t dp_tp_ctl_reg(struct intel_encoder *encoder,
28			 const struct intel_crtc_state *crtc_state);
29i915_reg_t dp_tp_status_reg(struct intel_encoder *encoder,
30			    const struct intel_crtc_state *crtc_state);
31i915_reg_t hsw_chicken_trans_reg(struct drm_i915_private *i915,
32				 enum transcoder cpu_transcoder);
33void intel_ddi_fdi_post_disable(struct intel_atomic_state *state,
34				struct intel_encoder *intel_encoder,
35				const struct intel_crtc_state *old_crtc_state,
36				const struct drm_connector_state *old_conn_state);
37void intel_ddi_enable_clock(struct intel_encoder *encoder,
38			    const struct intel_crtc_state *crtc_state);
39void intel_ddi_disable_clock(struct intel_encoder *encoder);
40void intel_ddi_get_clock(struct intel_encoder *encoder,
41			 struct intel_crtc_state *crtc_state,
42			 struct intel_shared_dpll *pll);
43void hsw_ddi_enable_clock(struct intel_encoder *encoder,
44			  const struct intel_crtc_state *crtc_state);
45void hsw_ddi_disable_clock(struct intel_encoder *encoder);
46bool hsw_ddi_is_clock_enabled(struct intel_encoder *encoder);
47enum icl_port_dpll_id
48intel_ddi_port_pll_type(struct intel_encoder *encoder,
49			const struct intel_crtc_state *crtc_state);
50void hsw_ddi_get_config(struct intel_encoder *encoder,
51			struct intel_crtc_state *crtc_state);
52struct intel_shared_dpll *icl_ddi_combo_get_pll(struct intel_encoder *encoder);
53void hsw_prepare_dp_ddi_buffers(struct intel_encoder *encoder,
54				const struct intel_crtc_state *crtc_state);
55void intel_wait_ddi_buf_idle(struct drm_i915_private *dev_priv,
56			     enum port port);
57void intel_ddi_init(struct intel_display *display,
58		    const struct intel_bios_encoder_data *devdata);
59bool intel_ddi_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe);
60void intel_ddi_enable_transcoder_func(struct intel_encoder *encoder,
61				      const struct intel_crtc_state *crtc_state);
62void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state);
63void intel_ddi_enable_transcoder_clock(struct intel_encoder *encoder,
64				       const struct intel_crtc_state *crtc_state);
65void intel_ddi_disable_transcoder_clock(const  struct intel_crtc_state *crtc_state);
66int intel_ddi_wait_for_fec_status(struct intel_encoder *encoder,
67				  const struct intel_crtc_state *crtc_state,
68				  bool enabled);
69void intel_ddi_set_dp_msa(const struct intel_crtc_state *crtc_state,
70			  const struct drm_connector_state *conn_state);
71bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector);
72void intel_ddi_set_vc_payload_alloc(const struct intel_crtc_state *crtc_state,
73				    bool state);
74void intel_ddi_compute_min_voltage_level(struct intel_crtc_state *crtc_state);
75int intel_ddi_toggle_hdcp_bits(struct intel_encoder *intel_encoder,
76			       enum transcoder cpu_transcoder,
77			       bool enable, u32 hdcp_mask);
78void intel_ddi_sanitize_encoder_pll_mapping(struct intel_encoder *encoder);
79int intel_ddi_level(struct intel_encoder *encoder,
80		    const struct intel_crtc_state *crtc_state,
81		    int lane);
82void intel_ddi_update_active_dpll(struct intel_atomic_state *state,
83				  struct intel_encoder *encoder,
84				  struct intel_crtc *crtc);
85
86#endif /* __INTEL_DDI_H__ */