[igt-dev] [PATCH i-g-t 4/4] lib/igt_fb: Pimp "no conversion specified" assert

Ville Syrjala ville.syrjala at linux.intel.com
Fri Oct 25 14:30:50 UTC 2019


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Decode the fourccs to make things a bit more human readable
if the assertion trips.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 lib/igt_fb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index aaeca7955418..4adca9672f33 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -3096,8 +3096,10 @@ static void fb_convert(struct fb_convert *cvt)
 	}
 
 	igt_assert_f(false,
-		     "Conversion not implemented (from format 0x%x to 0x%x)\n",
-		     cvt->src.fb->drm_format, cvt->dst.fb->drm_format);
+		     "Conversion not implemented (from format "
+		     IGT_FORMAT_FMT " to " IGT_FORMAT_FMT ")\n",
+		     IGT_FORMAT_ARGS(cvt->src.fb->drm_format),
+		     IGT_FORMAT_ARGS(cvt->dst.fb->drm_format));
 }
 
 static void destroy_cairo_surface__convert(void *arg)
-- 
2.21.0



More information about the igt-dev mailing list