summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2015-11-05 10:42:49 -0200
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2015-11-27 09:57:35 -0200
commit5cfc4e7967f76cdc92364014c8bf896ab6afa6bc (patch)
tree841a2b836ce02d6df58324ce90a280c6cbf737b3 /lib
parentd44100ed233db46085b626c1d493856ca1900eab (diff)
lib/igt_fb: fix fb->size when provided by the user
I want to have a little more control over the size of the buffers in kms_frontbuffer_tracking, so I decided to start calling igt_create_fb_with_bo_size() instead of igt_create_fb(). The problem is that create_bo_for_fb() returns its own calculated size as size_ret instead of the actual used size. So we fix this by returning the actual size, the one used in gem_create instead of the calculated size that's not used anywhere. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 13a6a349..c70fb2cf 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -116,7 +116,7 @@ static int create_bo_for_fb(int fd, int width, int height, int bpp,
ret = __gem_set_tiling(fd, gem_handle, I915_TILING_X, stride);
*stride_ret = stride;
- *size_ret = size;
+ *size_ret = bo_size;
*gem_handle_ret = gem_handle;
return ret;