From a56a1f6e30ca49a50d4e8c896608ba605ee1f2fd Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Thu, 8 Sep 2016 09:31:09 +0200 Subject: 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 Reviewed-by: Robert Foss --- lib/igt_debugfs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/igt_debugfs.h') 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; /** -- cgit v1.2.3