[igt-dev] [PATCH i-g-t v1] lib/igt_kms: Call get_assigned_primary only if display is initialized

Dixit, Ashutosh ashutosh.dixit at intel.com
Sat Jun 4 01:25:15 UTC 2022


On Fri, 03 Jun 2022 11:32:57 -0700, Jessica Zhang wrote:
>
> Move code for getting the driver-assigned primary plane to before the
> `out` tag. This will avoid any crashes in cases where the display
> resources haven't been initialized.

We hit this issue and were considering an indentical fix so:

Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

And will merge this right now too.

> Signed-off-by: Jessica Zhang <quic_jesszhan at quicinc.com>
> ---
>  lib/igt_kms.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index af4fb85b9a7b..36dfcfcb886d 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -2528,9 +2528,6 @@ void igt_display_require(igt_display_t *display, int drm_fd)
>	/* Set reasonable default values for every object in the display. */
>	igt_display_reset(display);
>
> -out:
> -	LOG_UNINDENT(display);
> -
>	for_each_pipe(display, i) {
>		igt_pipe_t *pipe = &display->pipes[i];
>		igt_output_t *output;
> @@ -2565,6 +2562,9 @@ out:
>		}
>	}
>
> +out:
> +	LOG_UNINDENT(display);
> +
>	if (display->n_pipes && display->n_outputs)
>		igt_enable_connectors(drm_fd);
>	else
> --
> 2.31.0
>


More information about the igt-dev mailing list