drm/i915: Keep the CRC values into a circular buffer
There are a few good properties to a circular buffer, for instance it
has a number of entries (before we were always dumping the full buffer).
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index bfaaaae..a29a4a1 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1230,11 +1230,11 @@
uint32_t crc[5];
};
-#define INTEL_PIPE_CRC_ENTRIES_NR 200
+#define INTEL_PIPE_CRC_ENTRIES_NR 128
struct intel_pipe_crc {
struct intel_pipe_crc_entry entries[INTEL_PIPE_CRC_ENTRIES_NR];
enum intel_pipe_crc_source source;
- atomic_t slot;
+ atomic_t head, tail;
};
typedef struct drm_i915_private {