2019-04-05 14:00:09 +03:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
|
/*
|
|
|
|
|
* Copyright © 2019 Intel Corporation
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __INTEL_PSR_H__
|
|
|
|
|
#define __INTEL_PSR_H__
|
|
|
|
|
|
2021-12-10 15:16:57 +02:00
|
|
|
#include <linux/types.h>
|
2019-04-05 14:00:09 +03:00
|
|
|
|
2021-12-10 15:16:57 +02:00
|
|
|
enum fb_op_origin;
|
2020-01-06 07:21:28 -08:00
|
|
|
struct drm_connector;
|
|
|
|
|
struct drm_connector_state;
|
2019-04-05 14:00:09 +03:00
|
|
|
struct drm_i915_private;
|
2021-12-10 15:16:57 +02:00
|
|
|
struct intel_atomic_state;
|
|
|
|
|
struct intel_crtc;
|
2019-04-05 14:00:09 +03:00
|
|
|
struct intel_crtc_state;
|
|
|
|
|
struct intel_dp;
|
2021-04-17 17:21:22 -07:00
|
|
|
struct intel_encoder;
|
2021-12-10 15:16:57 +02:00
|
|
|
struct intel_plane;
|
|
|
|
|
struct intel_plane_state;
|
2019-04-05 14:00:09 +03:00
|
|
|
|
|
|
|
|
void intel_psr_init_dpcd(struct intel_dp *intel_dp);
|
2021-10-22 13:32:56 +03:00
|
|
|
void intel_psr_pre_plane_update(struct intel_atomic_state *state,
|
|
|
|
|
struct intel_crtc *crtc);
|
2021-09-22 14:52:42 -07:00
|
|
|
void intel_psr_post_plane_update(const struct intel_atomic_state *state);
|
2019-04-05 14:00:09 +03:00
|
|
|
void intel_psr_disable(struct intel_dp *intel_dp,
|
|
|
|
|
const struct intel_crtc_state *old_crtc_state);
|
2021-02-04 15:40:14 +02:00
|
|
|
int intel_psr_debug_set(struct intel_dp *intel_dp, u64 value);
|
2019-04-05 14:00:09 +03:00
|
|
|
void intel_psr_invalidate(struct drm_i915_private *dev_priv,
|
|
|
|
|
unsigned frontbuffer_bits,
|
|
|
|
|
enum fb_op_origin origin);
|
|
|
|
|
void intel_psr_flush(struct drm_i915_private *dev_priv,
|
|
|
|
|
unsigned frontbuffer_bits,
|
|
|
|
|
enum fb_op_origin origin);
|
2021-02-04 15:40:14 +02:00
|
|
|
void intel_psr_init(struct intel_dp *intel_dp);
|
2019-04-05 14:00:09 +03:00
|
|
|
void intel_psr_compute_config(struct intel_dp *intel_dp,
|
2021-09-22 14:52:42 -07:00
|
|
|
struct intel_crtc_state *crtc_state,
|
|
|
|
|
struct drm_connector_state *conn_state);
|
2021-04-17 17:21:22 -07:00
|
|
|
void intel_psr_get_config(struct intel_encoder *encoder,
|
|
|
|
|
struct intel_crtc_state *pipe_config);
|
2021-02-04 15:40:14 +02:00
|
|
|
void intel_psr_irq_handler(struct intel_dp *intel_dp, u32 psr_iir);
|
2019-04-05 14:00:09 +03:00
|
|
|
void intel_psr_short_pulse(struct intel_dp *intel_dp);
|
2022-04-05 08:53:43 -07:00
|
|
|
void intel_psr_wait_for_idle_locked(const struct intel_crtc_state *new_crtc_state);
|
2019-04-05 14:00:09 +03:00
|
|
|
bool intel_psr_enabled(struct intel_dp *intel_dp);
|
2020-10-07 12:52:38 -07:00
|
|
|
int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
|
|
|
|
|
struct intel_crtc *crtc);
|
2020-08-10 10:41:43 -07:00
|
|
|
void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_state);
|
2020-10-07 12:52:38 -07:00
|
|
|
void intel_psr2_program_plane_sel_fetch(struct intel_plane *plane,
|
|
|
|
|
const struct intel_crtc_state *crtc_state,
|
|
|
|
|
const struct intel_plane_state *plane_state,
|
|
|
|
|
int color_plane);
|
2021-09-22 14:52:41 -07:00
|
|
|
void intel_psr2_disable_plane_sel_fetch(struct intel_plane *plane,
|
|
|
|
|
const struct intel_crtc_state *crtc_state);
|
2021-06-08 11:54:14 +03:00
|
|
|
void intel_psr_pause(struct intel_dp *intel_dp);
|
|
|
|
|
void intel_psr_resume(struct intel_dp *intel_dp);
|
2019-04-05 14:00:09 +03:00
|
|
|
|
2022-04-05 08:53:43 -07:00
|
|
|
void intel_psr_lock(const struct intel_crtc_state *crtc_state);
|
|
|
|
|
void intel_psr_unlock(const struct intel_crtc_state *crtc_state);
|
|
|
|
|
|
2019-04-05 14:00:09 +03:00
|
|
|
#endif /* __INTEL_PSR_H__ */
|