summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-11 16:14:33 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-04-13 19:08:17 +0200
commitcc730c418f44245c49776059b2564f54da4449e6 (patch)
treed976b40b7c62b74707f79452e0e7df6d3da280dd /lib
parent99b8f807010483128f10f7934a864c78b4438b34 (diff)
lib/kmstest: Fix up tiled buffer creation
When extracting a raw __gem_set_tiling helper I've fumbled this in commit 590f6101402b51bca54f69c002380bda967484ea Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Oct 9 20:50:50 2013 +0200 lib/drmtest: extract rawer __gem_set_tiling Fix things up so that we properly propaget the error again. Now to make this all properly work we also need to make kms_flip a notch more robust against such failures ... This only blows up on gen2/3 with the pan tests which want a too wide framebuffer for tiling. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_fb.c6
-rw-r--r--lib/igt_kms.c1
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index ef486f97..29a12c6c 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -79,7 +79,7 @@ static int create_bo_for_fb(int fd, int width, int height, int bpp,
unsigned *size_ret, unsigned *stride_ret)
{
uint32_t gem_handle;
- int size;
+ int size, ret = 0;
unsigned stride;
if (tiled) {
@@ -109,13 +109,13 @@ static int create_bo_for_fb(int fd, int width, int height, int bpp,
gem_handle = gem_create(fd, size);
if (tiled)
- gem_set_tiling(fd, gem_handle, I915_TILING_X, stride);
+ ret = __gem_set_tiling(fd, gem_handle, I915_TILING_X, stride);
*stride_ret = stride;
*size_ret = size;
*gem_handle_ret = gem_handle;
- return 0;
+ return ret;
}
/**
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 9dee855c..fffad9f6 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -56,7 +56,6 @@
* Note that this library's header pulls in the [i-g-t framebuffer](intel-gpu-tools-i-g-t-framebuffer.html)
* library as a dependency.
*/
-
const char *kmstest_pipe_str(int pipe)
{
const char *str[] = { "A", "B", "C" };