Re-enable FBC on TGL
Subsystems (3)
v5 cover Re-enable FBC on TGL
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(-)
Signature · 6 lines
2.26.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 1/2 drm/i915/display/tgl: Disable FBC with PSR2
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.
--- drivers/gpu/drm/i915/display/intel_fbc.c | 12 ++++++++++++ drivers/gpu/drm/i915/i915_drv.h | 1 + 2 files changed, 13 insertions(+)
drivers/gpu/drm/i915/display/intel_fbc.c +12 -0
@@ -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;
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -416,6 +416,7 @@ struct intel_fbc {u16 gen9_wa_cfb_stride;u16 interval;s8 fence_id; +bool psr2_active; } state_cache;/*
Signature · 6 lines
2.26.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2
Quoted 47 lines · Uma Shankar
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_cacheand removed thecrtc->configusages, as per Ville's recommendation.v4: Introduced a variable in fbc
state_cacheinstead of the earlier plane.visible WA, as suggested by Jose.v5: Dropped an extra check for fbc in
intel_fbc_enableand addressed review comments by Jose.Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/display/intel_fbc.c | 12 ++++++++++++
drivers/gpu/drm/i915/i915_drv.h | 1 +2 files changed, 13 insertions(+)drivers/gpu/drm/i915/display/intel_fbc.c +0
-0@@ -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;drivers/gpu/drm/i915/display/intel_fbc.c +2
-0+ + cache->psr2_active = crtc_state->has_psr2;}
static bool
intel_fbc_cfb_size_changed(struct drm_i915_private *dev_priv)drivers/gpu/drm/i915/display/intel_fbc.c +0
-0@@ -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;
drivers/gpu/drm/i915/display/intel_fbc.c static bool intel_fbc_can_activate(struct intel_crtc *crtc) · line 812
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_fbc.c +9
-0+/* +* 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.
Quoted 21 lines
+
if (!intel_fbc_can_enable(dev_priv))
return false;drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -416,6 +416,7 @@ struct intel_fbc { u16 gen9_wa_cfb_stride; u16 interval; s8 fence_id; +bool psr2_active; } state_cache;
Quoted 1 line
/*
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2
Quoted 60 lines
-----Original Message-----
From: Souza, Jose <[email protected]>
Sent: Tuesday, December 1, 2020 10:13 PM
To: Shankar, Uma <[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: [v5 1/2] drm/i915/display/tgl: Disable FBC with PSR2drivers/gpu/drm/i915/display/intel_fbc.c static void intel_fbc_update_state_cache(struct
Quoted 30 lines · Uma Shankar
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_cacheand removed thecrtc->configusages, as per Ville's recommendation.v4: Introduced a variable in fbc
state_cacheinstead of the earlier plane.visible WA, as suggested by Jose.v5: Dropped an extra check for fbc in
intel_fbc_enableand addressed review comments by Jose.Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/display/intel_fbc.c | 12 ++++++++++++
drivers/gpu/drm/i915/i915_drv.h | 1 +2 files changed, 13 insertions(+)drivers/gpu/drm/i915/display/intel_fbc.c +0
-0@@ -742,6 +742,8 @@ static void intel_fbc_update_state_cache(struct
intel_crtc*crtc,Quoted 10 lines
drivers/gpu/drm/i915/display/intel_fbc.c +0
-0cache->fence_id = plane_state->vma->fence->id;else
cache->fence_id= -1;drivers/gpu/drm/i915/display/intel_fbc.c +2
-0+ + cache->psr2_active = crtc_state->has_psr2;}
Quoted 2 lines
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)Quoted 6 lines
struct
intel_fbc*fbc =&dev_priv->fbc;
structintel_fbc_state_cache*cache =&fbc->state_cache;
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_fbc.c static bool intel_fbc_can_activate(struct intel_crtc *crtc) · line 812
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_fbc.c +9
-0+/* +* 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.
Quoted 2 lines
With this change you can add my rvb in both patches.
Reviewed-by José Roberto de Souza <[email protected]>
Thanks Jose for the review.
Regards,
Uma Shankar
Quoted 24 lines
Quoted 24 lines
+
if (!intel_fbc_can_enable(dev_priv))
return false;(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_drv.hindex15be8debae54..f4e08c1a5867100644drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -416,6 +416,7 @@ struct intel_fbc { u16 gen9_wa_cfb_stride; u16 interval; s8 fence_id; +bool psr2_active; } state_cache;
Quoted 1 line
Quoted 1 line
/*
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 2/2 Revert "drm/i915/display/fbc: Disable fbc by default on TGL"
In reply to Uma ShankarFBC can be re-enabled on TGL with WA of keeping it disabled while PSR2 is enabled.
This reverts commit 2982ded2ff5ce0cf1a49bc39a526da182782b664.
--- drivers/gpu/drm/i915/display/intel_fbc.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/gpu/drm/i915/display/intel_fbc.c +0 -7
@@ -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 ;
Signature · 6 lines
2.26.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx