[igt-dev] [PATCH i-g-t] tests/kms_color_chamelium: time optimization
Shankar, Uma
uma.shankar at intel.com
Thu Dec 3 12:13:33 UTC 2020
> -----Original Message-----
> From: Joshi, Kunal1 <kunal1.joshi at intel.com>
> Sent: Tuesday, November 10, 2020 10:34 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Latvala, Petri <petri.latvala at intel.com>; Shankar, Uma
> <uma.shankar at intel.com>; B S, Karthik <karthik.b.s at intel.com>; Joshi, Kunal1
> <kunal1.joshi at intel.com>
> Subject: [PATCH i-g-t] tests/kms_color_chamelium: time optimization
>
> Instead of going through all the delta even if we got success with one, now
> breaking when we pass, thus saving some time and decreasing load on
> chamelium for capturing the rest of the frames.
Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar at intel.com>
> Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
> ---
> tests/kms_color_chamelium.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c index
> 310c021a..43bbe1f2 100644
> --- a/tests/kms_color_chamelium.c
> +++ b/tests/kms_color_chamelium.c
> @@ -610,9 +610,9 @@ run_tests_for_pipe(data_t *data, enum pipe p)
> expected_colors[1].g =
> expected_colors[2].b =
> 0.25 + delta * (i - 2);
> - success |= test_pipe_ctm(data, primary,
> - red_green_blue,
> - expected_colors, ctm);
> + if(test_pipe_ctm(data, primary, red_green_blue,
> + expected_colors, ctm))
> + break;
> }
> igt_assert(success);
> }
> @@ -632,9 +632,9 @@ run_tests_for_pipe(data_t *data, enum pipe p)
> expected_colors[1].g =
> expected_colors[2].b =
> 0.5 + delta * (i - 2);
> - success |= test_pipe_ctm(data, primary,
> - red_green_blue,
> - expected_colors, ctm);
> + if(test_pipe_ctm(data, primary, red_green_blue,
> + expected_colors, ctm))
> + break;
> }
> igt_assert(success);
> }
> @@ -654,9 +654,9 @@ run_tests_for_pipe(data_t *data, enum pipe p)
> expected_colors[1].g =
> expected_colors[2].b =
> 0.75 + delta * (i - 3);
> - success |= test_pipe_ctm(data, primary,
> - red_green_blue,
> - expected_colors, ctm);
> + if(test_pipe_ctm(data, primary, red_green_blue,
> + expected_colors, ctm))
> + break;
> }
> igt_assert(success);
> }
> --
> 2.25.1
More information about the igt-dev
mailing list