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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
---
 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 f9e32a5a2e3d..f1ada2850707 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -848,9 +848,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 b66743a29027..4b15528c2858 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -112,7 +112,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);
 
 		}
 	}
-- 
2.5.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux