[igt-dev] [PATCH i-g-t] lib: Don't fail if plane IN_FORMATS not present

Ville Syrjälä ville.syrjala at linux.intel.com
Wed Mar 21 12:01:32 UTC 2018


On Wed, Mar 21, 2018 at 11:09:48AM +0000, Daniel Stone wrote:
> igt_display_init() now unconditionally tries to get the plane IN_FORMATS
> blob, which causes a hard assert failure if we don't have the property
> present.

That's quite odd. I'm pretty sure I tested this with blobifiers disabled
in i915 when I did https://patchwork.freedesktop.org/series/40113/ but
somehow I did not hit that assert. Makes me wonder what I actually
tested.

Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

> 
> Check if it's there and return early if not.
> 
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> Fixes: 98f7614bd725 ("lib: Parse plane IN_FORMATS blobifiers into a nicer form")
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  lib/igt_kms.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 7222642e..93240427 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -3957,6 +3957,9 @@ static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane
>  	int idx = 0;
>  	int count;
>  
> +	if (!igt_plane_has_prop(plane, IGT_PLANE_IN_FORMATS))
> +		return;
> +
>  	blob_id = igt_plane_get_prop(plane, IGT_PLANE_IN_FORMATS);
>  
>  	blob = drmModeGetPropertyBlob(display->drm_fd, blob_id);
> -- 
> 2.16.2

-- 
Ville Syrjälä
Intel OTC


More information about the igt-dev mailing list