[igt-dev] [PATCH i-g-t v4 09/14] i915/gem_set_tiling_vs_blit.c: Remove libdrm dependency
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Mon Oct 26 19:57:58 UTC 2020
On Fri, Oct 23, 2020 at 11:21:58AM +0200, Dominik Grzegorzek wrote:
> Use intel_bb / intel_buf to remove libdrm dependency. The tests
> had depended on buffer reuse mechanism, so logic was changed a bit.
>
> Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> igt_fixture {
> for (i = 0; i < 1024*256; i++)
> @@ -235,17 +229,13 @@ igt_main
> igt_require_gem(fd);
> gem_require_blitter(fd);
> igt_require(gem_available_fences(fd) > 0);
> -
> - bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> - drm_intel_bufmgr_gem_enable_reuse(bufmgr);
> - devid = intel_get_drm_devid(fd);
> - batch = intel_batchbuffer_alloc(bufmgr, devid);
> + bops = buf_ops_create(fd);
> }
>
> igt_subtest("untiled-to-tiled") {
> tiling = I915_TILING_NONE;
> tiling_after = I915_TILING_X;
> - do_test(tiling, TEST_STRIDE, tiling_after, TEST_STRIDE);
> + do_test(bops, tiling, TEST_STRIDE, tiling_after, TEST_STRIDE);
> igt_assert(tiling == I915_TILING_NONE);
> igt_assert(tiling_after == I915_TILING_X);
BTW those asserts looks weird, especially tiling and tiling_after are not
passed via reference.
--
Zbigniew
> }
> @@ -253,7 +243,7 @@ igt_main
> igt_subtest("tiled-to-untiled") {
> tiling = I915_TILING_X;
> tiling_after = I915_TILING_NONE;
> - do_test(tiling, TEST_STRIDE, tiling_after, TEST_STRIDE);
> + do_test(bops, tiling, TEST_STRIDE, tiling_after, TEST_STRIDE);
> igt_assert(tiling == I915_TILING_X);
> igt_assert(tiling_after == I915_TILING_NONE);
> }
> @@ -261,8 +251,13 @@ igt_main
> igt_subtest("tiled-to-tiled") {
> tiling = I915_TILING_X;
> tiling_after = I915_TILING_X;
> - do_test(tiling, TEST_STRIDE/2, tiling_after, TEST_STRIDE);
> + do_test(bops, tiling, TEST_STRIDE/2, tiling_after, TEST_STRIDE);
> igt_assert(tiling == I915_TILING_X);
> igt_assert(tiling_after == I915_TILING_X);
> }
> +
> + igt_fixture{
> + buf_ops_destroy(bops);
> + close(fd);
> + }
> }
> --
> 2.20.1
>
More information about the igt-dev
mailing list