[igt-dev] [i-g-t] tests/kms_cursor_edge_walk: Fix the usage of single output on pipe
Sharma, Swati2
swati2.sharma at intel.com
Wed Jul 13 08:19:17 UTC 2022
LGTM
Reviewed-by: Swati Sharma <swati2.sharma at intel.com>
On 13-Jul-22 11:18 AM, Bhanuprakash Modem wrote:
> igt_get_single_output_for_pipe may return NULL if there is no compatable
> output found on a selected pipe.
>
> Instead use for_each_pipe_with_single_output() to iterate all possible
> combinations.
>
> Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/6279
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> ---
> tests/kms_cursor_edge_walk.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tests/kms_cursor_edge_walk.c b/tests/kms_cursor_edge_walk.c
> index af3769db..b75fc216 100644
> --- a/tests/kms_cursor_edge_walk.c
> +++ b/tests/kms_cursor_edge_walk.c
> @@ -346,9 +346,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
> igt_subtest_group {
> for (i = 0; i < ARRAY_SIZE(tests); i++) {
> igt_subtest_with_dynamic(tests[i].name) {
> - for_each_pipe(&data.display, data.pipe) {
> - data.output = igt_get_single_output_for_pipe(&data.display, data.pipe);
> -
> + for_each_pipe_with_single_output(&data.display, data.pipe, data.output) {
> for (data.curw = 64; data.curw <= 256; data.curw *= 2) {
> data.curh = data.curw;
> igt_require(data.curw <= max_curw && data.curh <= max_curh);
--
~Swati Sharma
More information about the igt-dev
mailing list