1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright © 2019 Intel Corporation
4 */
5
6#ifndef __INTEL_VRR_H__
7#define __INTEL_VRR_H__
8
9#include <linux/types.h>
10
11struct drm_connector_state;
12struct intel_atomic_state;
13struct intel_connector;
14struct intel_crtc_state;
15struct intel_dsb;
16struct intel_display;
17
18bool intel_vrr_is_capable(struct intel_connector *connector);
19bool intel_vrr_is_in_range(struct intel_connector *connector, int vrefresh);
20bool intel_vrr_possible(const struct intel_crtc_state *crtc_state);
21void intel_vrr_check_modeset(struct intel_atomic_state *state);
22void intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
23 struct drm_connector_state *conn_state);
24void intel_vrr_compute_config_late(struct intel_crtc_state *crtc_state);
25void intel_vrr_set_transcoder_timings(const struct intel_crtc_state *crtc_state);
26void intel_vrr_enable(const struct intel_crtc_state *crtc_state);
27void intel_vrr_send_push(struct intel_dsb *dsb,
28 const struct intel_crtc_state *crtc_state);
29void intel_vrr_check_push_sent(struct intel_dsb *dsb,
30 const struct intel_crtc_state *crtc_state);
31bool intel_vrr_is_push_sent(const struct intel_crtc_state *crtc_state);
32void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state);
33void intel_vrr_get_config(struct intel_crtc_state *crtc_state);
34int intel_vrr_vmax_vtotal(const struct intel_crtc_state *crtc_state);
35int intel_vrr_vmin_vtotal(const struct intel_crtc_state *crtc_state);
36int intel_vrr_vmax_vblank_start(const struct intel_crtc_state *crtc_state);
37int intel_vrr_vmin_vblank_start(const struct intel_crtc_state *crtc_state);
38int intel_vrr_vblank_delay(const struct intel_crtc_state *crtc_state);
39bool intel_vrr_is_fixed_rr(const struct intel_crtc_state *crtc_state);
40void intel_vrr_transcoder_enable(const struct intel_crtc_state *crtc_state);
41void intel_vrr_transcoder_disable(const struct intel_crtc_state *crtc_state);
42void intel_vrr_set_fixed_rr_timings(const struct intel_crtc_state *crtc_state);
43bool intel_vrr_always_use_vrr_tg(struct intel_display *display);
44
45#endif /* __INTEL_VRR_H__ */
46