lib/igt_debugfs: Remove debugfs from pipe crc functions

All tests have now lost explicit references to igt_debugfs_t!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2014-03-16 14:49:35 +01:00
parent 9a7609a8e4
commit cc8f0e6e3a
6 changed files with 12 additions and 28 deletions

View File

@ -328,13 +328,12 @@ static void pipe_crc_exit_handler(int sig)
/** /**
* igt_pipe_crc_check: * igt_pipe_crc_check:
* @debugfs: debugfs access structure
* *
* Convenience helper to check whether pipe CRC capturing is supported by the * Convenience helper to check whether pipe CRC capturing is supported by the
* kernel. Uses igt_skip to automatically skip the test/subtest if this isn't * kernel. Uses igt_skip to automatically skip the test/subtest if this isn't
* the case. * the case.
*/ */
void igt_pipe_crc_check(igt_debugfs_t *debugfs) void igt_pipe_crc_check(void)
{ {
const char *cmd = "pipe A none"; const char *cmd = "pipe A none";
FILE *ctl; FILE *ctl;
@ -354,7 +353,6 @@ void igt_pipe_crc_check(igt_debugfs_t *debugfs)
/** /**
* igt_pipe_crc_new: * igt_pipe_crc_new:
* @debugfs: debugfs access structure
* @pipe: display pipe to use as source * @pipe: display pipe to use as source
* @source: CRC tap point to use as source * @source: CRC tap point to use as source
* *
@ -365,8 +363,7 @@ void igt_pipe_crc_check(igt_debugfs_t *debugfs)
* specific pipe CRC source to function properly. * specific pipe CRC source to function properly.
*/ */
igt_pipe_crc_t * igt_pipe_crc_t *
igt_pipe_crc_new(igt_debugfs_t *debugfs, enum pipe pipe, igt_pipe_crc_new(enum pipe pipe, enum intel_pipe_crc_source source)
enum intel_pipe_crc_source source)
{ {
igt_pipe_crc_t *pipe_crc; igt_pipe_crc_t *pipe_crc;
char buf[128]; char buf[128];

View File

@ -100,10 +100,9 @@ bool igt_crc_is_null(igt_crc_t *crc);
bool igt_crc_equal(igt_crc_t *a, igt_crc_t *b); bool igt_crc_equal(igt_crc_t *a, igt_crc_t *b);
char *igt_crc_to_string(igt_crc_t *crc); char *igt_crc_to_string(igt_crc_t *crc);
void igt_pipe_crc_check(igt_debugfs_t *debugfs); void igt_pipe_crc_check(void);
igt_pipe_crc_t * igt_pipe_crc_t *
igt_pipe_crc_new(igt_debugfs_t *debugfs, enum pipe pipe, igt_pipe_crc_new(enum pipe pipe, enum intel_pipe_crc_source source);
enum intel_pipe_crc_source source);
void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc); 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_start(igt_pipe_crc_t *pipe_crc);
void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc); void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc);

View File

@ -42,7 +42,6 @@ enum cursor_type {
typedef struct { typedef struct {
int drm_fd; int drm_fd;
igt_debugfs_t debugfs;
igt_display_t display; igt_display_t display;
struct kmstest_fb primary_fb; struct kmstest_fb primary_fb;
struct kmstest_fb fb[NUM_CURSOR_TYPES]; struct kmstest_fb fb[NUM_CURSOR_TYPES];
@ -63,8 +62,7 @@ static igt_pipe_crc_t *create_crc(data_t *data, enum pipe pipe)
{ {
igt_pipe_crc_t *crc; igt_pipe_crc_t *crc;
crc = igt_pipe_crc_new(&data->debugfs, pipe, crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
INTEL_PIPE_CRC_SOURCE_AUTO);
return crc; return crc;
} }
@ -318,8 +316,7 @@ igt_main
igt_set_vt_graphics_mode(); igt_set_vt_graphics_mode();
igt_debugfs_init(&data.debugfs); igt_pipe_crc_check();
igt_pipe_crc_check(&data.debugfs);
igt_display_init(&data.display, data.drm_fd); igt_display_init(&data.display, data.drm_fd);
data.pipe_crc = calloc(igt_display_get_n_pipes(&data.display), data.pipe_crc = calloc(igt_display_get_n_pipes(&data.display),

View File

@ -56,7 +56,6 @@ typedef struct {
typedef struct { typedef struct {
int drm_fd; int drm_fd;
igt_debugfs_t debugfs;
drmModeRes *resources; drmModeRes *resources;
igt_crc_t ref_crc[2]; igt_crc_t ref_crc[2];
igt_pipe_crc_t **pipe_crc; igt_pipe_crc_t **pipe_crc;
@ -353,8 +352,7 @@ static bool prepare_crtc(data_t *data, uint32_t connector_id, enum test_mode mod
igt_pipe_crc_free(data->pipe_crc[data->crtc_idx]); igt_pipe_crc_free(data->pipe_crc[data->crtc_idx]);
data->pipe_crc[data->crtc_idx] = NULL; data->pipe_crc[data->crtc_idx] = NULL;
pipe_crc = igt_pipe_crc_new(&data->debugfs, pipe_crc = igt_pipe_crc_new(data->crtc_idx,
data->crtc_idx,
INTEL_PIPE_CRC_SOURCE_AUTO); INTEL_PIPE_CRC_SOURCE_AUTO);
if (!pipe_crc) { if (!pipe_crc) {
printf("auto crc not supported on this connector with crtc %i\n", printf("auto crc not supported on this connector with crtc %i\n",
@ -493,8 +491,7 @@ igt_main
data.devid = intel_get_drm_devid(data.drm_fd); data.devid = intel_get_drm_devid(data.drm_fd);
igt_debugfs_init(&data.debugfs); igt_pipe_crc_check();
igt_pipe_crc_check(&data.debugfs);
status = igt_debugfs_fopen("i915_fbc_status", "r"); status = igt_debugfs_fopen("i915_fbc_status", "r");
igt_require_f(status, "No i915_fbc_status found\n"); igt_require_f(status, "No i915_fbc_status found\n");

View File

@ -33,7 +33,6 @@
typedef struct { typedef struct {
int drm_fd; int drm_fd;
igt_debugfs_t debugfs;
igt_display_t display; igt_display_t display;
struct kmstest_fb fb; struct kmstest_fb fb;
} data_t; } data_t;
@ -88,8 +87,7 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags)
igt_display_commit(display); igt_display_commit(display);
pipe_crc = igt_pipe_crc_new(&data->debugfs, pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
if (!pipe_crc) if (!pipe_crc)
continue; continue;
@ -139,8 +137,7 @@ igt_main
igt_set_vt_graphics_mode(); igt_set_vt_graphics_mode();
igt_debugfs_init(&data.debugfs); igt_pipe_crc_check();
igt_pipe_crc_check(&data.debugfs);
igt_display_init(&data.display, data.drm_fd); igt_display_init(&data.display, data.drm_fd);
} }

View File

@ -35,7 +35,6 @@
typedef struct { typedef struct {
int drm_fd; int drm_fd;
igt_debugfs_t debugfs;
igt_display_t display; igt_display_t display;
} data_t; } data_t;
@ -92,8 +91,7 @@ test_position_init(test_position_t *test, igt_output_t *output, enum pipe pipe)
drmModeModeInfo *mode; drmModeModeInfo *mode;
igt_plane_t *primary; igt_plane_t *primary;
test->pipe_crc = igt_pipe_crc_new(&data->debugfs, test->pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
igt_output_set_pipe(output, pipe); igt_output_set_pipe(output, pipe);
primary = igt_output_get_plane(output, 0); primary = igt_output_get_plane(output, 0);
@ -231,8 +229,7 @@ igt_main
igt_set_vt_graphics_mode(); igt_set_vt_graphics_mode();
igt_debugfs_init(&data.debugfs); igt_pipe_crc_check();
igt_pipe_crc_check(&data.debugfs);
igt_display_init(&data.display, data.drm_fd); igt_display_init(&data.display, data.drm_fd);
} }