drm/i915: Ignore GTFIFODBG FIFO free entry fields on CHV
Subsystems (2)
PATCH 1/1 drm/i915: Ignore GTFIFODBG FIFO free entry fields on CHV
From: Ville Syrjälä <[email protected]>
On CHV GTFIFODBG has some read-only bits to indicate the number of free FIFO entries. Ignore these when checking to see if any of the sticky error bits are set.
This gets rid of these during device resume:
[drm:cherryview_enable_rps] GT fifo had a previous error 1080000
While at it, move the assignments out of the if().
--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -6866,6 +6866,8 @@ enum skl_disp_power_wells {#define VLV_SPAREG2H _MMIO(0xA194)#define GTFIFODBG _MMIO(0x120000) +#define GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV (0x1f << 20) +#define GT_FIFO_FREE_ENTRIES_CHV (0x7f << 13)#define GT_FIFO_SBDROPERR (1<<6)#define GT_FIFO_BLOBDROPERR (1<<5)#define GT_FIFO_SB_READ_ABORTERR (1<<4)
drivers/gpu/drm/i915/intel_pm.c +6 -3
@@ -4997,7 +4997,8 @@ static void gen6_enable_rps(struct drm_device *dev)I915_WRITE (GEN6_RC_STATE ,0 );/* Clear the DBG now so we don't confuse earlier errors */ -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_ERROR ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg); }
@@ -5528,7 +5529,8 @@ static void cherryview_enable_rps(struct drm_device *dev)WARN_ON (!mutex_is_locked (&dev_priv->rps.hw_lock)); - gtfifodbg =I915_READ (GTFIFODBG ); + gtfifodbg =I915_READ (GTFIFODBG ) & ~(GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV | +GT_FIFO_FREE_ENTRIES_CHV );if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);
@@ -5627,7 +5629,8 @@ static void valleyview_enable_rps(struct drm_device *dev)valleyview_check_pctx (dev_priv); -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg);
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · On Wed, Apr 13, 2016 at 09:09:30PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
On CHV GTFIFODBG has some read-only bits to indicate the number of free FIFO entries. Ignore these when checking to see if any of the sticky error bits are set.
Quoted 7 lines
This gets rid of these during device resume:
[drm:cherryview_enable_rps] GT fifo had a previous error 1080000While at it, move the assignments out of the
if().Cc Chris Wilson <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>
Not entirely sure we don't want to filter even more, but these we want to filter for sure.
Also just realized that we don't check this on in the chv_write functions. Should we?
-Daniel
Quoted 59 lines
--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -6866,6 +6866,8 @@ enum skl_disp_power_wells {#define VLV_SPAREG2H _MMIO(0xA194)#define GTFIFODBG _MMIO(0x120000) +#define GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV (0x1f << 20) +#define GT_FIFO_FREE_ENTRIES_CHV (0x7f << 13)#define GT_FIFO_SBDROPERR (1<<6)#define GT_FIFO_BLOBDROPERR (1<<5)#define GT_FIFO_SB_READ_ABORTERR (1<<4)drivers/gpu/drm/i915/intel_pm.c +6
-3@@ -4997,7 +4997,8 @@ static void gen6_enable_rps(struct drm_device *dev)I915_WRITE (GEN6_RC_STATE ,0 );/* Clear the DBG now so we don't confuse earlier errors */ -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_ERROR ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg); }@@ -5528,7 +5529,8 @@ static void cherryview_enable_rps(struct drm_device *dev)WARN_ON (!mutex_is_locked (&dev_priv->rps.hw_lock)); - gtfifodbg =I915_READ (GTFIFODBG ); + gtfifodbg =I915_READ (GTFIFODBG ) & ~(GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV | +GT_FIFO_FREE_ENTRIES_CHV );if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);@@ -5627,7 +5629,8 @@ static void valleyview_enable_rps(struct drm_device *dev)valleyview_check_pctx (dev_priv); -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg);Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 15 lines · Daniel Vetter
Quoted 6 lines · On Wed, Apr 13, 2016 at 09:09:30PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
On CHV GTFIFODBG has some read-only bits to indicate the number of free FIFO entries. Ignore these when checking to see if any of the sticky error bits are set.
Quoted 7 lines
This gets rid of these during device resume:
[drm:cherryview_enable_rps] GT fifo had a previous error 1080000While at it, move the assignments out of the
if().Cc Chris Wilson <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>
Quoted 7 lines
Not entirely sure we don't want to filter even more, but these we want to filter for sure.
Reviewed-by Daniel Vetter <[email protected]>Also just realized that we don't check this on in the
chv_writefunctions. Should we?
CHV is very weird in this regard. Supposedly it has both the wake FIFO and the BDW style shadow register mechanism. The FIFO sits in front of the shadow registers. I suppose when the power is off the FIFO just feeds the shadow registers, meaning the FIFO should never be blocked. In the past some pople tried to tell me that the wake FIFO doesn't exist anymore, but the registers are clearly there, and some of the gunit docs do still show it as present. In any case, I think the recommendation was to rely on the shadow register stuff and ignore the wake FIFO.
That was all before WaDisableShadowRegForCpd though. I think what that does is disable the shadow register collapsing (in some cases at least), and so I presume that might mean that the FIFO may in fact start to fill up. So keeping an eye on the FIFO might make sense with that workaround in place. But of course none of this is actually documented anywhere.
Quoted 66 lines
-Daniel
Quoted 59 lines
--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -6866,6 +6866,8 @@ enum skl_disp_power_wells {#define VLV_SPAREG2H _MMIO(0xA194)#define GTFIFODBG _MMIO(0x120000) +#define GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV (0x1f << 20) +#define GT_FIFO_FREE_ENTRIES_CHV (0x7f << 13)#define GT_FIFO_SBDROPERR (1<<6)#define GT_FIFO_BLOBDROPERR (1<<5)#define GT_FIFO_SB_READ_ABORTERR (1<<4)drivers/gpu/drm/i915/intel_pm.c +6
-3@@ -4997,7 +4997,8 @@ static void gen6_enable_rps(struct drm_device *dev)I915_WRITE (GEN6_RC_STATE ,0 );/* Clear the DBG now so we don't confuse earlier errors */ -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_ERROR ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg); }@@ -5528,7 +5529,8 @@ static void cherryview_enable_rps(struct drm_device *dev)WARN_ON (!mutex_is_locked (&dev_priv->rps.hw_lock)); - gtfifodbg =I915_READ (GTFIFODBG ); + gtfifodbg =I915_READ (GTFIFODBG ) & ~(GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV | +GT_FIFO_FREE_ENTRIES_CHV );if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);@@ -5627,7 +5629,8 @@ static void valleyview_enable_rps(struct drm_device *dev)valleyview_check_pctx (dev_priv); -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg);Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ville Syrjälä
AppliedQuoted 12 lines · Daniel Vetter
Quoted 11 lines · On Wed, Apr 13, 2016 at 09:09:30PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
On CHV GTFIFODBG has some read-only bits to indicate the number of free FIFO entries. Ignore these when checking to see if any of the sticky error bits are set.
This gets rid of these during device resume:
[drm:cherryview_enable_rps] GT fifo had a previous error 1080000While at it, move the assignments out of the
if().
Quoted 7 lines
Quoted 2 lines
Cc Chris Wilson <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>Not entirely sure we don't want to filter even more, but these we want to filter for sure.
Reviewed-by Daniel Vetter <[email protected]>
Pushed to dinq. Thanks for the review.
Quoted 69 lines
Also just realized that we don't check this on in the
chv_writefunctions. Should we?
-DanielQuoted 59 lines
--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -6866,6 +6866,8 @@ enum skl_disp_power_wells {#define VLV_SPAREG2H _MMIO(0xA194)#define GTFIFODBG _MMIO(0x120000) +#define GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV (0x1f << 20) +#define GT_FIFO_FREE_ENTRIES_CHV (0x7f << 13)#define GT_FIFO_SBDROPERR (1<<6)#define GT_FIFO_BLOBDROPERR (1<<5)#define GT_FIFO_SB_READ_ABORTERR (1<<4)drivers/gpu/drm/i915/intel_pm.c +6
-3@@ -4997,7 +4997,8 @@ static void gen6_enable_rps(struct drm_device *dev)I915_WRITE (GEN6_RC_STATE ,0 );/* Clear the DBG now so we don't confuse earlier errors */ -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_ERROR ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg); }@@ -5528,7 +5529,8 @@ static void cherryview_enable_rps(struct drm_device *dev)WARN_ON (!mutex_is_locked (&dev_priv->rps.hw_lock)); - gtfifodbg =I915_READ (GTFIFODBG ); + gtfifodbg =I915_READ (GTFIFODBG ) & ~(GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV | +GT_FIFO_FREE_ENTRIES_CHV );if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);@@ -5627,7 +5629,8 @@ static void valleyview_enable_rps(struct drm_device *dev)valleyview_check_pctx (dev_priv); -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg);Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 16 lines · Ville Syrjälä
Quoted 15 lines · Daniel Vetter
Quoted 13 lines · On Wed, Apr 13, 2016 at 09:09:30PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
On CHV GTFIFODBG has some read-only bits to indicate the number of free FIFO entries. Ignore these when checking to see if any of the sticky error bits are set.
This gets rid of these during device resume:
[drm:cherryview_enable_rps] GT fifo had a previous error 1080000While at it, move the assignments out of the
if().Cc Chris Wilson <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>
Quoted 6 lines
Quoted 4 lines
Not entirely sure we don't want to filter even more, but these we want to filter for sure.
Reviewed-by Daniel Vetter <[email protected]>Pushed to dinq. Thanks for the review.
Maybe my mailer is broken, but did CI crunch on this? I don't spot it's mail anywhere ...
-Daniel
Quoted 74 lines
Quoted 70 lines
Also just realized that we don't check this on in the
chv_writefunctions. Should we?
-DanielQuoted 59 lines
--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -6866,6 +6866,8 @@ enum skl_disp_power_wells {#define VLV_SPAREG2H _MMIO(0xA194)#define GTFIFODBG _MMIO(0x120000) +#define GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV (0x1f << 20) +#define GT_FIFO_FREE_ENTRIES_CHV (0x7f << 13)#define GT_FIFO_SBDROPERR (1<<6)#define GT_FIFO_BLOBDROPERR (1<<5)#define GT_FIFO_SB_READ_ABORTERR (1<<4)drivers/gpu/drm/i915/intel_pm.c +6
-3@@ -4997,7 +4997,8 @@ static void gen6_enable_rps(struct drm_device *dev)I915_WRITE (GEN6_RC_STATE ,0 );/* Clear the DBG now so we don't confuse earlier errors */ -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_ERROR ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg); }@@ -5528,7 +5529,8 @@ static void cherryview_enable_rps(struct drm_device *dev)WARN_ON (!mutex_is_locked (&dev_priv->rps.hw_lock)); - gtfifodbg =I915_READ (GTFIFODBG ); + gtfifodbg =I915_READ (GTFIFODBG ) & ~(GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV | +GT_FIFO_FREE_ENTRIES_CHV );if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);@@ -5627,7 +5629,8 @@ static void valleyview_enable_rps(struct drm_device *dev)valleyview_check_pctx (dev_priv); -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg);Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.chSignature · 2 lines
Ville Syrjälä Intel OTC
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 20 lines · Daniel Vetter
Quoted 19 lines · Ville Syrjälä
Quoted 18 lines · Daniel Vetter
Quoted 6 lines · On Wed, Apr 13, 2016 at 09:09:30PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
On CHV GTFIFODBG has some read-only bits to indicate the number of free FIFO entries. Ignore these when checking to see if any of the sticky error bits are set.
Quoted 7 lines
This gets rid of these during device resume:
[drm:cherryview_enable_rps] GT fifo had a previous error 1080000While at it, move the assignments out of the
if().Cc Chris Wilson <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>Not entirely sure we don't want to filter even more, but these we want to filter for sure.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Daniel Vetter <[email protected]>Pushed to dinq. Thanks for the review.
Maybe my mailer is broken, but did CI crunch on this? I don't spot it's mail anywhere ...
Hmm. Seems you're right. I must have been looking at the CI mail for another series, or just plain forgotten to look for one. Pardon my hastyness.
Quoted 81 lines
-Daniel
Quoted 74 lines
Quoted 70 lines
Also just realized that we don't check this on in the
chv_writefunctions. Should we?
-DanielQuoted 59 lines
--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -6866,6 +6866,8 @@ enum skl_disp_power_wells {#define VLV_SPAREG2H _MMIO(0xA194)#define GTFIFODBG _MMIO(0x120000) +#define GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV (0x1f << 20) +#define GT_FIFO_FREE_ENTRIES_CHV (0x7f << 13)#define GT_FIFO_SBDROPERR (1<<6)#define GT_FIFO_BLOBDROPERR (1<<5)#define GT_FIFO_SB_READ_ABORTERR (1<<4)drivers/gpu/drm/i915/intel_pm.c +6
-3@@ -4997,7 +4997,8 @@ static void gen6_enable_rps(struct drm_device *dev)I915_WRITE (GEN6_RC_STATE ,0 );/* Clear the DBG now so we don't confuse earlier errors */ -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_ERROR ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg); }@@ -5528,7 +5529,8 @@ static void cherryview_enable_rps(struct drm_device *dev)WARN_ON (!mutex_is_locked (&dev_priv->rps.hw_lock)); - gtfifodbg =I915_READ (GTFIFODBG ); + gtfifodbg =I915_READ (GTFIFODBG ) & ~(GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV | +GT_FIFO_FREE_ENTRIES_CHV );if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);@@ -5627,7 +5629,8 @@ static void valleyview_enable_rps(struct drm_device *dev)valleyview_check_pctx (dev_priv); -if ((gtfifodbg =I915_READ (GTFIFODBG ))) { + gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg) {DRM_DEBUG_DRIVER ("GT fifo had a previous error %x\n" , gtfifodbg);I915_WRITE (GTFIFODBG , gtfifodbg);Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.chSignature · 2 lines
Ville Syrjälä Intel OTCSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx