From 7ca55f433c1e1fa722a46d1303524579581d6037 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Tue, 26 Jan 2016 10:52:29 -0200 Subject: tests/igt_fb: rename igt_get_all_formats to igt_get_all_cairo_formats I recently had this discussion with Daniel where I didn't want to use igt_drm_format_to_bpp() because it uses the format_desc array, and igt_fb currently assumes that all the format_desc formats have a matching valid Cairo format, so I wouldn't be able to easily add formats such as ARGB2101010. The function that has the assumption mentioned above is igt_get_all_formats: its current users call igt_get_all_formats, and then call cairo-dependent functions, such as igt_get_cairo_ctx on the returned formats. In order to document the current behavior and prevent any problems in case we start adding new formats without matching Cairo versions to format_desc, rename igt_get_all_formats to igt_get_all_cairo_formats and make it explicitly check for CAIRO_FORMAT_INVALID. Requested-by: Daniel Vetter Acked-by: Daniel Vetter Signed-off-by: Paulo Zanoni --- tests/kms_atomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/kms_atomic.c') diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c index 501093cc..c8b8b78a 100644 --- a/tests/kms_atomic.c +++ b/tests/kms_atomic.c @@ -843,7 +843,7 @@ static uint32_t plane_get_igt_format(struct kms_atomic_plane_state *plane) plane_kms = drmModeGetPlane(plane->state->desc->fd, plane->obj); igt_assert(plane_kms); - igt_get_all_formats(&igt_formats, &num_igt_formats); + igt_get_all_cairo_formats(&igt_formats, &num_igt_formats); for (i = 0; i < num_igt_formats; i++) { int j; -- cgit v1.2.3