From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "José Roberto de Souza" <jose.souza@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/display: Exit PSR when doing async flips
Date: Tue, 2 Nov 2021 16:36:36 +0200 [thread overview]
Message-ID: <YYFM9GpiMBH4adiS@intel.com> (raw)
In-Reply-To: <20211102021233.215980-1-jose.souza@intel.com>
On Mon, Nov 01, 2021 at 07:12:33PM -0700, José Roberto de Souza wrote:
> Changing the buffer in the middle of the scanout then entering an
> period of flip idleness will cause part of the previous buffer being
> diplayed to user when PSR is enabled.
>
> So here disabling and scheduling activation after a few milliseconds
> when async flip is enabled in the state.
>
> The async flip check that we had in PSR compute is not executed at
> every flip so it was not doing anything useful and is also being
> dropped here.
>
> v2:
> - scheduling the PSR work in _intel_psr_post_plane_update()
>
> Cc: Karthik B S <karthik.b.s@intel.com>
> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_psr.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 9d589d471e335..e1338f5b2967c 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -731,12 +731,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
> return false;
> }
>
> - if (crtc_state->uapi.async_flip) {
> - drm_dbg_kms(&dev_priv->drm,
> - "PSR2 sel fetch not enabled, async flip enabled\n");
> - return false;
> - }
> -
> /* Wa_14010254185 Wa_14010103792 */
> if (IS_TGL_DISPLAY_STEP(dev_priv, STEP_A0, STEP_C0)) {
> drm_dbg_kms(&dev_priv->drm,
> @@ -1780,6 +1774,9 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *state,
> if (psr->enabled && needs_to_disable)
> intel_psr_disable_locked(intel_dp);
>
> + if (psr->enabled && crtc_state->uapi.async_flip)
> + intel_psr_exit(intel_dp);
> +
> mutex_unlock(&psr->lock);
> }
> }
> @@ -1810,6 +1807,9 @@ static void _intel_psr_post_plane_update(const struct intel_atomic_state *state,
> if (crtc_state->crc_enabled && psr->enabled)
> psr_force_hw_tracking_exit(intel_dp);
>
> + if (psr->enabled && !psr->active && crtc_state->uapi.async_flip)
> + schedule_work(&intel_dp->psr.work);
Dunno if there's much point on doing this for every async flip. The
expectation is more or less that more async flips will come in. So
we should probably do this only when switching back to sync flips.
> +
> mutex_unlock(&psr->lock);
> }
> }
> --
> 2.33.1
--
Ville Syrjälä
Intel
prev parent reply other threads:[~2021-11-02 14:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 2:12 [Intel-gfx] [PATCH v2] drm/i915/display: Exit PSR when doing async flips José Roberto de Souza
2021-11-02 3:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Exit PSR when doing async flips (rev3) Patchwork
2021-11-02 4:38 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-11-02 14:36 ` Ville Syrjälä [this message]
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=YYFM9GpiMBH4adiS@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jose.souza@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