[igt-dev] [PATCH i-g-t 2/2] tests/i915_pm_lpsp: Fix compilation warning
Petri Latvala
petri.latvala at intel.com
Thu Jul 23 11:32:09 UTC 2020
On Thu, Jul 23, 2020 at 02:16:15PM +0300, Arkadiusz Hiler wrote:
> ... 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>
Reviewed-by: Petri Latvala <petri.latvala at intel.com>
Is it time to implement for_each_output?
> ---
> 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
>
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
More information about the igt-dev
mailing list