drm/i915: Warning when reads or writes are dropped
Subsystems (2)
RFC PATCH 1/1 drm/i915: Warning when reads or writes are dropped
The GTFIFODBG register gives us 3 error types when the fifo is accessed and full. Whenever we do a forcewake_put we can check this register to see if any of the CPU related errors occurred.
Of more interest is perhaps the bit I am not checking which tells when some other part of the chip makes a request and the FIFO is full. I couldn't really decide on a good place to put that check.
This patch seems to have value to me, but I'm not sure it's worth the cost of the extra MMIO read`. (I've yet to see this occur, but I haven't actually been running with it for very long).
--- drivers/gpu/drm/i915/i915_drv.c | 6 ++++++ drivers/gpu/drm/i915/i915_reg.h | 6 ++++++ 2 files changed, 12 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +6 -0
@@ -360,6 +360,12 @@ void gen6_gt_force_wake_get(struct drm_i915_private *dev_priv)static void __gen6_gt_force_wake_put (struct drm_i915_private *dev_priv) { +u32 gtfifodbg =I915_READ (GTFIFODBG ); +if (gtfifodbg >_FIFO_CPU_ERROR_MASK ) { +DRM_ERROR ("MMIO read or write has been dropped %x\n" , + gtfifodbg); +I915_WRITE (GTFIFODBG , gtfifodbg >_FIFO_CPU_ERROR_MASK ); + }I915_WRITE_NOTRACE (FORCEWAKE ,0 );POSTING_READ (FORCEWAKE ); }
drivers/gpu/drm/i915/i915_reg.h +6 -0
@@ -3441,6 +3441,12 @@#define FORCEWAKE 0xA18C#define FORCEWAKE_ACK 0x130090 +#define GTFIFODBG 0x120000 +#define GT_FIFO_OVFERR (1<<2) +#define GT_FIFO_CPU_ERROR_MASK 3 +#define GT_FIFO_IAWRERR (1<<1) +#define GT_FIFO_IARDERR (1<<0) +#define GT_FIFO_FREE_ENTRIES 0x120008#define GT_FIFO_NUM_RESERVED_ENTRIES 20
Signature · 1 line
1.7.7.2
Quoted 4 lines · Ben Widawsky
The GTFIFODBG register gives us 3 error types when the fifo is accessed and full. Whenever we do a
forcewake_putwe can check this register to see if any of the CPU related errors occurred.
Quoted 8 lines
Of more interest is perhaps the bit I am not checking which tells when some other part of the chip makes a request and the FIFO is full. I couldn't really decide on a good place to put that check.
This patch seems to have value to me, but I'm not sure it's worth the cost of the extra MMIO read`. (I've yet to see this occur, but I haven't actually been running with it for very long).
This looks like a nice little patch here. Care to update it for spinlocked and multithreaded forcewake and maybe also check the other errors? And also add it to the error_state output (just base it on top of danvet/my-next to avoid conflicts with the oustanding error_state cleanup).
Thanks, Daniel
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48
Quoted 14 lines · Daniel Vetter
Quoted 4 lines · Ben Widawsky
The GTFIFODBG register gives us 3 error types when the fifo is accessed and full. Whenever we do a
forcewake_putwe can check this register to see if any of the CPU related errors occurred.Quoted 8 lines
Of more interest is perhaps the bit I am not checking which tells when some other part of the chip makes a request and the FIFO is full. I couldn't really decide on a good place to put that check.
This patch seems to have value to me, but I'm not sure it's worth the cost of the extra MMIO read`. (I've yet to see this occur, but I haven't actually been running with it for very long).
Quoted 5 lines
This looks like a nice little patch here. Care to update it for spinlocked and multithreaded forcewake and maybe also check the other errors? And also add it to the
error_stateoutput (just base it on top of danvet/my-next to avoid conflicts with the oustandingerror_statecleanup).
The advantage of placing the warning in _put is that we could identify the sequence of register writes that trigger the error, so a stack trace would be more useful i.e. a WARN instead.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre