public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 2/6] i915/gem_ctx_shared: Prebind both context images
Date: Tue, 3 Sep 2019 18:25:06 +0300	[thread overview]
Message-ID: <20190903152451.GA22095@intel.intel> (raw)
In-Reply-To: <20190902041548.14919-2-chris@chris-wilson.co.uk>

Hi Chris,

On Mon, Sep 02, 2019 at 05:15:44AM +0100, Chris Wilson wrote:
> If we are using an aliasing-ppgtt, the context images are in the same
> virtual address space as our target objects. We have to be careful that
> cloning and using a new context does not evict our unreferenced target
> object. To avoid that, we first bind both context images while creating
> the hole in the address space to ensure that the hole is still available
> later on.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/i915/gem_ctx_shared.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
> index b073bdfc9..c9e7b8a1a 100644
> --- a/tests/i915/gem_ctx_shared.c
> +++ b/tests/i915/gem_ctx_shared.c
> @@ -191,6 +191,7 @@ static void exec_shared_gtt(int i915, unsigned int ring)
>  		.buffer_count = 1,
>  		.flags = ring,
>  	};
> +	uint32_t clone;
>  	uint32_t scratch, *s;
>  	uint32_t batch, cs[16];
>  	uint64_t offset;
> @@ -199,13 +200,18 @@ static void exec_shared_gtt(int i915, unsigned int ring)
>  	gem_require_ring(i915, ring);
>  	igt_require(gem_can_store_dword(i915, ring));
>  
> +	clone = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
> +
>  	/* Find a hole big enough for both objects later */
> -	scratch = gem_create(i915, 16384);
> +	scratch = gem_create(i915, 64<<10);

I guess this is a leftover, right?

Reviewed-by: Andi Shyti <andi.shyti@intel.com>

Andi
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-09-03 15:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02  4:15 [igt-dev] [PATCH i-g-t 1/6] lib: Fix gem_measure_ring_inflight Chris Wilson
2019-09-02  4:15 ` [igt-dev] [PATCH i-g-t 2/6] i915/gem_ctx_shared: Prebind both context images Chris Wilson
2019-09-03 15:25   ` Andi Shyti [this message]
2019-09-02  4:15 ` [igt-dev] [PATCH i-g-t 3/6] i915/gem_tiled_swapped: Tweak mlocked size Chris Wilson
2019-09-03 15:32   ` Andi Shyti
2019-09-03 19:31   ` [igt-dev] [PATCH i-g-t] i915/gem_tiled_swapping: " Chris Wilson
2019-09-04  6:47     ` Andi Shyti
2019-09-02  4:15 ` [igt-dev] [PATCH i-g-t 4/6] Add i915/gem_ctx_persistence Chris Wilson
2019-09-03 17:50   ` Andi Shyti
2019-09-02  4:15 ` [Intel-gfx] [PATCH i-g-t 5/6] i915/gem_mocs_settings: Fudge gen11:vcs2 mocs register base Chris Wilson
2019-09-02  4:15 ` [igt-dev] [PATCH i-g-t 6/6] i915/gem_exec_balancer: Beware the migratory fence Chris Wilson
2019-09-02  4:49 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] lib: Fix gem_measure_ring_inflight Patchwork
2019-09-02  6:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-09-03 12:53 ` [igt-dev] [PATCH i-g-t 1/6] " Andi Shyti
2019-09-03 20:06 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] lib: Fix gem_measure_ring_inflight (rev2) Patchwork
2019-09-03 23:10 ` [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=20190903152451.GA22095@intel.intel \
    --to=andi.shyti@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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: 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