From c7b3e2465773f9fb30bf45976732028e4e4dc365 Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Wed, 18 Jul 2018 17:38:07 +0300 Subject: lib/kms: Pass the number of planes explicitly to __kms_addfb() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently __kms_addfb() assumes that only the first plane can be at offset 0. I don't particularly like such assumptions so let's just pass in the number of planes explicitly. We'll also require offsets[] to be passed in always. Nothing really to gain by making it optional. Signed-off-by: Ville Syrjälä Reviewed-by: Paulo Zanoni --- tests/kms_draw_crc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/kms_draw_crc.c') diff --git a/tests/kms_draw_crc.c b/tests/kms_draw_crc.c index fb10d7cc..90904714 100644 --- a/tests/kms_draw_crc.c +++ b/tests/kms_draw_crc.c @@ -156,6 +156,7 @@ static void get_method_crc(enum igt_draw_method method, uint32_t drm_format, static bool format_is_supported(uint32_t format, uint64_t modifier) { uint32_t gem_handle, fb_id; + unsigned int offsets[4] = {}; unsigned int strides[4] = {}; int ret; @@ -163,7 +164,7 @@ static bool format_is_supported(uint32_t format, uint64_t modifier) format, modifier, 0, NULL, &strides[0], NULL); ret = __kms_addfb(drm_fd, gem_handle, 64, 64, - format, modifier, strides, NULL, + format, modifier, strides, offsets, 1, LOCAL_DRM_MODE_FB_MODIFIERS, &fb_id); drmModeRmFB(drm_fd, fb_id); gem_close(drm_fd, gem_handle); -- cgit v1.2.3