From: Daniel Vetter <daniel@ffwll.ch>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v23 22/37] tests/api_intel_bb: Add subtest to check render batch on the last page
Date: Tue, 16 Mar 2021 12:47:03 +0100 [thread overview]
Message-ID: <YFCatzplEUQFKsNP@phenom.ffwll.local> (raw)
In-Reply-To: <20210315165842.64488-23-zbigniew.kempczynski@intel.com>
On Mon, Mar 15, 2021 at 05:58:27PM +0100, Zbigniew Kempczyński wrote:
> Last page (on 48-bit ppgtt) seems to be problematic when full
> 3D pipeline batch is inserted and executed from it. Try to find out
> which generations are still prone to hang on it.
>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
Discussed this a bit on irc, and this results in failures. I think it's
good to have this as a test going forward to make sure hw doesn't break in
bad ways, but merging a test that's red for old platforms isn't a good
pattern. It's imo part of the reason our CI results look so horrible.
So options:
- drop this patch
- limit the test to only run on modern platforms that don't suck, with a
comment explaining where it's broken
And I guess need to retract my hurried ack on this patch too :-)
-Daniel
> ---
> tests/i915/api_intel_bb.c | 75 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 75 insertions(+)
>
> diff --git a/tests/i915/api_intel_bb.c b/tests/i915/api_intel_bb.c
> index 29d4dd7b6..7f56c1cbc 100644
> --- a/tests/i915/api_intel_bb.c
> +++ b/tests/i915/api_intel_bb.c
> @@ -36,6 +36,7 @@
> #include <glib.h>
> #include <zlib.h>
> #include "intel_bufops.h"
> +#include "sw_sync.h"
>
> #define PAGE_SIZE 4096
>
> @@ -1320,6 +1321,77 @@ static void render_ccs(struct buf_ops *bops)
> igt_assert_f(fails == 0, "render-ccs fails: %d\n", fails);
> }
>
> +static void last_page(struct buf_ops *bops, uint32_t width, uint32_t height)
> +{
> + struct intel_bb *ibb1, *ibb2;
> + struct intel_buf src, dst;
> + int i915 = buf_ops_get_fd(bops);
> + uint32_t devid = intel_get_drm_devid(i915);
> + igt_render_copyfunc_t render_copy = NULL;
> + uint64_t gtt_size;
> + uint64_t ctx;
> + int ret;
> +
> + igt_require(gem_uses_full_ppgtt(i915));
> + gtt_size = gem_aperture_size(i915);
> +
> + ctx = gem_context_create(i915);
> +
> + ibb1 = intel_bb_create_full(i915, ctx, PAGE_SIZE,
> + 0, gtt_size, INTEL_ALLOCATOR_SIMPLE,
> + ALLOC_STRATEGY_LOW_TO_HIGH);
> +
> + ibb2 = intel_bb_create_full(i915, 0, PAGE_SIZE,
> + 0, gtt_size, INTEL_ALLOCATOR_SIMPLE,
> + ALLOC_STRATEGY_HIGH_TO_LOW);
> +
> + if (debug_bb) {
> + intel_bb_set_debug(ibb1, true);
> + intel_bb_set_debug(ibb2, true);
> + }
> +
> + scratch_buf_init(bops, &src, width, height, I915_TILING_NONE,
> + I915_COMPRESSION_NONE);
> + scratch_buf_init(bops, &dst, width, height, I915_TILING_NONE,
> + I915_COMPRESSION_NONE);
> + scratch_buf_draw_pattern(bops, &src,
> + 0, 0, width, height,
> + 0, 0, width, height, 0);
> +
> + render_copy = igt_get_render_copyfunc(devid);
> + igt_assert(render_copy);
> +
> + render_copy(ibb1,
> + &src,
> + 0, 0, width, height,
> + &dst,
> + 0, 0);
> + gem_sync(i915, dst.handle);
> + sync_fence_wait(ibb1->fence, -1);
> + igt_assert_eq(sync_fence_status(ibb1->fence), 1);
> + intel_bb_destroy(ibb1);
> +
> + intel_buf_close(bops, &dst);
> + scratch_buf_init(bops, &dst, width, height, I915_TILING_NONE,
> + I915_COMPRESSION_NONE);
> +
> + render_copy(ibb2,
> + &src,
> + 0, 0, width, height,
> + &dst,
> + 0, 0);
> +
> + /* We likely got a hang here, so free resources before assert */
> + sync_fence_wait(ibb2->fence, -1);
> + ret = sync_fence_status(ibb2->fence);
> +
> + intel_bb_destroy(ibb2);
> + intel_buf_close(bops, &src);
> + intel_buf_close(bops, &dst);
> +
> + igt_assert_f(ret == 1, "Batch in last page in rcs leads to hang\n");
> +}
> +
> static int opt_handler(int opt, int opt_index, void *data)
> {
> switch (opt) {
> @@ -1471,6 +1543,9 @@ igt_main_args("dpib", NULL, help_str, opt_handler, NULL)
> igt_subtest("render-ccs")
> render_ccs(bops);
>
> + igt_subtest("last-page")
> + last_page(bops, 512, 512);
> +
> igt_fixture {
> buf_ops_destroy(bops);
> close(i915);
> --
> 2.26.0
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2021-03-16 11:47 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 16:58 [igt-dev] [PATCH i-g-t v23 00/37] Introduce IGT allocator Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 01/37] lib/gem_submission: Add gem_has_relocations() check Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 02/37] lib/igt_list: Add igt_list_del_init() Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 03/37] lib/igt_list: igt_hlist implementation Zbigniew Kempczyński
2021-03-16 10:29 ` Daniel Vetter
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 04/37] lib/igt_map: Introduce igt_map Zbigniew Kempczyński
2021-03-16 10:30 ` Daniel Vetter
2021-03-16 12:25 ` Zbigniew Kempczyński
2021-03-16 13:26 ` Daniel Vetter
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 05/37] lib/igt_core: Track child process pid and tid Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 06/37] lib/intel_allocator_simple: Add simple allocator Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 07/37] lib/intel_allocator_reloc: Add reloc allocator Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 08/37] lib/intel_allocator_random: Add random allocator Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 09/37] lib/intel_allocator: Add intel_allocator core Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 10/37] lib/intel_allocator: Try to stop smoothly instead of deinit Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 11/37] lib/intel_allocator_msgchannel: Scale to 4k of parallel clients Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 12/37] lib/intel_allocator: Separate allocator multiprocess start Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 13/37] lib/intel_bufops: Change size from 32->64 bit Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 14/37] lib/intel_bufops: Add init with handle and size function Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 15/37] lib/intel_batchbuffer: Integrate intel_bb with allocator Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 16/37] lib/intel_batchbuffer: Use relocations in intel-bb up to gen12 Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 17/37] lib/intel_batchbuffer: Create bb with strategy / vm ranges Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 18/37] lib/intel_batchbuffer: Add tracking intel_buf to intel_bb Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 19/37] lib/igt_fb: Initialize intel_buf with same size as fb Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 20/37] tests/api_intel_bb: Remove check-canonical test Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 21/37] tests/api_intel_bb: Modify test to verify intel_bb with allocator Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 22/37] tests/api_intel_bb: Add subtest to check render batch on the last page Zbigniew Kempczyński
2021-03-16 11:47 ` Daniel Vetter [this message]
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 23/37] tests/api_intel_bb: Add compressed->compressed copy Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 24/37] tests/api_intel_bb: Add purge-bb test Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 25/37] tests/api_intel_bb: Add simple intel-bb which uses allocator Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 26/37] tests/api_intel_bb: Use allocator in delta-check test Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 27/37] tests/api_intel_bb: Check switching vm in intel-bb Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 28/37] tests/api_intel_allocator: Simple allocator test suite Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 29/37] tests/api_intel_allocator: Add execbuf with allocator example Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 30/37] tests/api_intel_allocator: Verify child can use its standalone allocator Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 31/37] tests/gem_softpin: Verify allocator and execbuf pair work together Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 32/37] tests/gem|kms: Remove intel_bb from fixture Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 33/37] tests/gem_mmap_offset: Use intel_buf wrapper code instead direct Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 34/37] tests/gem_ppgtt: Adopt test to use intel_bb with allocator Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 35/37] tests/gem_render_copy_redux: Adopt to use with intel_bb and allocator Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 36/37] tests/perf.c: Remove buffer from batch Zbigniew Kempczyński
2021-03-15 16:58 ` [igt-dev] [PATCH i-g-t v23 37/37] tests/gem_linear_blits: Use intel allocator Zbigniew Kempczyński
2021-03-16 11:23 ` Chris Wilson
2021-03-16 13:08 ` Zbigniew Kempczyński
2021-03-16 13:18 ` Zbigniew Kempczyński
2021-03-15 17:59 ` [igt-dev] ✓ Fi.CI.BAT: success for Introduce IGT allocator (rev26) Patchwork
2021-03-15 19:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-03-16 10:36 ` Daniel Vetter
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=YFCatzplEUQFKsNP@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=igt-dev@lists.freedesktop.org \
--cc=zbigniew.kempczynski@intel.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox