All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: intel-gfx@lists.freedesktop.org, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: do not reset PLANE_SURF on plane disable on older gens
Date: Mon, 5 Sep 2022 14:48:10 +0300	[thread overview]
Message-ID: <YxXh+gGqGGahJc08@intel.com> (raw)
In-Reply-To: <20220905080500.213330-1-andrzej.hajda@intel.com>

On Mon, Sep 05, 2022 at 10:05:00AM +0200, Andrzej Hajda wrote:
> In case of ICL and older generations disabling plane and/or disabling
> async update is always performed on vblank,

It should only be broken on bdw-glk (see. need_async_flip_disable_wa).

> but if async update is enabled
> PLANE_SURF register is updated asynchronously. Writing 0 to PLANE_SURF
> when plane is still enabled can cause DMAR/PIPE errors.
> On the other side PLANE_SURF is used to arm plane registers - we need to
> write to it to trigger update on VBLANK, writting current value should
> be safe - the buffer address is valid till vblank.

I think you're effectively saying that somehow the async
flip disable w/a is not kicking in sometimes.

> 
> Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
> ---
>  drivers/gpu/drm/i915/display/skl_universal_plane.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index bcfde81e4d0866..bc9ed60a2d349e 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -615,11 +615,13 @@ skl_plane_disable_arm(struct intel_plane *plane,
>  	struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
>  	enum plane_id plane_id = plane->id;
>  	enum pipe pipe = plane->pipe;
> +	u32 plane_surf;
>  
>  	skl_write_plane_wm(plane, crtc_state);
>  
>  	intel_de_write_fw(dev_priv, PLANE_CTL(pipe, plane_id), 0);
> -	intel_de_write_fw(dev_priv, PLANE_SURF(pipe, plane_id), 0);
> +	plane_surf = intel_de_read_fw(dev_priv, PLANE_SURF(pipe, plane_id));
> +	intel_de_write_fw(dev_priv, PLANE_SURF(pipe, plane_id), plane_surf);
>  }
>  
>  static void
> @@ -629,6 +631,7 @@ icl_plane_disable_arm(struct intel_plane *plane,
>  	struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
>  	enum plane_id plane_id = plane->id;
>  	enum pipe pipe = plane->pipe;
> +	u32 plane_surf;
>  
>  	if (icl_is_hdr_plane(dev_priv, plane_id))
>  		intel_de_write_fw(dev_priv, PLANE_CUS_CTL(pipe, plane_id), 0);
> @@ -637,7 +640,8 @@ icl_plane_disable_arm(struct intel_plane *plane,
>  
>  	intel_psr2_disable_plane_sel_fetch(plane, crtc_state);
>  	intel_de_write_fw(dev_priv, PLANE_CTL(pipe, plane_id), 0);
> -	intel_de_write_fw(dev_priv, PLANE_SURF(pipe, plane_id), 0);
> +	plane_surf = intel_de_read_fw(dev_priv, PLANE_SURF(pipe, plane_id));
> +	intel_de_write_fw(dev_priv, PLANE_SURF(pipe, plane_id), plane_surf);
>  }
>  
>  static bool
> -- 
> 2.25.1

-- 
Ville Syrjälä
Intel

  parent reply	other threads:[~2022-09-05 11:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05  8:05 [Intel-gfx] [PATCH] drm/i915: do not reset PLANE_SURF on plane disable on older gens Andrzej Hajda
2022-09-05  8:53 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-09-05  9:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-05 10:59 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-09-05 11:48 ` Ville Syrjälä [this message]
2022-09-05 17:02   ` [Intel-gfx] [PATCH] " Andrzej Hajda
2022-09-05 17:44     ` Ville Syrjälä
2022-09-06 11:09       ` Andrzej Hajda
2022-09-06 11:22         ` Ville Syrjälä
2022-09-06 11:32           ` Ville Syrjälä
2022-09-06 13:57           ` Andrzej Hajda
2022-09-06 14:14             ` Ville Syrjälä
2022-09-06 14:36               ` Ville Syrjälä
2022-09-06 14:43                 ` Ville Syrjälä
2022-09-06 16:14                   ` Andrzej Hajda
2022-09-06 16:21                     ` Ville Syrjälä

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=YxXh+gGqGGahJc08@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=andrzej.hajda@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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.