Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 1 | /* 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 | |
Jani Nikula | ecbb5fb | 2019-04-29 15:29:37 +0300 | [diff] [blame] | 11 | #include "i915_reg.h" |
| 12 | |
Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 13 | struct drm_device; |
| 14 | struct drm_i915_private; |
| 15 | struct i915_request; |
Maarten Lankhorst | 855e0d6 | 2019-06-28 10:55:13 +0200 | [diff] [blame] | 16 | struct intel_atomic_state; |
Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 17 | struct intel_crtc; |
| 18 | struct intel_crtc_state; |
| 19 | struct intel_plane; |
Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 20 | struct skl_ddb_entry; |
| 21 | struct skl_pipe_wm; |
| 22 | struct skl_wm_level; |
| 23 | |
| 24 | void intel_init_clock_gating(struct drm_i915_private *dev_priv); |
| 25 | void intel_suspend_hw(struct drm_i915_private *dev_priv); |
| 26 | int ilk_wm_max_level(const struct drm_i915_private *dev_priv); |
| 27 | void intel_update_watermarks(struct intel_crtc *crtc); |
| 28 | void intel_init_pm(struct drm_i915_private *dev_priv); |
| 29 | void intel_init_clock_gating_hooks(struct drm_i915_private *dev_priv); |
| 30 | void intel_pm_setup(struct drm_i915_private *dev_priv); |
Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 31 | void g4x_wm_get_hw_state(struct drm_i915_private *dev_priv); |
| 32 | void vlv_wm_get_hw_state(struct drm_i915_private *dev_priv); |
| 33 | void ilk_wm_get_hw_state(struct drm_i915_private *dev_priv); |
| 34 | void skl_wm_get_hw_state(struct drm_i915_private *dev_priv); |
Stanislav Lisovskiy | 0f0f9ae | 2020-02-03 01:06:29 +0200 | [diff] [blame] | 35 | u8 intel_enabled_dbuf_slices_mask(struct drm_i915_private *dev_priv); |
Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 36 | void skl_pipe_ddb_get_hw_state(struct intel_crtc *crtc, |
| 37 | struct skl_ddb_entry *ddb_y, |
| 38 | struct skl_ddb_entry *ddb_uv); |
Stanislav Lisovskiy | 072fcc3 | 2020-02-03 01:06:25 +0200 | [diff] [blame] | 39 | void skl_ddb_get_hw_state(struct drm_i915_private *dev_priv); |
Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 40 | void skl_pipe_wm_get_hw_state(struct intel_crtc *crtc, |
| 41 | struct skl_pipe_wm *out); |
| 42 | void g4x_wm_sanitize(struct drm_i915_private *dev_priv); |
| 43 | void vlv_wm_sanitize(struct drm_i915_private *dev_priv); |
Maarten Lankhorst | 855e0d6 | 2019-06-28 10:55:13 +0200 | [diff] [blame] | 44 | bool intel_can_enable_sagv(struct intel_atomic_state *state); |
Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 45 | int intel_enable_sagv(struct drm_i915_private *dev_priv); |
| 46 | int intel_disable_sagv(struct drm_i915_private *dev_priv); |
Stanislav Lisovskiy | 680e1af | 2020-04-15 17:39:04 +0300 | [diff] [blame^] | 47 | void intel_sagv_pre_plane_update(struct intel_atomic_state *state); |
| 48 | void intel_sagv_post_plane_update(struct intel_atomic_state *state); |
Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 49 | bool skl_wm_level_equals(const struct skl_wm_level *l1, |
| 50 | const struct skl_wm_level *l2); |
| 51 | bool skl_ddb_allocation_overlaps(const struct skl_ddb_entry *ddb, |
| 52 | const struct skl_ddb_entry *entries, |
| 53 | int num_entries, int ignore_idx); |
| 54 | void skl_write_plane_wm(struct intel_plane *plane, |
| 55 | const struct intel_crtc_state *crtc_state); |
| 56 | void skl_write_cursor_wm(struct intel_plane *plane, |
| 57 | const struct intel_crtc_state *crtc_state); |
Ville Syrjälä | 60aca57 | 2019-11-27 21:05:51 +0200 | [diff] [blame] | 58 | bool ilk_disable_lp_wm(struct drm_i915_private *dev_priv); |
Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 59 | void intel_init_ipc(struct drm_i915_private *dev_priv); |
| 60 | void intel_enable_ipc(struct drm_i915_private *dev_priv); |
| 61 | |
Jani Nikula | d13616d | 2019-06-06 15:22:00 +0300 | [diff] [blame] | 62 | bool intel_set_memory_cxsr(struct drm_i915_private *dev_priv, bool enable); |
Jani Nikula | ecbb5fb | 2019-04-29 15:29:37 +0300 | [diff] [blame] | 63 | |
Jani Nikula | 696173b | 2019-04-05 14:00:15 +0300 | [diff] [blame] | 64 | #endif /* __INTEL_PM_H__ */ |