From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/3] lib/intel_batchbuffer: add create without relocs
Date: Fri, 1 Apr 2022 08:10:50 +0200 [thread overview]
Message-ID: <YkaXav8Za1AAOl+S@zkempczy-mobl2> (raw)
In-Reply-To: <20220331163430.73167-2-kamil.konieczny@linux.intel.com>
On Thu, Mar 31, 2022 at 06:34:28PM +0200, Kamil Konieczny wrote:
> There is create function with relocations, so add its
> counterpart without it.
>
> v3: moved down after intel_bb_create_with_relocs_and_context,
> added function description (Zbigniew review)
> v2: change to HIGH_TO_LOW allocation (Zbigniew)
>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
--
Zbigniew
> ---
> lib/intel_batchbuffer.c | 21 +++++++++++++++++++++
> lib/intel_batchbuffer.h | 1 +
> 2 files changed, 22 insertions(+)
>
> diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
> index 2cd472d1..ebf3c598 100644
> --- a/lib/intel_batchbuffer.c
> +++ b/lib/intel_batchbuffer.c
> @@ -1558,6 +1558,27 @@ intel_bb_create_with_relocs_and_context(int i915, uint32_t ctx, uint32_t size)
> INTEL_ALLOCATOR_NONE, ALLOC_STRATEGY_NONE);
> }
>
> +/**
> + * intel_bb_create_no_relocs:
> + * @i915: drm fd
> + * @size: size of the batchbuffer
> + *
> + * Creates bb with disabled relocations.
> + * This enables passing addresses and requires pinning objects.
> + *
> + * Returns:
> + *
> + * Pointer the intel_bb, asserts on failure.
> + */
> +struct intel_bb *intel_bb_create_no_relocs(int i915, uint32_t size)
> +{
> + igt_require(gem_uses_full_ppgtt(i915));
> +
> + return __intel_bb_create(i915, 0, size, false, 0, 0,
> + INTEL_ALLOCATOR_SIMPLE,
> + ALLOC_STRATEGY_HIGH_TO_LOW);
> +}
> +
> static void __intel_bb_destroy_relocations(struct intel_bb *ibb)
> {
> uint32_t i;
> diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
> index 75d41ea3..36b6b61d 100644
> --- a/lib/intel_batchbuffer.h
> +++ b/lib/intel_batchbuffer.h
> @@ -526,6 +526,7 @@ intel_bb_create_with_context(int i915, uint32_t ctx, uint32_t size);
> struct intel_bb *intel_bb_create_with_relocs(int i915, uint32_t size);
> struct intel_bb *
> intel_bb_create_with_relocs_and_context(int i915, uint32_t ctx, uint32_t size);
> +struct intel_bb *intel_bb_create_no_relocs(int i915, uint32_t size);
> void intel_bb_destroy(struct intel_bb *ibb);
>
> /* make it safe to use intel_allocator after failed test */
> --
> 2.32.0
>
next prev parent reply other threads:[~2022-04-01 6:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 16:34 [igt-dev] [PATCH i-g-t 0/2] i915/gem_concurrent_all: Add no-reloc Kamil Konieczny
2022-03-31 16:34 ` [igt-dev] [PATCH i-g-t 1/3] lib/intel_batchbuffer: add create without relocs Kamil Konieczny
2022-04-01 6:10 ` Zbigniew Kempczyński [this message]
2022-03-31 16:34 ` [igt-dev] [PATCH i-g-t 2/3] tests/i915/gem_concurrent_all: Add no-reloc capability Kamil Konieczny
2022-04-01 6:13 ` Zbigniew Kempczyński
2022-03-31 16:34 ` [igt-dev] [PATCH i-g-t 3/3] i915/gem_concurrent_all: fix swap subtest group Kamil Konieczny
2022-04-01 6:14 ` Zbigniew Kempczyński
2022-03-31 18:32 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_concurrent_all: Add no-reloc (rev7) Patchwork
2022-03-31 22:56 ` [igt-dev] ✓ Fi.CI.IGT: " 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=YkaXav8Za1AAOl+S@zkempczy-mobl2 \
--to=zbigniew.kempczynski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.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