drm/i915/psr: Add function for triggering "Frame Change" event

Add new function to trigger "Frame Change" event for ensuring we are waking
up before vblank evasion.

v2: dsb as a first parameter

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250213064804.2077127-12-jouni.hogander@intel.com
This commit is contained in:
Jouni Högander
2025-02-13 08:48:02 +02:00
parent 801d827d80
commit fa27fa4806
2 changed files with 25 additions and 0 deletions

View File

@@ -44,6 +44,7 @@
#include "intel_psr.h"
#include "intel_psr_regs.h"
#include "intel_snps_phy.h"
#include "intel_vblank.h"
#include "skl_universal_plane.h"
/**
@@ -2289,6 +2290,27 @@ bool intel_psr_needs_block_dc_vblank(const struct intel_crtc_state *crtc_state)
return false;
}
/**
* intel_psr_trigger_frame_change_event - Trigger "Frame Change" event
* @dsb: DSB context
* @state: the atomic state
* @crtc: the CRTC
*
* Generate PSR "Frame Change" event.
*/
void intel_psr_trigger_frame_change_event(struct intel_dsb *dsb,
struct intel_atomic_state *state,
struct intel_crtc *crtc)
{
const struct intel_crtc_state *crtc_state =
intel_pre_commit_crtc_state(state, crtc);
struct intel_display *display = to_intel_display(crtc);
if (crtc_state->has_psr)
intel_de_write_dsb(display, dsb,
CURSURFLIVE(display, crtc->pipe), 0);
}
static u32 man_trk_ctl_enable_bit_get(struct intel_display *display)
{
struct drm_i915_private *dev_priv = to_i915(display->drm);

View File

@@ -64,6 +64,9 @@ bool intel_psr_link_ok(struct intel_dp *intel_dp);
void intel_psr_lock(const struct intel_crtc_state *crtc_state);
void intel_psr_unlock(const struct intel_crtc_state *crtc_state);
void intel_psr_trigger_frame_change_event(struct intel_dsb *dsb,
struct intel_atomic_state *state,
struct intel_crtc *crtc);
void intel_psr_connector_debugfs_add(struct intel_connector *connector);
void intel_psr_debugfs_register(struct intel_display *display);