Linux Audio

Check our new training course

Embedded Linux training

Mar 10-20, 2025, special US time zones
Register
Loading...
Note: File does not exist in v3.1.
 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 intel_atomic_state;
15struct intel_connector;
16struct intel_crtc;
17struct intel_crtc_state;
18struct intel_display;
19struct intel_dp;
20struct intel_encoder;
21struct intel_plane;
22struct intel_plane_state;
23
24#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \
25				    (intel_dp)->psr.source_panel_replay_support)
26
27bool intel_encoder_can_psr(struct intel_encoder *encoder);
28bool intel_psr_needs_aux_io_power(struct intel_encoder *encoder,
29				  const struct intel_crtc_state *crtc_state);
30void intel_psr_init_dpcd(struct intel_dp *intel_dp);
31void intel_psr_enable_sink(struct intel_dp *intel_dp,
32			   const struct intel_crtc_state *crtc_state);
33void intel_psr_pre_plane_update(struct intel_atomic_state *state,
34				struct intel_crtc *crtc);
35void intel_psr_post_plane_update(struct intel_atomic_state *state,
36				 struct intel_crtc *crtc);
37void intel_psr_disable(struct intel_dp *intel_dp,
38		       const struct intel_crtc_state *old_crtc_state);
39int intel_psr_debug_set(struct intel_dp *intel_dp, u64 value);
40void intel_psr_invalidate(struct intel_display *display,
41			  unsigned frontbuffer_bits,
42			  enum fb_op_origin origin);
43void intel_psr_flush(struct intel_display *display,
44		     unsigned frontbuffer_bits,
45		     enum fb_op_origin origin);
46void intel_psr_init(struct intel_dp *intel_dp);
47void intel_psr_compute_config(struct intel_dp *intel_dp,
48			      struct intel_crtc_state *crtc_state,
49			      struct drm_connector_state *conn_state);
50void intel_psr_get_config(struct intel_encoder *encoder,
51			  struct intel_crtc_state *pipe_config);
52void intel_psr_irq_handler(struct intel_dp *intel_dp, u32 psr_iir);
53void intel_psr_short_pulse(struct intel_dp *intel_dp);
54void intel_psr_wait_for_idle_locked(const struct intel_crtc_state *new_crtc_state);
55bool intel_psr_enabled(struct intel_dp *intel_dp);
56int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
57				struct intel_crtc *crtc);
58void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_state);
59void intel_psr_pause(struct intel_dp *intel_dp);
60void intel_psr_resume(struct intel_dp *intel_dp);
61bool intel_psr_needs_block_dc_vblank(const struct intel_crtc_state *crtc_state);
62bool intel_psr_link_ok(struct intel_dp *intel_dp);
63
64void intel_psr_lock(const struct intel_crtc_state *crtc_state);
65void intel_psr_unlock(const struct intel_crtc_state *crtc_state);
66void intel_psr_connector_debugfs_add(struct intel_connector *connector);
67void intel_psr_debugfs_register(struct intel_display *display);
68
69#endif /* __INTEL_PSR_H__ */