2021-01-14 13:13:46 +02:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
/*
|
|
|
|
* Copyright © 2020 Intel Corporation
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INTEL_DPLL_H_
|
|
|
|
#define _INTEL_DPLL_H_
|
|
|
|
|
2021-04-27 15:03:15 +03:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
2025-03-25 14:36:33 +02:00
|
|
|
enum pipe;
|
2021-01-14 13:13:46 +02:00
|
|
|
struct dpll;
|
2022-03-25 14:31:56 +02:00
|
|
|
struct intel_atomic_state;
|
2021-01-14 13:13:46 +02:00
|
|
|
struct intel_crtc;
|
|
|
|
struct intel_crtc_state;
|
2025-02-12 13:15:39 +05:30
|
|
|
struct intel_display;
|
2024-04-12 21:26:52 +03:00
|
|
|
struct intel_dpll_hw_state;
|
2021-01-14 13:13:46 +02:00
|
|
|
|
2025-03-25 14:36:33 +02:00
|
|
|
void intel_dpll_init_clock_hook(struct intel_display *display);
|
2022-03-25 14:31:56 +02:00
|
|
|
int intel_dpll_crtc_compute_clock(struct intel_atomic_state *state,
|
|
|
|
struct intel_crtc *crtc);
|
2025-05-15 12:47:55 +05:30
|
|
|
int intel_dpll_crtc_get_dpll(struct intel_atomic_state *state,
|
|
|
|
struct intel_crtc *crtc);
|
2021-01-14 13:13:46 +02:00
|
|
|
int i9xx_calc_dpll_params(int refclk, struct dpll *clock);
|
2021-07-15 12:35:21 +03:00
|
|
|
u32 i9xx_dpll_compute_fp(const struct dpll *dpll);
|
2024-04-12 21:26:52 +03:00
|
|
|
void i9xx_dpll_get_hw_state(struct intel_crtc *crtc,
|
2024-04-12 21:27:01 +03:00
|
|
|
struct intel_dpll_hw_state *dpll_hw_state);
|
2021-07-15 12:35:22 +03:00
|
|
|
void vlv_compute_dpll(struct intel_crtc_state *crtc_state);
|
|
|
|
void chv_compute_dpll(struct intel_crtc_state *crtc_state);
|
2021-01-14 13:13:46 +02:00
|
|
|
|
2025-03-25 14:36:33 +02:00
|
|
|
int vlv_force_pll_on(struct intel_display *display, enum pipe pipe,
|
2021-02-05 16:48:40 +02:00
|
|
|
const struct dpll *dpll);
|
2025-03-25 14:36:33 +02:00
|
|
|
void vlv_force_pll_off(struct intel_display *display, enum pipe pipe);
|
2021-07-15 12:35:26 +03:00
|
|
|
|
2021-07-15 12:35:22 +03:00
|
|
|
void chv_enable_pll(const struct intel_crtc_state *crtc_state);
|
2025-03-25 14:36:33 +02:00
|
|
|
void chv_disable_pll(struct intel_display *display, enum pipe pipe);
|
2021-07-15 12:35:26 +03:00
|
|
|
void vlv_enable_pll(const struct intel_crtc_state *crtc_state);
|
2025-03-25 14:36:33 +02:00
|
|
|
void vlv_disable_pll(struct intel_display *display, enum pipe pipe);
|
2021-07-15 12:35:26 +03:00
|
|
|
void i9xx_enable_pll(const struct intel_crtc_state *crtc_state);
|
2021-02-05 16:48:40 +02:00
|
|
|
void i9xx_disable_pll(const struct intel_crtc_state *crtc_state);
|
2021-04-27 15:03:15 +03:00
|
|
|
bool bxt_find_best_dpll(struct intel_crtc_state *crtc_state,
|
|
|
|
struct dpll *best_clock);
|
|
|
|
int chv_calc_dpll_params(int refclk, struct dpll *pll_clock);
|
2021-02-05 16:48:40 +02:00
|
|
|
|
2024-04-12 21:26:59 +03:00
|
|
|
void i9xx_crtc_clock_get(struct intel_crtc_state *crtc_state);
|
|
|
|
void vlv_crtc_clock_get(struct intel_crtc_state *crtc_state);
|
|
|
|
void chv_crtc_clock_get(struct intel_crtc_state *crtc_state);
|
2023-11-14 12:45:32 +02:00
|
|
|
|
2025-02-12 13:15:39 +05:30
|
|
|
void assert_pll_enabled(struct intel_display *display, enum pipe pipe);
|
|
|
|
void assert_pll_disabled(struct intel_display *display, enum pipe pipe);
|
2021-09-30 12:23:00 +03:00
|
|
|
|
2021-01-14 13:13:46 +02:00
|
|
|
#endif
|