[igt-dev] [PATCH i-g-t] lib: Don't fail if plane IN_FORMATS not present
Daniel Stone
daniels at collabora.com
Wed Mar 21 11:09:48 UTC 2018
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 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
More information about the igt-dev
mailing list