[Intel-gfx] [PATCH i-g-t v3 03/13] kms_psr_sink_crc: Use for_each_pipe_with_valid_output to find a valid config, v2.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Jul 26 08:39:51 UTC 2016


This is the only time PIPE_ANY was used to mean something other than
unassign this output from a pipe. Without this PIPE_ANY can be aliased
to PIPE_NONE.

Changes since v1:
- Remove DRM_MODE_CONNECTED check, it's implied.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2 at gmail.com>
---
 tests/kms_psr_sink_crc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index b18e426303e3..8aafedb03614 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -103,15 +103,15 @@ static void setup_output(data_t *data)
 {
 	igt_display_t *display = &data->display;
 	igt_output_t *output;
+	enum pipe pipe;
 
-	for_each_connected_output(display, output) {
+	for_each_pipe_with_valid_output(display, pipe, output) {
 		drmModeConnectorPtr c = output->config.connector;
 
-		if (c->connector_type != DRM_MODE_CONNECTOR_eDP ||
-		    c->connection != DRM_MODE_CONNECTED)
+		if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
 			continue;
 
-		igt_output_set_pipe(output, PIPE_ANY);
+		igt_output_set_pipe(output, pipe);
 		data->crtc_id = output->config.crtc->crtc_id;
 		data->output = output;
 		data->mode = igt_output_get_mode(output);
-- 
2.7.4



More information about the Intel-gfx mailing list