From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>,
intel-gfx@lists.freedesktop.org,
Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH] drm/i915/psr: Bump vblank evasion time for seamless updates
Date: Wed, 13 Feb 2019 18:30:10 +0200 [thread overview]
Message-ID: <20190213163010.GI20097@intel.com> (raw)
In-Reply-To: <20190213162142.2095-1-chris@chris-wilson.co.uk>
On Wed, Feb 13, 2019 at 04:21:42PM +0000, Chris Wilson wrote:
> Each set of registers we need to rewrite during a pageflip/modeset
> increases the required evasion window. Modesets with PSR enabled
> empirically take up to 350us to complete the register programming, so
> provide a corresponding boost to the evasion window.
We should have exited PSR before the evasion. Is that code not working?
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105870
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Jose Roberto de Souza <jose.souza@intel.com>
> ---
> drivers/gpu/drm/i915/intel_sprite.c | 20 ++++++++++++++++++--
> 1 file changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 610398607e8e..03cafb953538 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -84,14 +84,30 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
> intel_crtc_has_type(new_crtc_state, INTEL_OUTPUT_DSI);
> DEFINE_WAIT(wait);
> u32 psr_status;
> + int evasion;
>
> vblank_start = adjusted_mode->crtc_vblank_start;
> if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
> vblank_start = DIV_ROUND_UP(vblank_start, 2);
>
> + /*
> + * Estimate how long it will take to reprogram display registers.
> + *
> + * As we wish to avoid changing registers across the vblank to
> + * avoid register write tearing, where the new frame uses an incomplete
> + * mismash of state, we aim to complete our writes before the start
> + * of the vblank. So we must delay starting our writes until after our
> + * evasion window.
> + *
> + * Each additional bit of state adds a set of registers we need to
> + * reprogram, increasing our required evasion window.
> + */
> + evasion = VBLANK_EVASION_TIME_US;
> + if (dev_priv->psr.enabled || new_crtc_state->has_psr)
> + evasion += 300;
> +
> /* FIXME needs to be calibrated sensibly */
> - min = vblank_start - intel_usecs_to_scanlines(adjusted_mode,
> - VBLANK_EVASION_TIME_US);
> + min = vblank_start - intel_usecs_to_scanlines(adjusted_mode, evasion);
> max = vblank_start - 1;
>
> if (min <= 0 || max <= 0)
> --
> 2.20.1
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-02-13 16:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 16:21 [PATCH] drm/i915/psr: Bump vblank evasion time for seamless updates Chris Wilson
2019-02-13 16:30 ` Ville Syrjälä [this message]
2019-02-13 16:34 ` Chris Wilson
2019-02-14 12:49 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-02-14 12:50 ` [PATCH] " Chris Wilson
2019-02-14 15:44 ` ✓ Fi.CI.IGT: success for " Patchwork
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=20190213163010.GI20097@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=paulo.r.zanoni@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.