[Intel-gfx] [i-g-t PATCH v1 2/2] tests/kms_setmode: Remove superfluous call to kmstest_get_pipe_from_crtc_id

Tomeu Vizoso tomeu.vizoso at collabora.com
Tue Apr 19 11:40:28 UTC 2016


connector_config.crtc_idx already contains the pipe ID, so just use that
and drop the call to kmstest_get_pipe_from_crtc_id which is problematic
on drivers other than i915 because it uses
DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
danvet
---

 tests/kms_setmode.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 24fb34ca0006..34f27c66d79e 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -89,7 +89,6 @@ struct connector_config {
 struct crtc_config {
 	int crtc_idx;
 	int crtc_id;
-	int pipe_id;
 	int connector_count;
 	struct connector_config *cconfs;
 	struct igt_fb fb_info;
@@ -241,7 +240,7 @@ static void get_crtc_config_str(struct crtc_config *crtc, char *buf,
 
 	pos = snprintf(buf, buf_size,
 		       "CRTC[%d] [Pipe %s] Mode: %s@%dHz Connectors: ",
-		       crtc->crtc_id, kmstest_pipe_name(crtc->pipe_id),
+		       crtc->crtc_id, kmstest_pipe_name(crtc->crtc_idx),
 		       crtc->mode.name, crtc->mode.vrefresh);
 	if (pos > buf_size)
 		return;
@@ -285,8 +284,6 @@ static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf,
 					  resources->crtcs[crtc->crtc_idx]);
 		crtc->crtc_id = drm_crtc->crtc_id;
 		drmModeFreeCrtc(drm_crtc);
-		crtc->pipe_id = kmstest_get_pipe_from_crtc_id(drm_fd,
-							      crtc->crtc_id);
 
 		crtc->connector_count = 1;
 		for (j = i + 1; j < connector_count; j++)
-- 
2.5.5



More information about the Intel-gfx mailing list