Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Souza, Jose" <jose.souza@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Fix warnings about PSR lock not held
Date: Thu, 7 Apr 2022 13:40:10 +0000	[thread overview]
Message-ID: <2bfbdad682c31f01e2aa1c7dd2eb2a2d0f642fb1.camel@intel.com> (raw)
In-Reply-To: <20220406210540.493610-1-jose.souza@intel.com>

On Wed, 2022-04-06 at 14:05 -0700, José Roberto de Souza wrote:
> Commit 3b6f409547fb ("drm/i915/display/psr: Lock and unlock PSR
> around
> pipe updates") did not took into account async flips with PSR1 and
> PSR2 HW tracking, causing PSR lock not be held and causing warnings
> when intel_psr2_program_trans_man_trk_ctl() is executed.
> 
> So here taking the PSR lock before the earlier return in
> intel_pipe_update_start/end().

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
> 


> Cc: Jouni Högander <jouni.hogander@intel.com>
> Reported-by: Imre Deak <imre.deak@intel.com>
> Fixes: 3b6f409547fb ("drm/i915/display/psr: Lock and unlock PSR
> around pipe updates")
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_crtc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c
> b/drivers/gpu/drm/i915/display/intel_crtc.c
> index a5439182d5ae4..4442aa355f868 100644
> --- a/drivers/gpu/drm/i915/display/intel_crtc.c
> +++ b/drivers/gpu/drm/i915/display/intel_crtc.c
> @@ -487,6 +487,8 @@ void intel_pipe_update_start(struct
> intel_crtc_state *new_crtc_state)
>  		intel_crtc_has_type(new_crtc_state, INTEL_OUTPUT_DSI);
>  	DEFINE_WAIT(wait);
>  
> +	intel_psr_lock(new_crtc_state);
> +
>  	if (new_crtc_state->do_async_flip)
>  		return;
>  
> @@ -507,8 +509,6 @@ void intel_pipe_update_start(struct
> intel_crtc_state *new_crtc_state)
>  						      VBLANK_EVASION_TI
> ME_US);
>  	max = vblank_start - 1;
>  
> -	intel_psr_lock(new_crtc_state);
> -
>  	if (min <= 0 || max <= 0)
>  		goto irq_disable;
>  
> @@ -634,6 +634,8 @@ void intel_pipe_update_end(struct
> intel_crtc_state *new_crtc_state)
>  	ktime_t end_vbl_time = ktime_get();
>  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>  
> +	intel_psr_unlock(new_crtc_state);
> +
>  	if (new_crtc_state->do_async_flip)
>  		return;
>  
> @@ -685,8 +687,6 @@ void intel_pipe_update_end(struct
> intel_crtc_state *new_crtc_state)
>  
>  	local_irq_enable();
>  
> -	intel_psr_unlock(new_crtc_state);
> -
>  	if (intel_vgpu_active(dev_priv))
>  		return;
>  


  parent reply	other threads:[~2022-04-07 13:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 21:05 [Intel-gfx] [PATCH] drm/i915/display: Fix warnings about PSR lock not held José Roberto de Souza
2022-04-07  3:04 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2022-04-07 13:40 ` Hogander, Jouni [this message]
2022-04-07 16:14 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display: Fix warnings about PSR lock not held (rev2) Patchwork
2022-04-07 21:01 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display: Fix warnings about PSR lock not held (rev3) Patchwork
2022-04-07 21:05   ` Souza, Jose
2022-04-08 14:20     ` Vudum, Lakshminarayana
2022-04-08  7:11 ` Patchwork
2022-04-08  7:39 ` Patchwork
2022-04-08 14:37 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display: Fix warnings about PSR lock not held (rev4) Patchwork
2022-04-08 15:46 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-04-08 17:13 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=2bfbdad682c31f01e2aa1c7dd2eb2a2d0f642fb1.camel@intel.com \
    --to=jouni.hogander@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