[Intel-gfx] [PATCH 4/5] lib/igt_debugfs: drop drm_fd argument from igt_pipe_crc_new
Daniel Vetter
daniel.vetter at ffwll.ch
Wed Mar 12 21:00:02 CET 2014
It's nowhere used and removing it gives us a cleaner, more
orthogonal interface.
---
lib/igt_debugfs.c | 5 +----
lib/igt_debugfs.h | 2 +-
tests/kms_cursor_crc.c | 2 +-
tests/kms_fbc_crc.c | 2 +-
tests/kms_pipe_crc_basic.c | 2 +-
tests/kms_plane.c | 2 +-
6 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 9c4c989c5437..131dccc0349d 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -136,8 +136,6 @@ char *igt_crc_to_string(igt_crc_t *crc)
#define PIPE_CRC_BUFFER_LEN (PIPE_CRC_LINE_LEN + 1)
struct _igt_pipe_crc {
- int drm_fd;
-
int ctl_fd;
int crc_fd;
int line_len;
@@ -226,7 +224,7 @@ void igt_pipe_crc_check(igt_debugfs_t *debugfs)
}
igt_pipe_crc_t *
-igt_pipe_crc_new(igt_debugfs_t *debugfs, int drm_fd, enum pipe pipe,
+igt_pipe_crc_new(igt_debugfs_t *debugfs, enum pipe pipe,
enum intel_pipe_crc_source source)
{
igt_pipe_crc_t *pipe_crc;
@@ -246,7 +244,6 @@ igt_pipe_crc_new(igt_debugfs_t *debugfs, int drm_fd, enum pipe pipe,
pipe_crc->line_len = PIPE_CRC_LINE_LEN;
pipe_crc->buffer_len = PIPE_CRC_BUFFER_LEN;
- pipe_crc->drm_fd = drm_fd;
pipe_crc->pipe = pipe;
pipe_crc->source = source;
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index 5f940cb23e57..04ac2dc5f5b3 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -72,7 +72,7 @@ char *igt_crc_to_string(igt_crc_t *crc);
void igt_pipe_crc_check(igt_debugfs_t *debugfs);
igt_pipe_crc_t *
-igt_pipe_crc_new(igt_debugfs_t *debugfs, int drm_fd, enum pipe pipe,
+igt_pipe_crc_new(igt_debugfs_t *debugfs, enum pipe pipe,
enum intel_pipe_crc_source source);
void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc);
void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc);
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index f98fbdb5aa3e..0b38a7ce7406 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -63,7 +63,7 @@ static igt_pipe_crc_t *create_crc(data_t *data, enum pipe pipe)
{
igt_pipe_crc_t *crc;
- crc = igt_pipe_crc_new(&data->debugfs, data->drm_fd, pipe,
+ crc = igt_pipe_crc_new(&data->debugfs, pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);
return crc;
}
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index 4d4473e2b939..edcba7a28670 100644
--- a/tests/kms_fbc_crc.c
+++ b/tests/kms_fbc_crc.c
@@ -352,7 +352,7 @@ static bool prepare_crtc(data_t *data, uint32_t connector_id, enum test_mode mod
data->pipe_crc[data->crtc_idx] = NULL;
pipe_crc = igt_pipe_crc_new(&data->debugfs,
- data->drm_fd, data->crtc_idx,
+ data->crtc_idx,
INTEL_PIPE_CRC_SOURCE_AUTO);
if (!pipe_crc) {
printf("auto crc not supported on this connector with crtc %i\n",
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 2b46ef30ca43..8523b5341c5e 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -88,7 +88,7 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags)
igt_display_commit(display);
- pipe_crc = igt_pipe_crc_new(&data->debugfs, data->drm_fd,
+ pipe_crc = igt_pipe_crc_new(&data->debugfs,
pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
if (!pipe_crc)
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 2371f9a1f86f..6c7275a8eb3c 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -92,7 +92,7 @@ test_position_init(test_position_t *test, igt_output_t *output, enum pipe pipe)
drmModeModeInfo *mode;
igt_plane_t *primary;
- test->pipe_crc = igt_pipe_crc_new(&data->debugfs, data->drm_fd,
+ test->pipe_crc = igt_pipe_crc_new(&data->debugfs,
pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
igt_output_set_pipe(output, pipe);
--
1.8.5.2
More information about the Intel-gfx
mailing list