[PATCH] drm/i915/psr: Implement WA to help reach PC10
Jani Nikula
jani.nikula at linux.intel.com
Thu Oct 10 08:29:45 UTC 2024
On Sun, 06 Oct 2024, Suraj Kandpal <suraj.kandpal at intel.com> wrote:
> +static bool
> +intel_psr_is_dc5_entry_possible(struct intel_display *display,
> + struct intel_crtc_state *crtc_state)
> +{
> + struct intel_crtc *intel_crtc;
Always struct intel_crtc *crtc;
> +
> + if ((display->power.domains.target_dc_state &
> + DC_STATE_EN_UPTO_DC5_DC6_MASK) == 0)
> + return false;
> +
> + if (!crtc_state->has_psr && !crtc_state->has_sel_update &&
> + !crtc_state->has_panel_replay)
> + return false;
> +
> + for_each_intel_crtc(display->drm, intel_crtc) {
> + struct drm_crtc *crtc = &intel_crtc->base;
Just don't add struct drm_crtc local variables, so you don't get the
name conflict.
> + struct drm_vblank_crtc *vblank;
> + struct intel_encoder *encoder;
> +
> + if (!intel_crtc->active)
> + continue;
> +
> + vblank = drm_crtc_vblank_crtc(crtc);
> +
> + if (vblank->enabled)
> + return false;
> +
> + for_each_encoder_on_crtc(display->drm, crtc, encoder)
> + if (encoder->type != INTEL_OUTPUT_EDP ||
> + !CAN_PSR(enc_to_intel_dp(encoder)))
> + return false;
> + }
> +
> + return true;
> +}
> +
[snip]
> +void intel_psr_compute_config_late(struct intel_encoder *intel_encoder,
Always struct intel_encoder *encoder;
> + struct intel_crtc_state *crtc_state)
> +{
> + struct intel_display *display = to_intel_display(intel_encoder);
> + struct intel_dp *dp = enc_to_intel_dp(intel_encoder);
Always struct intel_dp *intel_dp;
> +
> + if (DISPLAY_VER(display) == 20) {
> + mutex_lock(&dp->psr.lock);
> + dp->psr.is_dpkgc_configured =
> + intel_psr_is_dpkgc_configured(display, crtc_state);
> + dp->psr.is_dc5_entry_possible =
> + intel_psr_is_dc5_entry_possible(display, crtc_state);
> + dp->psr.is_wa_delayed_vblank_limit =
> + intel_psr_check_wa_delayed_vblank(&crtc_state->hw.adjusted_mode);
> + mutex_unlock(&dp->psr.lock);
> + }
> +}
> +
--
Jani Nikula, Intel
More information about the Intel-xe
mailing list