intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* Re: [Intel-gfx] [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2
  2020-12-01 16:47 ` [Intel-gfx] [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2 Uma Shankar
@ 2020-12-01 16:43   ` Souza, Jose
  2020-12-01 16:48     ` Shankar, Uma
  0 siblings, 1 reply; 5+ messages in thread
From: Souza, Jose @ 2020-12-01 16:43 UTC (permalink / raw)
  To: Shankar, Uma, intel-gfx@lists.freedesktop.org

On Tue, 2020-12-01 at 22:17 +0530, Uma Shankar wrote:
> There are some corner cases wrt underrun when we enable
> FBC with PSR2 on TGL. Recommendation from hardware is to
> keep this combination disabled.
> 
> Bspec: 50422 HSD: 14010260002
> 
> v2: Added psr2 enabled check from crtc_state (Anshuman)
> Added Bspec link and HSD referneces (Jose)
> 
> v3: Moved the logic to disable fbc to intel_fbc_update_state_cache
> and removed the crtc->config usages, as per Ville's recommendation.
> 
> v4: Introduced a variable in fbc state_cache instead of the earlier
> plane.visible WA, as suggested by Jose.
> 
> v5: Dropped an extra check for fbc in intel_fbc_enable and addressed
> review comments by Jose.
> 
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 12 ++++++++++++
>  drivers/gpu/drm/i915/i915_drv.h          |  1 +
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index a5b072816a7b..611cadc5c70a 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -742,6 +742,8 @@ static void intel_fbc_update_state_cache(struct intel_crtc *crtc,
>  		cache->fence_id = plane_state->vma->fence->id;
>  	else
>  		cache->fence_id = -1;
> +
> +	cache->psr2_active = crtc_state->has_psr2;
>  }
>  
> 
> 
> 
>  static bool intel_fbc_cfb_size_changed(struct drm_i915_private *dev_priv)
> @@ -799,6 +801,16 @@ static bool intel_fbc_can_activate(struct intel_crtc *crtc)
>  	struct intel_fbc *fbc = &dev_priv->fbc;
>  	struct intel_fbc_state_cache *cache = &fbc->state_cache;
>  
> 
> 
> 
> +	/*
> +	 * Tigerlake is not supporting FBC with PSR2.
> +	 * Recommendation is to keep this combination disabled
> +	 * Bspec: 50422 HSD: 14010260002
> +	 */
> +	if (fbc->state_cache.psr2_active && IS_TIGERLAKE(dev_priv)) {
> +		fbc->no_fbc_reason = "not supported with PSR2";
> +		return false;
> +	}

Nitpick: all new restrictions are added at the bottom lets follow it.
With this change you can add my rvb in both patches.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>



> +
>  	if (!intel_fbc_can_enable(dev_priv))
>  		return false;
>  
> 
> 
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 15be8debae54..f4e08c1a5867 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -416,6 +416,7 @@ struct intel_fbc {
>  		u16 gen9_wa_cfb_stride;
>  		u16 interval;
>  		s8 fence_id;
> +		bool psr2_active;
>  	} state_cache;
>  
> 
> 
> 
>  	/*

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Intel-gfx] [v5 0/2] Re-enable FBC on TGL
@ 2020-12-01 16:47 Uma Shankar
  2020-12-01 16:47 ` [Intel-gfx] [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2 Uma Shankar
  2020-12-01 16:47 ` [Intel-gfx] [v5 2/2] Revert "drm/i915/display/fbc: Disable fbc by default on TGL" Uma Shankar
  0 siblings, 2 replies; 5+ messages in thread
From: Uma Shankar @ 2020-12-01 16:47 UTC (permalink / raw)
  To: intel-gfx

FBC was disabled on TGL due to random underruns. It has
been determined that FBC will not work reliably with PSR2.
This series re-enables fbc along with taking care of the
PSR2 limitations for TGL.

Bspec: 50422 HSD: 14010260002

v2: Addressed review comments and added bspec links

v3: Addressed Ville's review comments

v4: Change the WA as per Jose's recommendation.

v5: Addressed Jose's review comments.

Uma Shankar (2):
  drm/i915/display/tgl: Disable FBC with PSR2
  Revert "drm/i915/display/fbc: Disable fbc by default on TGL"

 drivers/gpu/drm/i915/display/intel_fbc.c | 19 ++++++++++++-------
 drivers/gpu/drm/i915/i915_drv.h          |  1 +
 2 files changed, 13 insertions(+), 7 deletions(-)

-- 
2.26.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Intel-gfx] [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2
  2020-12-01 16:47 [Intel-gfx] [v5 0/2] Re-enable FBC on TGL Uma Shankar
@ 2020-12-01 16:47 ` Uma Shankar
  2020-12-01 16:43   ` Souza, Jose
  2020-12-01 16:47 ` [Intel-gfx] [v5 2/2] Revert "drm/i915/display/fbc: Disable fbc by default on TGL" Uma Shankar
  1 sibling, 1 reply; 5+ messages in thread
From: Uma Shankar @ 2020-12-01 16:47 UTC (permalink / raw)
  To: intel-gfx

There are some corner cases wrt underrun when we enable
FBC with PSR2 on TGL. Recommendation from hardware is to
keep this combination disabled.

Bspec: 50422 HSD: 14010260002

v2: Added psr2 enabled check from crtc_state (Anshuman)
Added Bspec link and HSD referneces (Jose)

v3: Moved the logic to disable fbc to intel_fbc_update_state_cache
and removed the crtc->config usages, as per Ville's recommendation.

v4: Introduced a variable in fbc state_cache instead of the earlier
plane.visible WA, as suggested by Jose.

v5: Dropped an extra check for fbc in intel_fbc_enable and addressed
review comments by Jose.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 12 ++++++++++++
 drivers/gpu/drm/i915/i915_drv.h          |  1 +
 2 files changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index a5b072816a7b..611cadc5c70a 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -742,6 +742,8 @@ static void intel_fbc_update_state_cache(struct intel_crtc *crtc,
 		cache->fence_id = plane_state->vma->fence->id;
 	else
 		cache->fence_id = -1;
+
+	cache->psr2_active = crtc_state->has_psr2;
 }
 
 static bool intel_fbc_cfb_size_changed(struct drm_i915_private *dev_priv)
@@ -799,6 +801,16 @@ static bool intel_fbc_can_activate(struct intel_crtc *crtc)
 	struct intel_fbc *fbc = &dev_priv->fbc;
 	struct intel_fbc_state_cache *cache = &fbc->state_cache;
 
+	/*
+	 * Tigerlake is not supporting FBC with PSR2.
+	 * Recommendation is to keep this combination disabled
+	 * Bspec: 50422 HSD: 14010260002
+	 */
+	if (fbc->state_cache.psr2_active && IS_TIGERLAKE(dev_priv)) {
+		fbc->no_fbc_reason = "not supported with PSR2";
+		return false;
+	}
+
 	if (!intel_fbc_can_enable(dev_priv))
 		return false;
 
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 15be8debae54..f4e08c1a5867 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -416,6 +416,7 @@ struct intel_fbc {
 		u16 gen9_wa_cfb_stride;
 		u16 interval;
 		s8 fence_id;
+		bool psr2_active;
 	} state_cache;
 
 	/*
-- 
2.26.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Intel-gfx] [v5 2/2] Revert "drm/i915/display/fbc: Disable fbc by default on TGL"
  2020-12-01 16:47 [Intel-gfx] [v5 0/2] Re-enable FBC on TGL Uma Shankar
  2020-12-01 16:47 ` [Intel-gfx] [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2 Uma Shankar
@ 2020-12-01 16:47 ` Uma Shankar
  1 sibling, 0 replies; 5+ messages in thread
From: Uma Shankar @ 2020-12-01 16:47 UTC (permalink / raw)
  To: intel-gfx

FBC can be re-enabled on TGL with WA of keeping it disabled
while PSR2 is enabled.

This reverts commit 2982ded2ff5ce0cf1a49bc39a526da182782b664.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 611cadc5c70a..415c9d949d36 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -1445,13 +1445,6 @@ static int intel_sanitize_fbc_option(struct drm_i915_private *dev_priv)
 	if (!HAS_FBC(dev_priv))
 		return 0;
 
-	/*
-	 * Fbc is causing random underruns in CI execution on TGL platforms.
-	 * Disabling the same while the problem is being debugged and analyzed.
-	 */
-	if (IS_TIGERLAKE(dev_priv))
-		return 0;
-
 	if (IS_BROADWELL(dev_priv) || INTEL_GEN(dev_priv) >= 9)
 		return 1;
 
-- 
2.26.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2
  2020-12-01 16:43   ` Souza, Jose
@ 2020-12-01 16:48     ` Shankar, Uma
  0 siblings, 0 replies; 5+ messages in thread
From: Shankar, Uma @ 2020-12-01 16:48 UTC (permalink / raw)
  To: Souza, Jose, intel-gfx@lists.freedesktop.org



> -----Original Message-----
> From: Souza, Jose <jose.souza@intel.com>
> Sent: Tuesday, December 1, 2020 10:13 PM
> To: Shankar, Uma <uma.shankar@intel.com>; intel-gfx@lists.freedesktop.org
> Cc: ville.syrjala@linux.intel.com
> Subject: Re: [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2
> 
> On Tue, 2020-12-01 at 22:17 +0530, Uma Shankar wrote:
> > There are some corner cases wrt underrun when we enable FBC with PSR2
> > on TGL. Recommendation from hardware is to keep this combination
> > disabled.
> >
> > Bspec: 50422 HSD: 14010260002
> >
> > v2: Added psr2 enabled check from crtc_state (Anshuman) Added Bspec
> > link and HSD referneces (Jose)
> >
> > v3: Moved the logic to disable fbc to intel_fbc_update_state_cache and
> > removed the crtc->config usages, as per Ville's recommendation.
> >
> > v4: Introduced a variable in fbc state_cache instead of the earlier
> > plane.visible WA, as suggested by Jose.
> >
> > v5: Dropped an extra check for fbc in intel_fbc_enable and addressed
> > review comments by Jose.
> >
> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_fbc.c | 12 ++++++++++++
> >  drivers/gpu/drm/i915/i915_drv.h          |  1 +
> >  2 files changed, 13 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c
> > b/drivers/gpu/drm/i915/display/intel_fbc.c
> > index a5b072816a7b..611cadc5c70a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> > @@ -742,6 +742,8 @@ static void intel_fbc_update_state_cache(struct
> intel_crtc *crtc,
> >  		cache->fence_id = plane_state->vma->fence->id;
> >  	else
> >  		cache->fence_id = -1;
> > +
> > +	cache->psr2_active = crtc_state->has_psr2;
> >  }
> >
> >
> >
> >
> >  static bool intel_fbc_cfb_size_changed(struct drm_i915_private
> > *dev_priv) @@ -799,6 +801,16 @@ static bool intel_fbc_can_activate(struct
> intel_crtc *crtc)
> >  	struct intel_fbc *fbc = &dev_priv->fbc;
> >  	struct intel_fbc_state_cache *cache = &fbc->state_cache;
> >
> >
> >
> >
> > +	/*
> > +	 * Tigerlake is not supporting FBC with PSR2.
> > +	 * Recommendation is to keep this combination disabled
> > +	 * Bspec: 50422 HSD: 14010260002
> > +	 */
> > +	if (fbc->state_cache.psr2_active && IS_TIGERLAKE(dev_priv)) {
> > +		fbc->no_fbc_reason = "not supported with PSR2";
> > +		return false;
> > +	}
> 
> Nitpick: all new restrictions are added at the bottom lets follow it.

Sure, will update that.

> With this change you can add my rvb in both patches.
> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

Thanks Jose for the review.

Regards,
Uma Shankar
> 
> 
> > +
> >  	if (!intel_fbc_can_enable(dev_priv))
> >  		return false;
> >
> >
> >
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h
> > b/drivers/gpu/drm/i915/i915_drv.h index 15be8debae54..f4e08c1a5867
> > 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -416,6 +416,7 @@ struct intel_fbc {
> >  		u16 gen9_wa_cfb_stride;
> >  		u16 interval;
> >  		s8 fence_id;
> > +		bool psr2_active;
> >  	} state_cache;
> >
> >
> >
> >
> >  	/*

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-01 16:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-01 16:47 [Intel-gfx] [v5 0/2] Re-enable FBC on TGL Uma Shankar
2020-12-01 16:47 ` [Intel-gfx] [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2 Uma Shankar
2020-12-01 16:43   ` Souza, Jose
2020-12-01 16:48     ` Shankar, Uma
2020-12-01 16:47 ` [Intel-gfx] [v5 2/2] Revert "drm/i915/display/fbc: Disable fbc by default on TGL" Uma Shankar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).