xref: /linux/drivers/gpu/drm/i915/display/intel_vrr.h (revision 25489a4f556414445d342951615178368ee45cde)
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 
11 struct drm_connector_state;
12 struct intel_atomic_state;
13 struct intel_connector;
14 struct intel_crtc_state;
15 struct intel_dsb;
16 struct intel_display;
17 
18 bool intel_vrr_is_capable(struct intel_connector *connector);
19 bool intel_vrr_is_in_range(struct intel_connector *connector, int vrefresh);
20 bool intel_vrr_possible(const struct intel_crtc_state *crtc_state);
21 void intel_vrr_check_modeset(struct intel_atomic_state *state);
22 void intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
23 			      struct drm_connector_state *conn_state);
24 void intel_vrr_compute_config_late(struct intel_crtc_state *crtc_state);
25 void intel_vrr_set_transcoder_timings(const struct intel_crtc_state *crtc_state);
26 void intel_vrr_enable(const struct intel_crtc_state *crtc_state);
27 void intel_vrr_send_push(struct intel_dsb *dsb,
28 			 const struct intel_crtc_state *crtc_state);
29 void intel_vrr_check_push_sent(struct intel_dsb *dsb,
30 			       const struct intel_crtc_state *crtc_state);
31 bool intel_vrr_is_push_sent(const struct intel_crtc_state *crtc_state);
32 void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state);
33 void intel_vrr_get_config(struct intel_crtc_state *crtc_state);
34 int intel_vrr_vmax_vtotal(const struct intel_crtc_state *crtc_state);
35 int intel_vrr_vmin_vtotal(const struct intel_crtc_state *crtc_state);
36 int intel_vrr_vmax_vblank_start(const struct intel_crtc_state *crtc_state);
37 int intel_vrr_vmin_vblank_start(const struct intel_crtc_state *crtc_state);
38 int intel_vrr_vblank_delay(const struct intel_crtc_state *crtc_state);
39 bool intel_vrr_is_fixed_rr(const struct intel_crtc_state *crtc_state);
40 void intel_vrr_transcoder_enable(const struct intel_crtc_state *crtc_state);
41 void intel_vrr_transcoder_disable(const struct intel_crtc_state *crtc_state);
42 void intel_vrr_set_fixed_rr_timings(const struct intel_crtc_state *crtc_state);
43 bool intel_vrr_always_use_vrr_tg(struct intel_display *display);
44 
45 #endif /* __INTEL_VRR_H__ */
46