Commit f1e77e83 authored by Ville Syrjälä's avatar Ville Syrjälä

tests/kms_draw_crc: Skip tests for unsupported formats

10bpc formats aren't supported on all platforms, so skip the test when
we can't create the framebuffer.
Signed-off-by: Ville Syrjälä's avatarVille Syrjälä <>
Reviewed-by: Petri Latvala's avatarPetri Latvala <>
parent 4ac32f48
......@@ -153,16 +153,33 @@ static void get_method_crc(enum igt_draw_method method, uint32_t drm_format,
igt_remove_fb(drm_fd, &fb);
static bool format_is_supported(uint32_t format, uint64_t modifier)
uint32_t gem_handle, fb_id;
unsigned int stride;
int ret;
gem_handle = igt_create_bo_with_dimensions(drm_fd, 64, 64,
format, modifier,
0, NULL, &stride, NULL);
ret = __kms_addfb(drm_fd, gem_handle, 64, 64,
stride, format, modifier,
drmModeRmFB(drm_fd, fb_id);
gem_close(drm_fd, gem_handle);
return ret == 0;
static void draw_method_subtest(enum igt_draw_method method,
uint32_t format_index, uint64_t tiling)
igt_crc_t crc;
if (tiling == LOCAL_I915_FORMAT_MOD_Y_TILED)
igt_require(intel_gen(intel_get_drm_devid(drm_fd)) >= 9);
igt_skip_on(method == IGT_DRAW_MMAP_WC && !gem_mmap__has_wc(drm_fd));
igt_require(format_is_supported(formats[format_index], tiling));
/* Use IGT_DRAW_MMAP_GTT on an untiled buffer as the parameter for
* comparison. Cache the value so we don't recompute it for every single
* subtest. */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment