[igt-dev] [PATCH i-g-t 6/7] tests/kms_chamelium: Issue disabling modeset when resetting state

Arkadiusz Hiler
2020-04-07T13:19:18Z

Each tests resets the state to be sure it starts with a clean slate.
Let's add disabling modeset to the pile, to be sure that we get the
hotplug events and the connector state is correct.

Cc: Kunal Joshi <kunal1.joshi@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Issue: https://gitlab.freedesktop.org/drm/intel/issues/323
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com>
---
tests/kms_chamelium.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 08abd961..236e1010 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -273,7 +273,14 @@ check_analog_bridge(data_t *data, struct chamelium_port *port)
static void
reset_state(data_t *data, struct chamelium_port *port)
{
- int p;
+ int p, i;
+
+ for (i = 0; i < data->display.n_outputs; i++) {
+ igt_output_t *output = &data->display.outputs[i];
+ igt_output_set_pipe(output, PIPE_NONE);
+ }
+
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);

chamelium_reset(data->chamelium);