drm/i915/gen9: Check for DC state mismatch
Subsystems (2)
PATCH 1/1 drm/i915/gen9: Check for DC state mismatch
The DMC can incorrectly run off and allow DC states on it's own. We don't know the root-cause for this yet but this patch makes it more visible.
--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_csr.c | 2 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 8 ++++++++ 3 files changed, 11 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -746,6 +746,7 @@ struct intel_csr {uint32_t mmio_count;i915_reg_t mmioaddr[8 ];uint32_t mmiodata[8 ]; +uint32_t dc_state; };#define DEV_INFO_FOR_EACH_FLAG (func, sep) \
drivers/gpu/drm/i915/intel_csr.c +2 -0
@@ -243,6 +243,8 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv)I915_WRITE (dev_priv->csr.mmioaddr[i], dev_priv->csr.mmiodata[i]); } + + dev_priv->csr.dc_state =0 ; } static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv,
drivers/gpu/drm/i915/intel_runtime_pm.c +8 -0
@@ -494,10 +494,18 @@ static void gen9_set_dc_state(struct drm_i915_private *dev_priv, uint32_t state) val =I915_READ (DC_STATE_EN );DRM_DEBUG_KMS ("Setting DC state from %02x to %02x\n" , val & mask, state); + +/* Check if DMC is ignoring our DC state requests */ +if ((val & mask) != dev_priv->csr.dc_state) +DRM_ERROR ("DC state mismatch (0x%x -> 0x%x)\n" , + dev_priv->csr.dc_state, val & mask); + val &= ~mask; val |= state;I915_WRITE (DC_STATE_EN , val);POSTING_READ (DC_STATE_EN ); + + dev_priv->csr.dc_state = val & mask; }void bxt_enable_dc9 (struct drm_i915_private *dev_priv)
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · Patrik Jakobsson
The DMC can incorrectly run off and allow DC states on it's own. We don't know the root-cause for this yet but this patch makes it more visible.
Signed-off-by Patrik Jakobsson <[email protected]>
Yes, we definitely need much more state checking and hardening in this area.
Quoted 56 lines
--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_csr.c | 2 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 8 ++++++++ 3 files changed, 11 insertions(+)drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -746,6 +746,7 @@ struct intel_csr {uint32_t mmio_count;i915_reg_t mmioaddr[8 ];uint32_t mmiodata[8 ]; +uint32_t dc_state; };#define DEV_INFO_FOR_EACH_FLAG (func, sep) \drivers/gpu/drm/i915/intel_csr.c +2
-0@@ -243,6 +243,8 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv)I915_WRITE (dev_priv->csr.mmioaddr[i], dev_priv->csr.mmiodata[i]); } + + dev_priv->csr.dc_state =0 ; } static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv,drivers/gpu/drm/i915/intel_runtime_pm.c +8
-0@@ -494,10 +494,18 @@ static void gen9_set_dc_state(struct drm_i915_private *dev_priv, uint32_t state) val =I915_READ (DC_STATE_EN );DRM_DEBUG_KMS ("Setting DC state from %02x to %02x\n" , val & mask, state); + +/* Check if DMC is ignoring our DC state requests */ +if ((val & mask) != dev_priv->csr.dc_state) +DRM_ERROR ("DC state mismatch (0x%x -> 0x%x)\n" , + dev_priv->csr.dc_state, val & mask); + val &= ~mask; val |= state;I915_WRITE (DC_STATE_EN , val);POSTING_READ (DC_STATE_EN ); + + dev_priv->csr.dc_state = val & mask; }void bxt_enable_dc9 (struct drm_i915_private *dev_priv)Signature · 1 line
2.5.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Vivi, Rodrigo
maintainerI was going to merge here but I saw on patchwork we got some warnings so I'm not sure they are only false positives or this is exactly what this patches wants...
Quoted 72 lines · Mika Kuoppala
Quoted 5 lines · Patrik Jakobsson
The DMC can incorrectly run off and allow DC states on it's own. We don't know the root-cause for this yet but this patch makes it more visible.
Signed-off-by Patrik Jakobsson <[email protected]>Yes, we definitely need much more state checking and hardening in this area.
Reviewed-by Mika Kuoppala <[email protected]>Quoted 58 lines
--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_csr.c | 2 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 8 ++++++++ 3 files changed, 11 insertions(+)drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -746,6 +746,7 @@ struct intel_csr {uint32_t mmio_count;i915_reg_t mmioaddr[8 ];uint32_t mmiodata[8 ]; +uint32_t dc_state; };#define DEV_INFO_FOR_EACH_FLAG (func, sep) \drivers/gpu/drm/i915/intel_csr.c +2
-0@@ -243,6 +243,8 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv) I915_WRITE(dev_priv->csr.mmioaddr[i], dev_priv->csr.mmiodata[i]); } + + dev_priv->csr.dc_state =0 ; }static
uint32_t*parse_csr_fw(structdrm_i915_private*dev_priv,drivers/gpu/drm/i915/intel_runtime_pm.c +8
-0@@ -494,10 +494,18 @@ static void gen9_set_dc_state(struct drm_i915_private *dev_priv, uint32_t state) val =I915_READ (DC_STATE_EN );DRM_DEBUG_KMS ("Setting DC state from %02x to %02x\n" , val & mask, state); + +/* Check if DMC is ignoring our DC state requests */ +if ((val & mask) != dev_priv->csr.dc_state) +DRM_ERROR ("DC state mismatch (0x%x -> 0x%x)\n" , + dev_priv->csr.dc_state, val & mask); + val &= ~mask; val |= state;I915_WRITE (DC_STATE_EN , val);POSTING_READ (DC_STATE_EN ); + + dev_priv->csr.dc_state = val & mask; }
Quoted 1 line
Quoted 1 line
void
bxt_enable_dc9(struct drm_i915_private *dev_priv)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 3 lines · Rodrigo
I was going to merge here but I saw on patchwork we got some warnings so I'm not sure they are only false positives or this is exactly what this patches wants...
They are unfortunately not false positives. The question is if it's ok to clutter CI results with known errors or not? Together with Mika's and Imre's patches we shouldn't be seeing this but if we do we know we're not out of the deep water yet. Perhaps we can wait with this patch until the others are merged?
-Patrik
Quoted 75 lines · Mika Kuoppala
Quoted 73 lines
Quoted 5 lines · Patrik Jakobsson
The DMC can incorrectly run off and allow DC states on it's own. We don't know the root-cause for this yet but this patch makes it more visible.
Signed-off-by Patrik Jakobsson <[email protected]>Yes, we definitely need much more state checking and hardening in this area.
Reviewed-by Mika Kuoppala <[email protected]>Quoted 59 lines
--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_csr.c | 2 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 8 ++++++++ 3 files changed, 11 insertions(+)drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -746,6 +746,7 @@ struct intel_csr {uint32_t mmio_count;i915_reg_t mmioaddr[8 ];uint32_t mmiodata[8 ]; +uint32_t dc_state; };#define DEV_INFO_FOR_EACH_FLAG (func, sep) \drivers/gpu/drm/i915/intel_csr.c +2
-0@@ -243,6 +243,8 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv) I915_WRITE(dev_priv->csr.mmioaddr[i], dev_priv->csr.mmiodata[i]); } + + dev_priv->csr.dc_state =0 ; }static
uint32_t*parse_csr_fw(structdrm_i915_private*dev_priv,drivers/gpu/drm/i915/intel_runtime_pm.c +8
-0@@ -494,10 +494,18 @@ static void gen9_set_dc_state(struct drm_i915_private *dev_priv, uint32_t state) val =I915_READ (DC_STATE_EN );DRM_DEBUG_KMS ("Setting DC state from %02x to %02x\n" , val & mask, state); + +/* Check if DMC is ignoring our DC state requests */ +if ((val & mask) != dev_priv->csr.dc_state) +DRM_ERROR ("DC state mismatch (0x%x -> 0x%x)\n" , + dev_priv->csr.dc_state, val & mask); + val &= ~mask; val |= state;I915_WRITE (DC_STATE_EN , val);POSTING_READ (DC_STATE_EN ); + + dev_priv->csr.dc_state = val & mask; }void
bxt_enable_dc9(struct drm_i915_private *dev_priv)
Signature · 6 lines
--- Intel Sweden AB Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · Patrik Jakobsson
Quoted 3 lines · Rodrigo
I was going to merge here but I saw on patchwork we got some warnings so I'm not sure they are only false positives or this is exactly what this patches wants...
Quoted 7 lines
They are unfortunately not false positives. The question is if it's ok to clutter CI results with known errors or not? Together with Mika's and Imre's patches we shouldn't be seeing this but if we do we know we're not out of the deep water yet. Perhaps we can wait with this patch until the others are merged?
-Patrik
I just tested Mika's tree (with all the required patches included) and I see no "DC state mismatch" errors. If we wait with this one until they are merged we wont unnecessarily clutter CI.
Quoted 75 lines
Quoted 75 lines · Mika Kuoppala
Quoted 72 lines
Quoted 5 lines · Patrik Jakobsson
The DMC can incorrectly run off and allow DC states on it's own. We don't know the root-cause for this yet but this patch makes it more visible.
Signed-off-by Patrik Jakobsson <[email protected]>Yes, we definitely need much more state checking and hardening in this area.
Reviewed-by Mika Kuoppala <[email protected]>Quoted 58 lines
--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_csr.c | 2 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 8 ++++++++ 3 files changed, 11 insertions(+)drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -746,6 +746,7 @@ struct intel_csr {uint32_t mmio_count;i915_reg_t mmioaddr[8 ];uint32_t mmiodata[8 ]; +uint32_t dc_state; };#define DEV_INFO_FOR_EACH_FLAG (func, sep) \drivers/gpu/drm/i915/intel_csr.c +2
-0@@ -243,6 +243,8 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv) I915_WRITE(dev_priv->csr.mmioaddr[i], dev_priv->csr.mmiodata[i]); } + + dev_priv->csr.dc_state =0 ; }static
uint32_t*parse_csr_fw(structdrm_i915_private*dev_priv,drivers/gpu/drm/i915/intel_runtime_pm.c +8
-0@@ -494,10 +494,18 @@ static void gen9_set_dc_state(struct drm_i915_private *dev_priv, uint32_t state) val =I915_READ (DC_STATE_EN );DRM_DEBUG_KMS ("Setting DC state from %02x to %02x\n" , val & mask, state); + +/* Check if DMC is ignoring our DC state requests */ +if ((val & mask) != dev_priv->csr.dc_state) +DRM_ERROR ("DC state mismatch (0x%x -> 0x%x)\n" , + dev_priv->csr.dc_state, val & mask); + val &= ~mask; val |= state;I915_WRITE (DC_STATE_EN , val);POSTING_READ (DC_STATE_EN ); + + dev_priv->csr.dc_state = val & mask; }
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
void
bxt_enable_dc9(struct drm_i915_private *dev_priv)--
---
Intel Sweden AB Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915/gen9: Check for DC state mismatch
In reply to Patrik Jakobsson== Summary ==
== Summary ==
Series 3276v1 drm/i915/gen9: Check for DC state mismatch
http://patchwork.freedesktop.org/api/1.0/series/3276/revisions/1/mbox/
Test drv_module_reload_basic:
pass -> DMESG-WARN (ilk-hp8440p)
Test gem_mmap_gtt:
Subgroup basic-small-copy:
pass -> DMESG-WARN (ilk-hp8440p)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (skl-i5k-2)
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (skl-i5k-2)
Subgroup suspend-read-crc-pipe-c:
pass -> SKIP (hsw-gt2)
Test pm_rpm:
Subgroup basic-pci-d3-state:
fail -> PASS (bdw-nuci7)bdw-nuci7 total:162 pass:152 dwarn:0 dfail:0 fail:0 skip:10 bdw-ultra total:165 pass:152 dwarn:0 dfail:0 fail:0 skip:13 bsw-nuc-2 total:165 pass:134 dwarn:2 dfail:0 fail:0 skip:29 byt-nuc total:165 pass:141 dwarn:0 dfail:0 fail:0 skip:24 hsw-brixbox total:165 pass:151 dwarn:0 dfail:0 fail:0 skip:14 hsw-gt2 total:165 pass:153 dwarn:0 dfail:0 fail:1 skip:11 ilk-hp8440p total:165 pass:114 dwarn:2 dfail:0 fail:1 skip:48 ivb-t430s total:165 pass:150 dwarn:0 dfail:0 fail:1 skip:14 skl-i5k-2 total:165 pass:149 dwarn:1 dfail:0 fail:0 skip:15 snb-dellxps total:165 pass:142 dwarn:0 dfail:0 fail:1 skip:22 snb-x220t total:165 pass:142 dwarn:0 dfail:0 fail:2 skip:21
Results at /archive/results/CI_IGT_test/Patchwork_1393/
f2110d8eac120416f8f5669f2aa561d9ab330a77 drm-intel-nightly: 2016y-02m-15d-09h-53m-04s UTC integration manifest 6bbe421b1a4cf2afe5519bf2ad297436c04144f0 drm/i915/gen9: Check for DC state mismatch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx