From: Matthew Auld <matthew.auld@intel.com> To: igt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, Dominik Grzegorzek <dominik.grzegorzek@intel.com> Subject: [Intel-gfx] [PATCH i-g-t v3 4/9] tests/gem_gpgpu_fill: Convert from simple to standard igt_main Date: Wed, 26 May 2021 14:00:20 +0100 [thread overview] Message-ID: <20210526130025.249629-4-matthew.auld@intel.com> (raw) In-Reply-To: <20210526130025.249629-1-matthew.auld@intel.com> From: Dominik Grzegorzek <dominik.grzegorzek@intel.com> As we need to add new test variants, convert the code to standard igt_main format so those variants can be easily accommodated. Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> --- tests/i915/gem_gpgpu_fill.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/i915/gem_gpgpu_fill.c b/tests/i915/gem_gpgpu_fill.c index c605629f..5b11fb35 100644 --- a/tests/i915/gem_gpgpu_fill.c +++ b/tests/i915/gem_gpgpu_fill.c @@ -123,20 +123,27 @@ static void gpgpu_fill(data_t *data, igt_fillfunc_t fill) munmap(ptr, buf->surface[0].size); } - -igt_simple_main +igt_main { data_t data = {0, }; igt_fillfunc_t fill_fn = NULL; - data.drm_fd = drm_open_driver_render(DRIVER_INTEL); - data.devid = intel_get_drm_devid(data.drm_fd); - igt_require_gem(data.drm_fd); - data.bops = buf_ops_create(data.drm_fd); + igt_fixture { + data.drm_fd = drm_open_driver_render(DRIVER_INTEL); + data.devid = intel_get_drm_devid(data.drm_fd); + igt_require_gem(data.drm_fd); + data.bops = buf_ops_create(data.drm_fd); + + fill_fn = igt_get_gpgpu_fillfunc(data.devid); + + igt_require_f(fill_fn, "no gpgpu-fill function\n"); - fill_fn = igt_get_gpgpu_fillfunc(data.devid); + } - igt_require_f(fill_fn, "no gpgpu-fill function\n"); + igt_subtest("basic") + gpgpu_fill(&data, fill_fn); - gpgpu_fill(&data, fill_fn); + igt_fixture { + buf_ops_destroy(data.bops); + } } -- 2.26.3 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Auld <matthew.auld@intel.com> To: igt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, Petri Latvala <petri.latvala@intel.com> Subject: [igt-dev] [PATCH i-g-t v3 4/9] tests/gem_gpgpu_fill: Convert from simple to standard igt_main Date: Wed, 26 May 2021 14:00:20 +0100 [thread overview] Message-ID: <20210526130025.249629-4-matthew.auld@intel.com> (raw) In-Reply-To: <20210526130025.249629-1-matthew.auld@intel.com> From: Dominik Grzegorzek <dominik.grzegorzek@intel.com> As we need to add new test variants, convert the code to standard igt_main format so those variants can be easily accommodated. Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> --- tests/i915/gem_gpgpu_fill.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/i915/gem_gpgpu_fill.c b/tests/i915/gem_gpgpu_fill.c index c605629f..5b11fb35 100644 --- a/tests/i915/gem_gpgpu_fill.c +++ b/tests/i915/gem_gpgpu_fill.c @@ -123,20 +123,27 @@ static void gpgpu_fill(data_t *data, igt_fillfunc_t fill) munmap(ptr, buf->surface[0].size); } - -igt_simple_main +igt_main { data_t data = {0, }; igt_fillfunc_t fill_fn = NULL; - data.drm_fd = drm_open_driver_render(DRIVER_INTEL); - data.devid = intel_get_drm_devid(data.drm_fd); - igt_require_gem(data.drm_fd); - data.bops = buf_ops_create(data.drm_fd); + igt_fixture { + data.drm_fd = drm_open_driver_render(DRIVER_INTEL); + data.devid = intel_get_drm_devid(data.drm_fd); + igt_require_gem(data.drm_fd); + data.bops = buf_ops_create(data.drm_fd); + + fill_fn = igt_get_gpgpu_fillfunc(data.devid); + + igt_require_f(fill_fn, "no gpgpu-fill function\n"); - fill_fn = igt_get_gpgpu_fillfunc(data.devid); + } - igt_require_f(fill_fn, "no gpgpu-fill function\n"); + igt_subtest("basic") + gpgpu_fill(&data, fill_fn); - gpgpu_fill(&data, fill_fn); + igt_fixture { + buf_ops_destroy(data.bops); + } } -- 2.26.3 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2021-05-26 13:00 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-26 13:00 [Intel-gfx] [PATCH i-g-t v3 1/9] i915_drm.h sync Matthew Auld 2021-05-26 13:00 ` [igt-dev] " Matthew Auld 2021-05-26 13:00 ` [Intel-gfx] [PATCH i-g-t v3 2/9] lib/i915/gem_create: Add gem_create_ext Matthew Auld 2021-05-26 13:00 ` [igt-dev] " Matthew Auld 2021-05-26 13:00 ` [Intel-gfx] [PATCH i-g-t v3 3/9] lib/i915/intel_memory_region: Add new memory region lib Matthew Auld 2021-05-26 13:00 ` [igt-dev] " Matthew Auld 2021-05-26 13:00 ` Matthew Auld [this message] 2021-05-26 13:00 ` [igt-dev] [PATCH i-g-t v3 4/9] tests/gem_gpgpu_fill: Convert from simple to standard igt_main Matthew Auld 2021-05-26 13:00 ` [Intel-gfx] [PATCH i-g-t v3 5/9] tests/i915/gem_exec_basic: Use memory region interface Matthew Auld 2021-05-26 13:00 ` [igt-dev] " Matthew Auld 2021-05-26 13:00 ` [Intel-gfx] [PATCH i-g-t v3 6/9] tests/i915/gem_gpgpu_fill: " Matthew Auld 2021-05-26 13:00 ` [igt-dev] " Matthew Auld 2021-05-26 13:00 ` [Intel-gfx] [PATCH i-g-t v3 7/9] tests/i915/gem_media_fill: " Matthew Auld 2021-05-26 13:00 ` [igt-dev] " Matthew Auld 2021-05-26 13:00 ` [Intel-gfx] [PATCH i-g-t v3 8/9] tests/i915/gem_create: exercise placements extension Matthew Auld 2021-05-26 13:00 ` [igt-dev] " Matthew Auld 2021-05-26 13:00 ` [Intel-gfx] [PATCH i-g-t v3 9/9] tests/i915/gem_exec_basic: Iterate over all memory regions Matthew Auld 2021-05-26 13:00 ` [igt-dev] " Matthew Auld 2021-05-26 15:45 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/9] i915_drm.h sync Patchwork 2021-05-27 1:01 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210526130025.249629-4-matthew.auld@intel.com \ --to=matthew.auld@intel.com \ --cc=dominik.grzegorzek@intel.com \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.