Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] i915/gem_exec_schedule: Fill in obj.offset for spinner resubmission
Date: Tue, 16 Apr 2019 16:27:00 +0300	[thread overview]
Message-ID: <87pnpmxeqj.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190416084648.24650-1-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> When resubmitting the spinner, fill in the expected offset so that we
> are not tempted to relocate it across contexts (as the spinner must
> point back to itself for the MI_BB_START to work). In this case, these
> should work correctly as they are reusing the same active vma, but for
> pedagogy we should dtrt.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  tests/i915/gem_exec_schedule.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
> index 29653ae24..6f3f52d20 100644
> --- a/tests/i915/gem_exec_schedule.c
> +++ b/tests/i915/gem_exec_schedule.c
> @@ -223,12 +223,9 @@ static void independent(int fd, unsigned int engine)
>  		if (spin == NULL) {
>  			spin = __igt_spin_batch_new(fd, .engine = other);
>  		} else {
> -			struct drm_i915_gem_exec_object2 obj = {
> -				.handle = spin->handle,
> -			};
>  			struct drm_i915_gem_execbuffer2 eb = {
>  				.buffer_count = 1,
> -				.buffers_ptr = to_user_pointer(&obj),
> +				.buffers_ptr = to_user_pointer(&spin->obj[1]),
>  				.flags = other,
>  			};
>  			gem_execbuf(fd, &eb);
> @@ -621,12 +618,9 @@ static igt_spin_t *__noise(int fd, uint32_t ctx, int prio, igt_spin_t *spin)
>  						    .ctx = ctx,
>  						    .engine = other);
>  		} else {
> -			struct drm_i915_gem_exec_object2 obj = {
> -				.handle = spin->handle,
> -			};
>  			struct drm_i915_gem_execbuffer2 eb = {
>  				.buffer_count = 1,
> -				.buffers_ptr = to_user_pointer(&obj),
> +				.buffers_ptr = to_user_pointer(&spin->obj[1]),
>  				.rsvd1 = ctx,
>  				.flags = other,
>  			};
> -- 
> 2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2019-04-16 13:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16  8:46 [PATCH i-g-t] i915/gem_exec_schedule: Fill in obj.offset for spinner resubmission Chris Wilson
2019-04-16  9:24 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-04-16 11:40 ` ✓ Fi.CI.IGT: " Patchwork
2019-04-16 13:27 ` Mika Kuoppala [this message]

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=87pnpmxeqj.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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