summaryrefslogtreecommitdiff
path: root/lib/igt_debugfs.h
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2016-09-08 09:31:09 +0200
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2016-12-14 11:47:05 +0100
commita56a1f6e30ca49a50d4e8c896608ba605ee1f2fd (patch)
treef5d3077dbe8b02abff19d74e0b1310b2ae65107f /lib/igt_debugfs.h
parent40769d7925d9b28cc7e71564e2378aebf20efbf8 (diff)
lib/debugfs: Support new generic ABI for CRC capture
The kernel has now a new debugfs ABI that can also allow capturing frame CRCs for drivers other than i915. Add alternative codepaths so the new ABI is used if the kernel is recent enough, and fall back to the legacy ABI if not. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
Diffstat (limited to 'lib/igt_debugfs.h')
-rw-r--r--lib/igt_debugfs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index fb189322..4c6572cd 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -62,6 +62,7 @@ bool igt_debugfs_search(const char *filename, const char *substring);
*/
typedef struct _igt_pipe_crc igt_pipe_crc_t;
+#define DRM_MAX_CRC_NR 10
/**
* igt_crc_t:
* @frame: frame number of the capture CRC
@@ -73,8 +74,9 @@ typedef struct _igt_pipe_crc igt_pipe_crc_t;
*/
typedef struct {
uint32_t frame;
+ bool has_valid_frame;
int n_words;
- uint32_t crc[5];
+ uint32_t crc[DRM_MAX_CRC_NR];
} igt_crc_t;
/**