drm/i915: Add ERR_INT to gen7 error state
Subsystems (2)
PATCH 1/2 drm/i915: Add ERR_INT to gen7 error state
ERR_INT can generate interrupts. However since most of the conditions seem quite fatal the patch opts to simply report it in error state instead of adding more complexity to the interrupt handler for little gain (the bits are sticky anyway).
--- drivers/gpu/drm/i915/i915_debugfs.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_irq.c | 3 +++ drivers/gpu/drm/i915/i915_reg.h | 1 + 4 files changed, 8 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +3 -0
@@ -702,6 +702,9 @@ static int i915_error_state(struct seq_file *m, void *unused)seq_printf (m,"DONE_REG: 0x%08x\n" , error->done_reg); } +if (INTEL_INFO (dev)->gen ==7 ) +seq_printf (m,"ERR_INT: 0x%08x\n" , error->err_int); +for_each_ring (ring, dev_priv, i)i915_ring_error_state (m, dev, error, i);
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -196,6 +196,7 @@ struct drm_i915_error_state {u32 cpu_ring_head[I915_NUM_RINGS ];u32 cpu_ring_tail[I915_NUM_RINGS ];u32 error;/* gen6+ */ +u32 err_int;/* gen7 */ u32 instpm[I915_NUM_RINGS ];u32 instps[I915_NUM_RINGS ];u32 instdone1;
drivers/gpu/drm/i915/i915_irq.c +3 -0
@@ -1211,6 +1211,9 @@ static void i915_capture_error_state(struct drm_device *dev) error->done_reg =I915_READ (DONE_REG ); } +if (INTEL_INFO (dev)->gen ==7 ) + error->err_int =I915_READ (GEN7_ERR_INT ); +i915_gem_record_fences (dev, error);i915_gem_record_rings (dev, error);
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -507,6 +507,7 @@#define DMA_FADD_I8XX 0x020d0#define ERROR_GEN6 0x040a0 +#define GEN7_ERR_INT 0x44040/* GM45+ chicken bits -- debug workaround bits that may be required * for various sorts of correct behavior. The top 16 bits of each are
Signature · 1 line
1.7.11.5
PATCH 2/2 drm/i915: Find unclaimed MMIO writes.
ERR_INT on HSW will display unclaimed MMIO accesses. This can be either the result of a driver bug writing to an invalid addresses, or the result of RC6.
--- drivers/gpu/drm/i915/i915_drv.c | 4 ++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 5 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +4 -0
@@ -1182,6 +1182,10 @@ void i915_write##x(struct drm_i915_private *dev_priv, u32 reg, u##x val) { \if (unlikely (__fifo_ret)) { \gen6_gt_check_fifodbg (dev_priv); \ } \ +if (IS_HASWELL (dev_priv->dev) && (I915_READ_NOTRACE (GEN7_ERR_INT ) &ERR_INT_MMIO_UNCLAIMED )) { \ +DRM_ERROR ("Unclaimed write to %x\n" , reg); \ +writel (ERR_INT_MMIO_UNCLAIMED , dev_priv->regs +GEN7_ERR_INT ); \ + } \ } __i915_write(8, b)__i915_write (16 , w)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -508,6 +508,7 @@#define ERROR_GEN6 0x040a0#define GEN7_ERR_INT 0x44040 +#define ERR_INT_MMIO_UNCLAIMED (1<<13)/* GM45+ chicken bits -- debug workaround bits that may be required * for various sorts of correct behavior. The top 16 bits of each are
Signature · 1 line
1.7.11.5
Re: [PATCH 2/2] drm/i915: Find unclaimed MMIO writes.
2012/8/20 Ben Widawsky <[email protected]>:
Quoted 5 lines
ERR_INTon HSW will display unclaimed MMIO accesses. This can be either the result of a driver bug writing to an invalid addresses, or the result of RC6.Signed-off-by Ben Widawsky <[email protected]>
For both patches:
This is a pretty awesome change! It will really help the new hardware enablement/debugging efforts.
We should volunteer someone to look at the other ERR_INT bits.
Quoted 39 lines
--- drivers/gpu/drm/i915/i915_drv.c | 4 ++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 5 insertions(+)drivers/gpu/drm/i915/i915_drv.c +4
-0@@ -1182,6 +1182,10 @@ void i915_write##x(struct drm_i915_private *dev_priv, u32 reg, u##x val) { \if (unlikely (__fifo_ret)) { \gen6_gt_check_fifodbg (dev_priv); \ } \ +if (IS_HASWELL (dev_priv->dev) && (I915_READ_NOTRACE (GEN7_ERR_INT ) &ERR_INT_MMIO_UNCLAIMED )) { \ +DRM_ERROR ("Unclaimed write to %x\n" , reg); \ +writel (ERR_INT_MMIO_UNCLAIMED , dev_priv->regs +GEN7_ERR_INT ); \ + } \ } __i915_write(8, b)__i915_write (16 , w)drivers/gpu/drm/i915/i915_reg.h +1
-1@@ -508,6 +508,7 @@#define ERROR_GEN6 0x040a0#define GEN7_ERR_INT 0x44040 +#define ERR_INT_MMIO_UNCLAIMED (1<<13)/* GM45+ chicken bits -- debug workaround bits that may be required * for various sorts of correct behavior. The top 16 bits of each are -- 1.7.11.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Paulo Zanoni
Re: [PATCH 2/2] drm/i915: Find unclaimed MMIO writes.
Quoted 7 lines · Paulo Zanoni
2012/8/20 Ben Widawsky <[email protected]>:
Quoted 5 lines
ERR_INTon HSW will display unclaimed MMIO accesses. This can be either the result of a driver bug writing to an invalid addresses, or the result of RC6.Signed-off-by Ben Widawsky <[email protected]>
Quoted 8 lines
For both patches:
Reviewed-by Paulo Zanoni <[email protected]>Tested-by Paulo Zanoni <[email protected]>This is a pretty awesome change! It will really help the new hardware enablement/debugging efforts.
We should volunteer someone to look at the other
ERR_INTbits.
Consider yourself volunteered :-)
In all seriousness, I did look at the others. Nothing was as useful as this one, IMO. There were a bunch of display related ones which I'm fortunate enough to not have to fully understand. Having it in the error state though over time might prove otherwise.
Quoted 44 lines
Quoted 44 lines
--- drivers/gpu/drm/i915/i915_drv.c | 4 ++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 5 insertions(+)drivers/gpu/drm/i915/i915_drv.c +4
-0@@ -1182,6 +1182,10 @@ void i915_write##x(struct drm_i915_private *dev_priv, u32 reg, u##x val) { \ if (unlikely(__fifo_ret)) { \ gen6_gt_check_fifodbg(dev_priv); \ } \ + if (IS_HASWELL(dev_priv->dev) && (I915_READ_NOTRACE(GEN7_ERR_INT) & ERR_INT_MMIO_UNCLAIMED)) { \ +DRM_ERROR ("Unclaimed write to %x\n" , reg); \ +writel (ERR_INT_MMIO_UNCLAIMED , dev_priv->regs +GEN7_ERR_INT ); \ + } \}
__i915_write(8, b)
__i915_write(16, w)drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -508,6 +508,7 @@#define ERROR_GEN6 0x040a0#define GEN7_ERR_INT 0x44040 +#define ERR_INT_MMIO_UNCLAIMED (1<<13)/* GM45+ chicken bits -- debug workaround bits that may be required * for various sorts of correct behavior. The top 16 bits of each are
--
1.7.11.5_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
Re: [PATCH 2/2] drm/i915: Find unclaimed MMIO writes.
In reply to Ben WidawskyQuoted 5 lines · Ben Widawsky
ERR_INTon HSW will display unclaimed MMIO accesses. This can be either the result of a driver bug writing to an invalid addresses, or the result of RC6.Signed-off-by Ben Widawsky <[email protected]>
Both patches queued for -next, thanks.
-Daniel
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48
Both patches look ok.
Quoted 65 lines · Ben Widawsky
ERR_INTcan generate interrupts. However since most of the conditions seem quite fatal the patch opts to simply report it in error state instead of adding more complexity to the interrupt handler for little gain (the bits are sticky anyway).Signed-off-by Ben Widawsky <[email protected]>--- drivers/gpu/drm/i915/i915_debugfs.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_irq.c | 3 +++ drivers/gpu/drm/i915/i915_reg.h | 1 + 4 files changed, 8 insertions(+)drivers/gpu/drm/i915/i915_debugfs.c +3
-0@@ -702,6 +702,9 @@ static int i915_error_state(struct seq_file *m, void *unused)seq_printf (m,"DONE_REG: 0x%08x\n" , error->done_reg); } +if (INTEL_INFO (dev)->gen ==7 ) +seq_printf (m,"ERR_INT: 0x%08x\n" , error->err_int); +for_each_ring (ring, dev_priv, i)i915_ring_error_state (m, dev, error, i);drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -196,6 +196,7 @@ struct drm_i915_error_state {u32 cpu_ring_head[I915_NUM_RINGS ];u32 cpu_ring_tail[I915_NUM_RINGS ];u32 error;/* gen6+ */ +u32 err_int;/* gen7 */ u32 instpm[I915_NUM_RINGS ];u32 instps[I915_NUM_RINGS ];u32 instdone1;drivers/gpu/drm/i915/i915_irq.c +3
-0@@ -1211,6 +1211,9 @@ static void i915_capture_error_state(struct drm_device *dev) error->done_reg =I915_READ (DONE_REG ); } +if (INTEL_INFO (dev)->gen ==7 ) + error->err_int =I915_READ (GEN7_ERR_INT ); +i915_gem_record_fences (dev, error);i915_gem_record_rings (dev, error);drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -507,6 +507,7 @@#define DMA_FADD_I8XX 0x020d0#define ERROR_GEN6 0x040a0 +#define GEN7_ERR_INT 0x44040/* GM45+ chicken bits -- debug workaround bits that may be required * for various sorts of correct behavior. The top 16 bits of each are