All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Stone <daniels@collabora.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] lib: Don't fail if plane IN_FORMATS not present
Date: Wed, 21 Mar 2018 14:01:32 +0200	[thread overview]
Message-ID: <20180321120132.GV5453@intel.com> (raw)
In-Reply-To: <20180321110948.11816-1-daniels@collabora.com>

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@linux.intel.com>

> 
> Check if it's there and return early if not.
> 
> Signed-off-by: Daniel Stone <daniels@collabora.com>
> Fixes: 98f7614bd725 ("lib: Parse plane IN_FORMATS blobifiers into a nicer form")
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Chris Wilson <chris@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
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-03-21 12:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 11:09 [igt-dev] [PATCH i-g-t] lib: Don't fail if plane IN_FORMATS not present Daniel Stone
2018-03-21 12:01 ` Ville Syrjälä [this message]
2018-03-21 12:15   ` Daniel Stone
2018-03-21 12:05 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-03-21 14:17 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180321120132.GV5453@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniels@collabora.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.