[PATCH i-g-t v2 01/15] igt_kms: Remove kmstest_connector_config.crtc_idx

Maarten Lankhorst
2016-07-06T09:56:02Z

This is the same as using config.pipe because the order of crtcs will
never change.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
lib/igt_kms.c | 4 +---
lib/igt_kms.h | 1 -
tests/testdisplay.c | 4 +---
3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 8f9ac2da43ff..c16e40ea273b 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -854,9 +854,7 @@ static bool _kmstest_connector_config(int drm_fd, uint32_t connector_id,
config->connector = connector;
config->encoder = found;
config->crtc = drmModeGetCrtc(drm_fd, resources->crtcs[pipe]);
- config->crtc_idx = pipe;
- config->pipe = kmstest_get_pipe_from_crtc_id(drm_fd,
- config->crtc->crtc_id);
+ config->pipe = pipe;

drmModeFreeResources(resources);

diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 829615d70874..4882075430c8 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -118,7 +118,6 @@ struct kmstest_connector_config {
bool connector_dpms_changed;
uint32_t atomic_props_crtc[IGT_NUM_CRTC_PROPS];
uint32_t atomic_props_connector[IGT_NUM_CONNECTOR_PROPS];
- int crtc_idx;
int pipe;
unsigned valid_crtc_idx_mask;
};
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 45280e4cad82..a974f42be9f1 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -112,7 +112,6 @@ struct connector {
drmModeEncoder *encoder;
drmModeConnector *connector;
int crtc;
- int crtc_idx;
int pipe;
};

@@ -211,7 +210,6 @@ static void connector_find_preferred_mode(uint32_t connector_id,
c->connector = config.connector;
c->encoder = config.encoder;
c->crtc = config.crtc->crtc_id;
- c->crtc_idx = config.crtc_idx;
c->pipe = config.pipe;

if (mode_num != -1) {
@@ -497,7 +495,7 @@ int update_display(bool probe)

if (test_preferred_mode || force_mode ||
specified_mode_num != -1)
- crtc_idx_mask &= ~(1 << connector->crtc_idx);
+ crtc_idx_mask &= ~(1 << connector->pipe);

}
}