unsigned *size_ret, unsigned *stride_ret)
{
uint32_t gem_handle;
- int size;
+ int size, ret = 0;
unsigned stride;
if (tiled) {
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;
}
/**
* 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" };
true, &o->fb_info[2]);
igt_assert(o->fb_ids[0]);
igt_assert(o->fb_ids[1]);
- igt_assert(o->fb_ids[2]);
+ if (o->flags & TEST_FB_BAD_TILING)
+ igt_require(o->fb_ids[2]);
paint_flip_mode(&o->fb_info[0], false);
paint_flip_mode(&o->fb_info[1], true);
- paint_flip_mode(&o->fb_info[2], true);
+ if (o->fb_ids[2])
+ paint_flip_mode(&o->fb_info[2], true);
if (o->flags & TEST_FB_BAD_TILING)
set_y_tiling(o, 2);
igt_info("\n%s: PASSED\n\n", test_name);
out:
- igt_remove_fb(drm_fd, &o->fb_info[2]);
+ if (o->fb_ids[2])
+ igt_remove_fb(drm_fd, &o->fb_info[2]);
igt_remove_fb(drm_fd, &o->fb_info[1]);
igt_remove_fb(drm_fd, &o->fb_info[0]);