From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Kahola, Mika" <mika.kahola@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v3 7/9] drm/i915/psr: Resolve the PSR encoders through the joiner primary
Date: Mon, 26 Oct 2026 06:18:38 +0000 [thread overview]
Message-ID: <f761005425fcdd971b0541b65d0cdc5ae3de64a7.camel@intel.com> (raw)
In-Reply-To: <20261023100052.683192-8-mika.kahola@intel.com>
On Fri, 2026-10-23 at 10:00 +0000, Mika Kahola wrote:
> A joiner secondary has no encoders of its own, uapi.encoder_mask is
> zero, so for_each_intel_encoder_mask_with_psr() iterates nothing on
> its
> crtc_state. intel_psr_lock()/intel_psr_unlock() then take no lock at
> all, intel_psr_wait_for_idle_locked() never waits, and
> intel_psr2_program_trans_man_trk_ctl() skips the cff check and hands
> the
> encoder list head to intel_dsc_su_et_parameters_configure().
>
> PSR is a transcoder level feature driven by the primary, so take the
> encoders from there for a secondary.
>
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_psr.c | 26 ++++++++++++++++++++--
> --
> 1 file changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index ffbb1e55c2b5a..f1d52c39d8834 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -2638,6 +2638,24 @@ static void intel_psr_force_update(struct
> intel_dp *intel_dp)
> intel_de_write(display, CURSURFLIVE(display, intel_dp-
> >psr.pipe), 0);
> }
>
> +/*
> + * The joiner secondary has no encoders of its own, its
> uapi.encoder_mask is
> + * zero. PSR is a transcoder level feature driven by the primary, so
> take the
> + * encoders from there. Only valid once the state has been swapped
> in, i.e.
> + * from the commit phase.
> + */
> +static u32 psr_encoder_mask(const struct intel_crtc_state
> *crtc_state)
> +{
> + struct intel_crtc *primary_crtc;
> +
> + if (!intel_crtc_is_joiner_secondary(crtc_state))
> + return crtc_state->uapi.encoder_mask;
> +
> + primary_crtc = intel_primary_crtc(crtc_state);
> +
> + return to_intel_crtc_state(primary_crtc->base.state)-
> >uapi.encoder_mask;
> +}
> +
> void intel_psr2_program_trans_man_trk_ctl(struct intel_dsb *dsb,
> const struct
> intel_crtc_state *crtc_state)
> {
> @@ -2650,7 +2668,7 @@ void
> intel_psr2_program_trans_man_trk_ctl(struct intel_dsb *dsb,
> return;
>
> for_each_intel_encoder_mask_with_psr(display->drm, encoder,
> - crtc_state-
> >uapi.encoder_mask) {
> +
> psr_encoder_mask(crtc_state)) {
> struct intel_dp *intel_dp =
> enc_to_intel_dp(encoder);
>
> if (!dsb)
> @@ -3464,7 +3482,7 @@ void intel_psr_wait_for_idle_locked(const
> struct intel_crtc_state *new_crtc_stat
> return;
>
> for_each_intel_encoder_mask_with_psr(display->drm, encoder,
> - new_crtc_state-
> >uapi.encoder_mask) {
> +
> psr_encoder_mask(new_crtc_state)) {
> struct intel_dp *intel_dp =
> enc_to_intel_dp(encoder);
> int ret;
>
> @@ -4109,7 +4127,7 @@ void intel_psr_lock(const struct
> intel_crtc_state *crtc_state)
> return;
>
> for_each_intel_encoder_mask_with_psr(display->drm, encoder,
> - crtc_state-
> >uapi.encoder_mask) {
> +
> psr_encoder_mask(crtc_state)) {
> struct intel_dp *intel_dp =
> enc_to_intel_dp(encoder);
>
> mutex_lock(&intel_dp->psr.lock);
> @@ -4132,7 +4150,7 @@ void intel_psr_unlock(const struct
> intel_crtc_state *crtc_state)
> return;
>
> for_each_intel_encoder_mask_with_psr(display->drm, encoder,
> - crtc_state-
> >uapi.encoder_mask) {
> +
> psr_encoder_mask(crtc_state)) {
> struct intel_dp *intel_dp =
> enc_to_intel_dp(encoder);
>
> mutex_unlock(&intel_dp->psr.lock);
next prev parent reply other threads:[~2026-10-26 6:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 10:00 [PATCH v3 0/9] drm/i915/psr: PSR2 and Panel Replay with the joiner Mika Kahola
2026-10-23 10:00 ` [PATCH v3 1/9] drm/i915/psr: Track all joined pipes for frontbuffer tracking Mika Kahola
2026-10-23 10:33 ` Hogander, Jouni
2026-10-23 10:00 ` [PATCH v3 2/9] drm/i915/psr: Exclude the joiner secondary from active_non_psr_pipes Mika Kahola
2026-10-23 11:21 ` Hogander, Jouni
2026-10-23 10:00 ` [PATCH v3 3/9] drm/i915/psr: Take the selective fetch area from pipe_src Mika Kahola
2026-10-23 12:09 ` Hogander, Jouni
2026-10-23 10:00 ` [PATCH v3 4/9] drm/i915/psr: Split the selective fetch calculation into helpers Mika Kahola
2026-10-23 12:14 ` Hogander, Jouni
2026-10-23 10:00 ` [PATCH v3 5/9] drm/i915/psr: Derive the alignment loop condition from the SU area Mika Kahola
2026-10-23 12:29 ` Hogander, Jouni
2026-10-23 10:00 ` [PATCH v3 6/9] drm/i915/psr: Merge the selective fetch area across joined pipes Mika Kahola
2026-10-23 12:43 ` Hogander, Jouni
2026-10-23 10:00 ` [PATCH v3 7/9] drm/i915/psr: Resolve the PSR encoders through the joiner primary Mika Kahola
2026-10-26 6:18 ` Hogander, Jouni [this message]
2026-10-23 10:00 ` [PATCH v3 8/9] drm/i915/psr: Allow Panel Replay and PSR2 with joiner Mika Kahola
2026-10-26 6:56 ` Hogander, Jouni
2026-10-23 10:00 ` [PATCH v3 9/9] drm/i915/display: Allow forcing the joiner on eDP Mika Kahola
2026-10-23 10:11 ` ✓ CI.KUnit: success for drm/i915/psr: PSR2 and Panel Replay with the joiner Patchwork
2026-10-23 10:55 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-23 14:45 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-10-26 8:06 ` [PATCH v3 0/9] " Kahola, Mika
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f761005425fcdd971b0541b65d0cdc5ae3de64a7.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=mika.kahola@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox