[igt-dev] [PATCH i-g-t 2/2] tests/i915_pm_lpsp: Fix compilation warning
Arkadiusz Hiler
arkadiusz.hiler at intel.com
Thu Jul 23 11:16:15 UTC 2020
... 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 at intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
---
tests/i915/i915_pm_lpsp.c | 6 ++----
1 file 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++;
--
2.25.4
More information about the igt-dev
mailing list