xref: /linux/drivers/gpu/drm/i915/display/intel_wm.h (revision 7f71507851fc7764b36a3221839607d3a45c2025)
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_wm_compute(struct intel_atomic_state *state,
19 		     struct intel_crtc *crtc);
20 bool intel_initial_watermarks(struct intel_atomic_state *state,
21 			      struct intel_crtc *crtc);
22 void intel_atomic_update_watermarks(struct intel_atomic_state *state,
23 				    struct intel_crtc *crtc);
24 void intel_optimize_watermarks(struct intel_atomic_state *state,
25 			       struct intel_crtc *crtc);
26 int intel_compute_global_watermarks(struct intel_atomic_state *state);
27 void intel_wm_get_hw_state(struct drm_i915_private *i915);
28 bool intel_wm_plane_visible(const struct intel_crtc_state *crtc_state,
29 			    const struct intel_plane_state *plane_state);
30 void intel_print_wm_latency(struct drm_i915_private *i915,
31 			    const char *name, const u16 wm[]);
32 void intel_wm_init(struct drm_i915_private *i915);
33 void intel_wm_debugfs_register(struct drm_i915_private *i915);
34 
35 #endif /* __INTEL_WM_H__ */
36