xref: /openbsd/sys/dev/pci/drm/i915/display/intel_wm.h (revision f005ef32)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2023 Intel Corporation
4  */
5 
6 #ifndef __INTEL_WM_H__
7 #define __INTEL_WM_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_i915_private;
12 struct intel_atomic_state;
13 struct intel_crtc;
14 struct intel_crtc_state;
15 struct intel_plane_state;
16 
17 void intel_update_watermarks(struct drm_i915_private *i915);
18 int intel_compute_pipe_wm(struct intel_atomic_state *state,
19 			  struct intel_crtc *crtc);
20 int intel_compute_intermediate_wm(struct intel_atomic_state *state,
21 				  struct intel_crtc *crtc);
22 bool intel_initial_watermarks(struct intel_atomic_state *state,
23 			      struct intel_crtc *crtc);
24 void intel_atomic_update_watermarks(struct intel_atomic_state *state,
25 				    struct intel_crtc *crtc);
26 void intel_optimize_watermarks(struct intel_atomic_state *state,
27 			       struct intel_crtc *crtc);
28 int intel_compute_global_watermarks(struct intel_atomic_state *state);
29 void intel_wm_get_hw_state(struct drm_i915_private *i915);
30 bool intel_wm_plane_visible(const struct intel_crtc_state *crtc_state,
31 			    const struct intel_plane_state *plane_state);
32 void intel_print_wm_latency(struct drm_i915_private *i915,
33 			    const char *name, const u16 wm[]);
34 void intel_wm_init(struct drm_i915_private *i915);
35 void intel_wm_debugfs_register(struct drm_i915_private *i915);
36 
37 #endif /* __INTEL_WM_H__ */
38