All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/fb: Replace straight igt_fail() by asserts with debug messages
@ 2014-08-21 14:01 Damien Lespiau
  0 siblings, 0 replies; only message in thread
From: Damien Lespiau @ 2014-08-21 14:01 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 lib/igt_fb.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 30b8593..f383970 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -516,7 +516,8 @@ static cairo_format_t drm_format_to_cairo(uint32_t drm_format)
 		if (f->drm_id == drm_format)
 			return f->cairo_id;
 
-	igt_fail(101);
+	igt_assert_f(0, "can't find a cairo format for %08x (%s)\n",
+		     drm_format, igt_format_str(drm_format));
 }
 
 static void destroy_cairo_surface__gtt(void *arg)
@@ -635,7 +636,9 @@ uint32_t igt_bpp_depth_to_drm_format(int bpp, int depth)
 		if (f->bpp == bpp && f->depth == depth)
 			return f->drm_id;
 
-	igt_fail(101);
+
+	igt_assert_f(0, "can't find drm format with bpp=%d, depth=%d\n", bpp,
+		     depth);
 }
 
 /**
@@ -654,7 +657,8 @@ uint32_t igt_drm_format_to_bpp(uint32_t drm_format)
 		if (f->drm_id == drm_format)
 			return f->bpp;
 
-	igt_fail(101);
+	igt_assert_f(0, "can't find a bpp format for %08x (%s)\n",
+		     drm_format, igt_format_str(drm_format));
 }
 
 /**
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-21 14:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21 14:01 [PATCH i-g-t] lib/fb: Replace straight igt_fail() by asserts with debug messages Damien Lespiau

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.