[i-g-t 2/2] lib/igt_kms: Don't abort in lib helper

Samala, Pranay pranay.samala at intel.com
Wed Sep 18 08:12:02 UTC 2024



> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of
> Bhanuprakash Modem
> Sent: Tuesday, September 17, 2024 3:14 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Modem, Bhanuprakash <bhanuprakash.modem at intel.com>
> Subject: [i-g-t 2/2] lib/igt_kms: Don't abort in lib helper
> 
> Instead of aborting from lib helper, simply return the status to the caller and let
> the caller to decide to abort/skip.
> 
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
LGTM.

Reviewed-by: Pranay Samala <pranay.samala at intel.com>
> ---
>  lib/igt_kms.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 9313e4c27..b40470c02 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -6596,7 +6596,10 @@ bool intel_pipe_output_combo_valid(igt_display_t
> *display)
>  		combo++;
>  	}
> 
> -	igt_assert_f(combo, "At least one pipe/output combo needed.\n");
> +	if (!combo) {
> +		igt_info("At least one pipe/output combo needed.\n");
> +		return false;
> +	}
> 
>  	if (!is_intel_device(display->drm_fd))
>  		return true;
> --
> 2.43.0



More information about the igt-dev mailing list