Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 /*
0003  * Copyright © 2020 Intel Corporation
0004  */
0005 
0006 #ifndef _INTEL_DPLL_H_
0007 #define _INTEL_DPLL_H_
0008 
0009 #include <linux/types.h>
0010 
0011 struct dpll;
0012 struct drm_i915_private;
0013 struct intel_atomic_state;
0014 struct intel_crtc;
0015 struct intel_crtc_state;
0016 enum pipe;
0017 
0018 void intel_dpll_init_clock_hook(struct drm_i915_private *dev_priv);
0019 int intel_dpll_crtc_compute_clock(struct intel_atomic_state *state,
0020                   struct intel_crtc *crtc);
0021 int intel_dpll_crtc_get_shared_dpll(struct intel_atomic_state *state,
0022                     struct intel_crtc *crtc);
0023 int vlv_calc_dpll_params(int refclk, struct dpll *clock);
0024 int pnv_calc_dpll_params(int refclk, struct dpll *clock);
0025 int i9xx_calc_dpll_params(int refclk, struct dpll *clock);
0026 u32 i9xx_dpll_compute_fp(const struct dpll *dpll);
0027 void vlv_compute_dpll(struct intel_crtc_state *crtc_state);
0028 void chv_compute_dpll(struct intel_crtc_state *crtc_state);
0029 
0030 int vlv_force_pll_on(struct drm_i915_private *dev_priv, enum pipe pipe,
0031              const struct dpll *dpll);
0032 void vlv_force_pll_off(struct drm_i915_private *dev_priv, enum pipe pipe);
0033 
0034 void chv_enable_pll(const struct intel_crtc_state *crtc_state);
0035 void chv_disable_pll(struct drm_i915_private *dev_priv, enum pipe pipe);
0036 void vlv_enable_pll(const struct intel_crtc_state *crtc_state);
0037 void vlv_disable_pll(struct drm_i915_private *dev_priv, enum pipe pipe);
0038 void i9xx_enable_pll(const struct intel_crtc_state *crtc_state);
0039 void i9xx_disable_pll(const struct intel_crtc_state *crtc_state);
0040 bool bxt_find_best_dpll(struct intel_crtc_state *crtc_state,
0041             struct dpll *best_clock);
0042 int chv_calc_dpll_params(int refclk, struct dpll *pll_clock);
0043 
0044 void assert_pll_enabled(struct drm_i915_private *i915, enum pipe pipe);
0045 void assert_pll_disabled(struct drm_i915_private *i915, enum pipe pipe);
0046 
0047 #endif