Linux Audio

Check our new training course

Loading...
v5.4
 1/* SPDX-License-Identifier: MIT */
 2/*
 3 * Copyright © 2019 Intel Corporation
 4 */
 5
 6#ifndef __INTEL_PSR_H__
 7#define __INTEL_PSR_H__
 8
 9#include "intel_frontbuffer.h"
10
 
 
 
11struct drm_i915_private;
 
 
 
12struct intel_crtc_state;
13struct intel_dp;
 
 
 
14
15#define CAN_PSR(dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support)
 
 
 
 
 
 
16void intel_psr_init_dpcd(struct intel_dp *intel_dp);
17void intel_psr_enable(struct intel_dp *intel_dp,
18		      const struct intel_crtc_state *crtc_state);
 
 
19void intel_psr_disable(struct intel_dp *intel_dp,
20		       const struct intel_crtc_state *old_crtc_state);
21void intel_psr_update(struct intel_dp *intel_dp,
22		      const struct intel_crtc_state *crtc_state);
23int intel_psr_debug_set(struct drm_i915_private *dev_priv, u64 value);
24void intel_psr_invalidate(struct drm_i915_private *dev_priv,
25			  unsigned frontbuffer_bits,
26			  enum fb_op_origin origin);
27void intel_psr_flush(struct drm_i915_private *dev_priv,
28		     unsigned frontbuffer_bits,
29		     enum fb_op_origin origin);
30void intel_psr_init(struct drm_i915_private *dev_priv);
31void intel_psr_compute_config(struct intel_dp *intel_dp,
32			      struct intel_crtc_state *crtc_state);
33void intel_psr_irq_control(struct drm_i915_private *dev_priv, u32 debug);
34void intel_psr_irq_handler(struct drm_i915_private *dev_priv, u32 psr_iir);
 
 
35void intel_psr_short_pulse(struct intel_dp *intel_dp);
36int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state,
37			    u32 *out_value);
38bool intel_psr_enabled(struct intel_dp *intel_dp);
 
 
 
 
 
 
 
 
 
 
39
40#endif /* __INTEL_PSR_H__ */
v6.8
 1/* SPDX-License-Identifier: MIT */
 2/*
 3 * Copyright © 2019 Intel Corporation
 4 */
 5
 6#ifndef __INTEL_PSR_H__
 7#define __INTEL_PSR_H__
 8
 9#include <linux/types.h>
10
11enum fb_op_origin;
12struct drm_connector;
13struct drm_connector_state;
14struct drm_i915_private;
15struct intel_atomic_state;
16struct intel_connector;
17struct intel_crtc;
18struct intel_crtc_state;
19struct intel_dp;
20struct intel_encoder;
21struct intel_plane;
22struct intel_plane_state;
23
24#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
25			   (intel_dp)->psr.source_support)
26
27#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \
28				    (intel_dp)->psr.source_panel_replay_support)
29
30bool intel_encoder_can_psr(struct intel_encoder *encoder);
31void intel_psr_init_dpcd(struct intel_dp *intel_dp);
32void intel_psr_pre_plane_update(struct intel_atomic_state *state,
33				struct intel_crtc *crtc);
34void intel_psr_post_plane_update(struct intel_atomic_state *state,
35				 struct intel_crtc *crtc);
36void intel_psr_disable(struct intel_dp *intel_dp,
37		       const struct intel_crtc_state *old_crtc_state);
38int intel_psr_debug_set(struct intel_dp *intel_dp, u64 value);
 
 
39void intel_psr_invalidate(struct drm_i915_private *dev_priv,
40			  unsigned frontbuffer_bits,
41			  enum fb_op_origin origin);
42void intel_psr_flush(struct drm_i915_private *dev_priv,
43		     unsigned frontbuffer_bits,
44		     enum fb_op_origin origin);
45void intel_psr_init(struct intel_dp *intel_dp);
46void intel_psr_compute_config(struct intel_dp *intel_dp,
47			      struct intel_crtc_state *crtc_state,
48			      struct drm_connector_state *conn_state);
49void intel_psr_get_config(struct intel_encoder *encoder,
50			  struct intel_crtc_state *pipe_config);
51void intel_psr_irq_handler(struct intel_dp *intel_dp, u32 psr_iir);
52void intel_psr_short_pulse(struct intel_dp *intel_dp);
53void intel_psr_wait_for_idle_locked(const struct intel_crtc_state *new_crtc_state);
 
54bool intel_psr_enabled(struct intel_dp *intel_dp);
55int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
56				struct intel_crtc *crtc);
57void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_state);
58void intel_psr_pause(struct intel_dp *intel_dp);
59void intel_psr_resume(struct intel_dp *intel_dp);
60
61void intel_psr_lock(const struct intel_crtc_state *crtc_state);
62void intel_psr_unlock(const struct intel_crtc_state *crtc_state);
63void intel_psr_connector_debugfs_add(struct intel_connector *connector);
64void intel_psr_debugfs_register(struct drm_i915_private *i915);
65
66#endif /* __INTEL_PSR_H__ */