1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2019 Intel Corporation
6 #ifndef __INTEL_PSR_H__
7 #define __INTEL_PSR_H__
9 #include "intel_frontbuffer.h"
12 struct drm_connector_state;
13 struct drm_i915_private;
14 struct intel_crtc_state;
17 struct intel_atomic_state;
18 struct intel_plane_state;
21 void intel_psr_init_dpcd(struct intel_dp *intel_dp);
22 void intel_psr_enable(struct intel_dp *intel_dp,
23 const struct intel_crtc_state *crtc_state,
24 const struct drm_connector_state *conn_state);
25 void intel_psr_disable(struct intel_dp *intel_dp,
26 const struct intel_crtc_state *old_crtc_state);
27 void intel_psr_update(struct intel_dp *intel_dp,
28 const struct intel_crtc_state *crtc_state,
29 const struct drm_connector_state *conn_state);
30 int intel_psr_debug_set(struct intel_dp *intel_dp, u64 value);
31 void intel_psr_invalidate(struct drm_i915_private *dev_priv,
32 unsigned frontbuffer_bits,
33 enum fb_op_origin origin);
34 void intel_psr_flush(struct drm_i915_private *dev_priv,
35 unsigned frontbuffer_bits,
36 enum fb_op_origin origin);
37 void intel_psr_init(struct intel_dp *intel_dp);
38 void intel_psr_compute_config(struct intel_dp *intel_dp,
39 struct intel_crtc_state *crtc_state);
40 void intel_psr_irq_handler(struct intel_dp *intel_dp, u32 psr_iir);
41 void intel_psr_short_pulse(struct intel_dp *intel_dp);
42 void intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state);
43 bool intel_psr_enabled(struct intel_dp *intel_dp);
44 int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
45 struct intel_crtc *crtc);
46 void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_state);
47 void intel_psr2_program_plane_sel_fetch(struct intel_plane *plane,
48 const struct intel_crtc_state *crtc_state,
49 const struct intel_plane_state *plane_state,
52 #endif /* __INTEL_PSR_H__ */