[i-g-t 4/7] tests/intel/kms_frontbuffer_tracking: Do modeset in init
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Wed Dec 27 05:55:53 UTC 2023
Make sure to do a modeset before checking the feature availability
on selected pipe/output. To achieve this we need to fix the logic
to iterate all possible pipe/output combos, otherwise we'll endup
with the error: 'Failed assertion: output->pending_pipe != b->pending_pipe'
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/intel/kms_frontbuffer_tracking.c | 37 +++++++++++++++-----------
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/tests/intel/kms_frontbuffer_tracking.c b/tests/intel/kms_frontbuffer_tracking.c
index 8599286a8..1b9a8ff1e 100644
--- a/tests/intel/kms_frontbuffer_tracking.c
+++ b/tests/intel/kms_frontbuffer_tracking.c
@@ -1527,31 +1527,34 @@ static bool find_connector(bool edp_only, bool pipe_a,
igt_output_t *output;
enum pipe pipe;
- for_each_pipe_with_valid_output(&drm.display, pipe, output) {
+ for_each_connected_output(&drm.display, output) {
drmModeConnectorPtr c = output->config.connector;
if (edp_only && c->connector_type != DRM_MODE_CONNECTOR_eDP)
continue;
- if (pipe_a && pipe != PIPE_A)
+ if (c->connector_type == DRM_MODE_CONNECTOR_eDP && opt.no_edp)
continue;
- if (output == forbidden_output || pipe == forbidden_pipe) {
- igt_output_set_pipe(output, pipe);
- igt_output_override_mode(output, connector_get_mode(output));
-
+ if (output->pending_pipe != PIPE_NONE)
continue;
- }
- if (c->connector_type == DRM_MODE_CONNECTOR_eDP && opt.no_edp)
- continue;
+ for_each_pipe(&drm.display, pipe) {
+ if (pipe_a && pipe != PIPE_A)
+ continue;
+
+ if (pipe == forbidden_pipe)
+ continue;
- igt_output_set_pipe(output, pipe);
- igt_output_override_mode(output, connector_get_mode(output));
- if (intel_pipe_output_combo_valid(&drm.display)) {
- *ret_output = output;
- *ret_pipe = pipe;
- return true;
+ igt_output_set_pipe(output, pipe);
+ igt_output_override_mode(output, connector_get_mode(output));
+
+ if (intel_pipe_output_combo_valid(&drm.display)) {
+ *ret_output = output;
+ *ret_pipe = pipe;
+ return true;
+ }
+ igt_output_set_pipe(output, PIPE_NONE);
}
}
@@ -1590,10 +1593,14 @@ static bool init_modeset_cached_params(void)
if (!scnd_output) {
scnd_mode_params.pipe = PIPE_NONE;
scnd_mode_params.output = NULL;
+ igt_display_commit(&drm.display);
+
return true;
}
init_mode_params(&scnd_mode_params, scnd_output, scnd_pipe);
+ igt_display_commit(&drm.display);
+
return true;
}
--
2.40.0
More information about the Intel-gfx-trybot
mailing list