diff options
author | Daniel Stone <daniels@collabora.com> | 2018-03-21 11:07:28 +0000 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2018-03-21 12:13:21 +0000 |
commit | ddc4ffb00e389a4dd584e8055eadf283dff69db5 (patch) | |
tree | e2e4a6d822d9c0b77a1bc03152f42e6f655796d1 /lib/igt_kms.c | |
parent | 060c7e4f5a3622e01a25aebfeac5c6d1e3832a8c (diff) |
lib: Don't fail if plane IN_FORMATS not present
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.
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")
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r-- | lib/igt_kms.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |