summaryrefslogtreecommitdiff
path: root/lib/igt_fb.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-08-19 11:40:07 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2014-08-21 15:00:08 +0100
commit54397cafed108e54e98f109b8fd6cb4fdc729823 (patch)
tree5ec240228b7e42416f92719569924902a53958cc /lib/igt_fb.c
parentd9ffb7dfc3e9a36e63561f0e3a995275a445f87f (diff)
lib/fb: Replace straight igt_fail() by asserts with debug messages
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'lib/igt_fb.c')
-rw-r--r--lib/igt_fb.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 30b8593c..f383970b 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));
}
/**