From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 2/2] tests/chamelium: Remove reliance on output->config.pipe
Date: Thu, 12 Oct 2017 13:41:29 +0200 [thread overview]
Message-ID: <20171012114129.1883-2-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20171012114129.1883-1-maarten.lankhorst@linux.intel.com>
IGT has an api that can find a matching pipe for a given connector,
so use that.
igt_output_override_mode already forces a modeset on an affected pipe
since an earlier commit, so the second call to igt_output_set_pipe
can be removed.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
tests/chamelium.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/tests/chamelium.c b/tests/chamelium.c
index ae164920e86e..c236d25fa798 100644
--- a/tests/chamelium.c
+++ b/tests/chamelium.c
@@ -416,6 +416,8 @@ prepare_output(data_t *data,
drmModeRes *res;
drmModeConnector *connector =
chamelium_port_get_connector(data->chamelium, port, false);
+ enum pipe pipe;
+ bool found = false;
igt_assert(res = drmModeGetResources(data->drm_fd));
kmstest_unset_all_crtcs(data->drm_fd, res);
@@ -433,7 +435,18 @@ prepare_output(data_t *data,
igt_assert(kmstest_probe_connector_config(
data->drm_fd, connector->connector_id, ~0, &output->config));
- igt_output_set_pipe(output, output->config.pipe);
+
+ for_each_pipe(display, pipe) {
+ if (!igt_pipe_connector_valid(pipe, output))
+ continue;
+
+ found = true;
+ break;
+ }
+
+ igt_assert_f(found, "No pipe found for output %s\n", igt_output_name(output));
+
+ igt_output_set_pipe(output, pipe);
drmModeFreeConnector(connector);
drmModeFreeResources(res);
@@ -459,8 +472,6 @@ enable_output(data_t *data,
igt_plane_set_fb(primary, fb);
igt_output_override_mode(output, mode);
- igt_output_set_pipe(output, output->config.pipe);
-
/* Clear any color correction values that might be enabled */
igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_DEGAMMA_LUT, NULL, 0);
igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_GAMMA_LUT, NULL, 0);
--
2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-12 11:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 10:11 [PATCH i-g-t 00/12] lib/igt_kms: Rewrite property handling to better match atomic Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 01/12] lib/igt_kms: Rework connector properties to be more atomic, v2 Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 02/12] lib/igt_kms: Rework plane properties to be more atomic, v5 Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 03/12] lib/igt_kms: Rework pipe properties to be more atomic, v7 Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 04/12] lib/igt_kms: Allow setting any plane property through the universal path Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 05/12] lib/igt_kms: Allow setting any output property through the !atomic paths Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 06/12] lib/igt_kms: Export property blob functions for output/pipe/plane Maarten Lankhorst
2017-10-12 11:41 ` [PATCH i-g-t 1/2] lib/igt_kms: Export property blob functions for output/pipe/plane, v2 Maarten Lankhorst
2017-10-12 11:41 ` Maarten Lankhorst [this message]
2017-10-11 10:11 ` [PATCH i-g-t 07/12] lib/igt_kms: Unexport broadcast rgb API Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 08/12] lib/igt_kms: Add igt_$obj_has_prop functions Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 09/12] lib/igt_kms: Add igt_$obj_get_prop functions Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 10/12] tests/kms_color: Rework tests slightly to work better with new atomic api Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 11/12] lib/igt_kms: Remove igt_pipe_get_property Maarten Lankhorst
2017-10-11 10:11 ` [PATCH i-g-t 12/12] tests/kms_atomic: Convert/rewrite tests to use igt_kms framework Maarten Lankhorst
2017-10-11 13:49 ` ✗ Fi.CI.BAT: failure for lib/igt_kms: Rewrite property handling to better match atomic Patchwork
2017-10-12 12:08 ` ✓ Fi.CI.BAT: success for lib/igt_kms: Rewrite property handling to better match atomic. (rev3) Patchwork
2017-10-12 13:52 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171012114129.1883-2-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox