diff options
author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2020-07-23 14:16:15 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2020-07-24 11:40:23 +0300 |
commit | 6980775bcadec862cd5e5affd65928ef79e5b580 (patch) | |
tree | 9fdd2a66af0b6a40028d139d9f533ff53afcca7a /tests/i915/i915_pm_lpsp.c | |
parent | c20220dfb4dd429666560dbb041f46e508a32631 (diff) |
tests/i915_pm_lpsp: Fix compilation warning
... and make the test do what it claims to be doing.
The test needs all outputs to be disabled, but it was iterating with
for_each_pipe_with_single_output, which iterates over pipes and tries
to match them with some output. This may lead to us not iterating over
all the outputs in some circumstances.
Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'tests/i915/i915_pm_lpsp.c')
-rw-r--r-- | tests/i915/i915_pm_lpsp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/i915/i915_pm_lpsp.c b/tests/i915/i915_pm_lpsp.c index e9a59307..4a187810 100644 --- a/tests/i915/i915_pm_lpsp.c +++ b/tests/i915/i915_pm_lpsp.c @@ -82,12 +82,10 @@ static bool dmc_supported(int debugfs) */ static void screens_disabled_subtest(data_t *data) { - igt_output_t *output; int valid_output = 0; - enum pipe pipe; - for_each_pipe_with_single_output(&data->display, pipe, output) { - data->output = output; + for (int i = 0; i < data->display.n_outputs; i++) { + data->output = &data->display.outputs[i]; igt_output_set_pipe(data->output, PIPE_NONE); igt_display_commit(&data->display); valid_output++; |