summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_fb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index c61e6805..ca486551 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -561,6 +561,16 @@ static int create_bo_for_fb(struct igt_fb *fb)
}
}
+ /*
+ * The current dumb buffer allocation API doesn't really allow to
+ * specify a custom size or stride. Yet the caller is free to specify
+ * them, so we need to make sure to error out in this case.
+ */
+ igt_assert(fb->size == 0);
+ igt_assert(fb->strides[0] == 0);
+
+ fb->size = calc_fb_size(fb);
+
fb->is_dumb = true;
fb->gem_handle = kmstest_dumb_create(fd, fb->width, fb->height,
fb->plane_bpp[0],