summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2020-07-23 14:16:15 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2020-07-24 11:40:23 +0300
commit6980775bcadec862cd5e5affd65928ef79e5b580 (patch)
tree9fdd2a66af0b6a40028d139d9f533ff53afcca7a
parentc20220dfb4dd429666560dbb041f46e508a32631 (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>
-rw-r--r--tests/i915/i915_pm_lpsp.c6
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++;