1// SPDX-License-Identifier: MIT 2/* 3 * Copyright �� 2023 Intel Corporation 4 */ 5 6#ifndef __INTEL_CX0_PHY_H__ 7#define __INTEL_CX0_PHY_H__ 8 9#include <linux/types.h> 10#include <linux/bitfield.h> 11#include <linux/bits.h> 12 13enum icl_port_dpll_id; 14enum phy; 15struct drm_i915_private; 16struct intel_atomic_state; 17struct intel_c10pll_state; 18struct intel_c20pll_state; 19struct intel_cx0pll_state; 20struct intel_crtc; 21struct intel_crtc_state; 22struct intel_encoder; 23struct intel_hdmi; 24 25bool intel_is_c10phy(struct drm_i915_private *dev_priv, enum phy phy); 26void intel_mtl_pll_enable(struct intel_encoder *encoder, 27 const struct intel_crtc_state *crtc_state); 28void intel_mtl_pll_disable(struct intel_encoder *encoder); 29enum icl_port_dpll_id 30intel_mtl_port_pll_type(struct intel_encoder *encoder, 31 const struct intel_crtc_state *crtc_state); 32 33int intel_cx0pll_calc_state(struct intel_crtc_state *crtc_state, struct intel_encoder *encoder); 34void intel_cx0pll_readout_hw_state(struct intel_encoder *encoder, 35 struct intel_cx0pll_state *pll_state); 36int intel_cx0pll_calc_port_clock(struct intel_encoder *encoder, 37 const struct intel_cx0pll_state *pll_state); 38 39void intel_c10pll_dump_hw_state(struct drm_i915_private *dev_priv, 40 const struct intel_c10pll_state *hw_state); 41void intel_cx0pll_state_verify(struct intel_atomic_state *state, 42 struct intel_crtc *crtc); 43void intel_c20pll_dump_hw_state(struct drm_i915_private *i915, 44 const struct intel_c20pll_state *hw_state); 45void intel_cx0_phy_set_signal_levels(struct intel_encoder *encoder, 46 const struct intel_crtc_state *crtc_state); 47int intel_cx0_phy_check_hdmi_link_rate(struct intel_hdmi *hdmi, int clock); 48int intel_mtl_tbt_calc_port_clock(struct intel_encoder *encoder); 49 50#endif /* __INTEL_CX0_PHY_H__ */ 51