[i-g-t 3/6] tests/intel/kms_frontbuffer_tracking: Do modeset in init
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Tue Dec 26 12:59:17 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 | 40 ++++++++++++++------------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/tests/intel/kms_frontbuffer_tracking.c b/tests/intel/kms_frontbuffer_tracking.c
index 8599286a8..cfe9ef9d1 100644
--- a/tests/intel/kms_frontbuffer_tracking.c
+++ b/tests/intel/kms_frontbuffer_tracking.c
@@ -1527,31 +1527,31 @@ 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) {
- drmModeConnectorPtr c = output->config.connector;
+ for_each_pipe(&drm.display, pipe) {
+ for_each_valid_output_on_pipe(&drm.display, pipe, output) {
+ drmModeConnectorPtr c = output->config.connector;
- if (edp_only && c->connector_type != DRM_MODE_CONNECTOR_eDP)
- continue;
+ if (edp_only && c->connector_type != DRM_MODE_CONNECTOR_eDP)
+ continue;
- if (pipe_a && pipe != PIPE_A)
- continue;
+ if (pipe_a && pipe != PIPE_A)
+ 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;
- continue;
- }
+ if (c->connector_type == DRM_MODE_CONNECTOR_eDP && opt.no_edp)
+ continue;
- if (c->connector_type == DRM_MODE_CONNECTOR_eDP && opt.no_edp)
- continue;
+ igt_output_set_pipe(output, pipe);
+ igt_output_override_mode(output, connector_get_mode(output));
- 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;
+ if (intel_pipe_output_combo_valid(&drm.display)) {
+ *ret_output = output;
+ *ret_pipe = pipe;
+ return true;
+ }
+ igt_output_set_pipe(output, PIPE_NONE);
}
}
@@ -2403,6 +2403,8 @@ static void teardown_drm(void)
static void setup_modeset(void)
{
igt_require(init_modeset_cached_params());
+ igt_display_commit(&drm.display);
+
offscreen_fb.fb = NULL;
offscreen_fb.w = 1024;
offscreen_fb.h = 1024;
--
2.40.0
More information about the Intel-gfx-trybot
mailing list