blob: 674a3f0f16a7aadadc7363e5962cd6776c99eee6 [file] [log] [blame]
Jani Nikula696173b2019-04-05 14:00:15 +03001/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright © 2019 Intel Corporation
4 */
5
6#ifndef __INTEL_PM_H__
7#define __INTEL_PM_H__
8
9#include <linux/types.h>
10
11struct drm_atomic_state;
12struct drm_device;
13struct drm_i915_private;
14struct i915_request;
15struct intel_crtc;
16struct intel_crtc_state;
17struct intel_plane;
18struct skl_ddb_allocation;
19struct skl_ddb_entry;
20struct skl_pipe_wm;
21struct skl_wm_level;
22
23void intel_init_clock_gating(struct drm_i915_private *dev_priv);
24void intel_suspend_hw(struct drm_i915_private *dev_priv);
25int ilk_wm_max_level(const struct drm_i915_private *dev_priv);
26void intel_update_watermarks(struct intel_crtc *crtc);
27void intel_init_pm(struct drm_i915_private *dev_priv);
28void intel_init_clock_gating_hooks(struct drm_i915_private *dev_priv);
29void intel_pm_setup(struct drm_i915_private *dev_priv);
30void intel_gpu_ips_init(struct drm_i915_private *dev_priv);
31void intel_gpu_ips_teardown(void);
32void intel_init_gt_powersave(struct drm_i915_private *dev_priv);
33void intel_cleanup_gt_powersave(struct drm_i915_private *dev_priv);
34void intel_sanitize_gt_powersave(struct drm_i915_private *dev_priv);
35void intel_enable_gt_powersave(struct drm_i915_private *dev_priv);
36void intel_disable_gt_powersave(struct drm_i915_private *dev_priv);
37void gen6_rps_busy(struct drm_i915_private *dev_priv);
38void gen6_rps_idle(struct drm_i915_private *dev_priv);
39void gen6_rps_boost(struct i915_request *rq);
40void g4x_wm_get_hw_state(struct drm_i915_private *dev_priv);
41void vlv_wm_get_hw_state(struct drm_i915_private *dev_priv);
42void ilk_wm_get_hw_state(struct drm_i915_private *dev_priv);
43void skl_wm_get_hw_state(struct drm_i915_private *dev_priv);
44void skl_pipe_ddb_get_hw_state(struct intel_crtc *crtc,
45 struct skl_ddb_entry *ddb_y,
46 struct skl_ddb_entry *ddb_uv);
47void skl_ddb_get_hw_state(struct drm_i915_private *dev_priv,
48 struct skl_ddb_allocation *ddb /* out */);
49void skl_pipe_wm_get_hw_state(struct intel_crtc *crtc,
50 struct skl_pipe_wm *out);
51void g4x_wm_sanitize(struct drm_i915_private *dev_priv);
52void vlv_wm_sanitize(struct drm_i915_private *dev_priv);
53bool intel_can_enable_sagv(struct drm_atomic_state *state);
54int intel_enable_sagv(struct drm_i915_private *dev_priv);
55int intel_disable_sagv(struct drm_i915_private *dev_priv);
56bool skl_wm_level_equals(const struct skl_wm_level *l1,
57 const struct skl_wm_level *l2);
58bool skl_ddb_allocation_overlaps(const struct skl_ddb_entry *ddb,
59 const struct skl_ddb_entry *entries,
60 int num_entries, int ignore_idx);
61void skl_write_plane_wm(struct intel_plane *plane,
62 const struct intel_crtc_state *crtc_state);
63void skl_write_cursor_wm(struct intel_plane *plane,
64 const struct intel_crtc_state *crtc_state);
65bool ilk_disable_lp_wm(struct drm_device *dev);
66int skl_check_pipe_max_pixel_rate(struct intel_crtc *intel_crtc,
67 struct intel_crtc_state *cstate);
68void intel_init_ipc(struct drm_i915_private *dev_priv);
69void intel_enable_ipc(struct drm_i915_private *dev_priv);
70
71#endif /* __INTEL_PM_H__ */