Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib: Don't fail if plane IN_FORMATS not present
@ 2018-03-21 11:09 Daniel Stone
  2018-03-21 12:01 ` Ville Syrjälä
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Daniel Stone @ 2018-03-21 11:09 UTC (permalink / raw)
  To: igt-dev

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")
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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-21 14:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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ä
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox