mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
![Gwan-gyeong Mun](/assets/img/avatar_default.png)
This introduces the following function that can exit and activate a psr source when intel_psr is already enabled. - intel_psr_pause(): Pause current PSR. It deactivates current psr state. - intel_psr_resume(): Resume paused PSR. It activates paused psr state. v2: Address Jose's review comment. - Remove unneeded changes around the intel_psr_enable(). - Add intel_psr_post_exit() which processes waiting until PSR is idle and WA for SelectiveFetch. v3: Address Jose's review comment. - Rename intel_psr_post_exit() to intel_psr_wait_exit_locked(). - Move WA_1408330847 to intel_psr_disable_locked() - If the PSR is paused by an explicit intel_psr_paused() call, make the intel_psr_flush() not to activate PSR. v4: Address Jose's review comment. - In order to avoid the scenario of PSR is not active but there is a scheduled psr->work, it changes the check routine of intel_psr_pause() for PSR's enablement from "psr->active" to "psr->enable". Cc: José Roberto de Souza <jose.souza@intel.com> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210608085415.515342-1-gwan-gyeong.mun@intel.com
57 lines
2.1 KiB
C
57 lines
2.1 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __INTEL_PSR_H__
|
|
#define __INTEL_PSR_H__
|
|
|
|
#include "intel_frontbuffer.h"
|
|
|
|
struct drm_connector;
|
|
struct drm_connector_state;
|
|
struct drm_i915_private;
|
|
struct intel_crtc_state;
|
|
struct intel_dp;
|
|
struct intel_crtc;
|
|
struct intel_atomic_state;
|
|
struct intel_plane_state;
|
|
struct intel_plane;
|
|
struct intel_encoder;
|
|
|
|
void intel_psr_init_dpcd(struct intel_dp *intel_dp);
|
|
void intel_psr_enable(struct intel_dp *intel_dp,
|
|
const struct intel_crtc_state *crtc_state,
|
|
const struct drm_connector_state *conn_state);
|
|
void intel_psr_disable(struct intel_dp *intel_dp,
|
|
const struct intel_crtc_state *old_crtc_state);
|
|
void intel_psr_update(struct intel_dp *intel_dp,
|
|
const struct intel_crtc_state *crtc_state,
|
|
const struct drm_connector_state *conn_state);
|
|
int intel_psr_debug_set(struct intel_dp *intel_dp, u64 value);
|
|
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);
|
|
void intel_psr_init(struct intel_dp *intel_dp);
|
|
void intel_psr_compute_config(struct intel_dp *intel_dp,
|
|
struct intel_crtc_state *crtc_state);
|
|
void intel_psr_get_config(struct intel_encoder *encoder,
|
|
struct intel_crtc_state *pipe_config);
|
|
void intel_psr_irq_handler(struct intel_dp *intel_dp, u32 psr_iir);
|
|
void intel_psr_short_pulse(struct intel_dp *intel_dp);
|
|
void intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state);
|
|
bool intel_psr_enabled(struct intel_dp *intel_dp);
|
|
int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
|
|
struct intel_crtc *crtc);
|
|
void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_state);
|
|
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);
|
|
void intel_psr_pause(struct intel_dp *intel_dp);
|
|
void intel_psr_resume(struct intel_dp *intel_dp);
|
|
|
|
#endif /* __INTEL_PSR_H__ */
|