mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 21:02:59 +00:00
debugfs_pipe_crc: Let's check CRCs!
Let's add a new test that sets a mode, wait for a few vblanks (3) and then make sure we read 3 identical CRCs. Some subtests check for various parsing errors. In the process, improve the debugfs helpers to deal with CRCs. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
@@ -25,8 +25,12 @@
|
||||
#ifndef __IGT_DEBUGFS_H__
|
||||
#define __IGT_DEBUGFS_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "igt_display.h"
|
||||
|
||||
typedef struct {
|
||||
char root[128];
|
||||
char dri_path[128];
|
||||
@@ -37,4 +41,37 @@ int igt_debugfs_open(igt_debugfs_t *debugfs, const char *filename, int mode);
|
||||
FILE *igt_debugfs_fopen(igt_debugfs_t *debugfs, const char *filename,
|
||||
const char *mode);
|
||||
|
||||
/*
|
||||
* Pipe CRC
|
||||
*/
|
||||
|
||||
enum intel_pipe_crc_source {
|
||||
INTEL_PIPE_CRC_SOURCE_NONE,
|
||||
INTEL_PIPE_CRC_SOURCE_PLANE1,
|
||||
INTEL_PIPE_CRC_SOURCE_PLANE2,
|
||||
INTEL_PIPE_CRC_SOURCE_PF,
|
||||
INTEL_PIPE_CRC_SOURCE_MAX,
|
||||
};
|
||||
|
||||
typedef struct _igt_pipe_crc igt_pipe_crc_t;
|
||||
typedef struct {
|
||||
uint32_t frame;
|
||||
int n_words;
|
||||
uint32_t crc[5];
|
||||
} igt_crc_t;
|
||||
|
||||
bool igt_crc_is_null(igt_crc_t *crc);
|
||||
bool igt_crc_equal(igt_crc_t *a, igt_crc_t *b);
|
||||
char *igt_crc_to_string(igt_crc_t *crc);
|
||||
|
||||
igt_pipe_crc_t *
|
||||
igt_pipe_crc_new(igt_debugfs_t *debugfs, int drm_fd, enum pipe pipe,
|
||||
enum intel_pipe_crc_source source);
|
||||
void igt_pipe_crc_reset(void);
|
||||
void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc);
|
||||
void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc);
|
||||
void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc);
|
||||
void igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
|
||||
igt_crc_t **out_crcs);
|
||||
|
||||
#endif /* __IGT_DEBUGFS_H__ */
|
||||
|
||||
Reference in New Issue
Block a user