From d63413771fc9bc77e89dacecbc1bae6192444000 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Thu, 5 Nov 2015 16:39:00 -0200 Subject: lib/igt_fb: also pass the stride to igt_create_fb_with_bo_size() If the caller is going to specify a custom size, it's likely that he will also specify a custom stride. The automatic stride picked by create_bo_for_fb() is too huge for tiled buffers, so if the caller wants smaller buffers, then he'll need a smaller stride too, otherwise the Kernel will reject the addfb IOCTL due to stride * height being bigger than the size. I want to make tests/kms_frontbuffer_tracking use igt_create_fb_with_bo_size() so I can provide smaller buffers that will fit into the CFB. I'm also planning to make all frontbuffers with the same width/height/format have the same stride and size regardless of tiling method so I can exercise specific code paths. Signed-off-by: Paulo Zanoni --- tests/kms_flip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/kms_flip.c') diff --git a/tests/kms_flip.c b/tests/kms_flip.c index c1c5e9ed..7157e709 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1404,7 +1404,7 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs, tiling, &o->fb_info[0]); o->fb_ids[1] = igt_create_fb_with_bo_size(drm_fd, o->fb_width, o->fb_height, igt_bpp_depth_to_drm_format(o->bpp, o->depth), - tiling, &o->fb_info[1], bo_size); + tiling, &o->fb_info[1], bo_size, 0); o->fb_ids[2] = igt_create_fb(drm_fd, o->fb_width, o->fb_height, igt_bpp_depth_to_drm_format(o->bpp, o->depth), LOCAL_I915_FORMAT_MOD_X_TILED, &o->fb_info[2]); -- cgit v1.2.3