Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Matthew Auld <matthew.auld@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/selftests: add igt_vma_move_to_active_unlocked
Date: Mon, 24 Oct 2022 17:08:33 +0200	[thread overview]
Message-ID: <Y1aqcQj/XtTry2M3@ashyti-mobl2.lan> (raw)
In-Reply-To: <636ac83a-a3d5-b313-0f28-8ad5f4df2630@intel.com>

Hi Andrzej,

On Mon, Oct 24, 2022 at 04:05:57PM +0200, Andrzej Hajda wrote:
> On 21.10.2022 17:39, Andi Shyti wrote:
> > Hi Andrzej,
> > 
> > [...]
> > 
> > > +static inline int __must_check
> > > +igt_vma_move_to_active_unlocked(struct i915_vma *vma, struct i915_request *rq,
> > > +				unsigned int flags)
> > > +{
> > > +	int err;
> > > +
> > > +	i915_vma_lock(vma);
> > > +	err = _i915_vma_move_to_active(vma, rq, &rq->fence, flags);
> > > +	i915_vma_unlock(vma);
> > > +	return err;
> > > +}
> > > +
> > 
> > there are calls to i915_vma_move_to_active also outside
> > selftests, why not having a i915_move_to_active_unlocked() in
> > i915_vma.h?
> 
> As I said before, Chris suggested real users of this call should use locking
> explicitly.

Yeah, sure... I was just thinking about it... no big opinion,
besides I don't hink my proposal in Patch 1 makes things easier.

> > Besides here you break also the bisect, because between patch 1
> > and 2 the i915_move_to_avtive would also call
> > i915_request_await_object(). Right or am I getting confused?
> 
> Hmm, looking at v2, I do not see breakage. Patch 1 moves all occurrences of
> i915_request_await_object inside i915_vma_move_to_active.
> Patch 2, just replaces sequence of calls with call to new helper.

Are you sure?

I might be getting confused, but in Patch 1
"i915_vma_move_to_active()" takes "i915_request_await_object()"
inside. This affects all the calls to "i915_vma_move_to_active()"
in the selftests that are not actually requesting
"i915_request_await_object()".

We need to wait for Patch 2 in order to have a local redefinition
of "i915_vma_move_to_active()" for those selftests.

Andi

  reply	other threads:[~2022-10-24 15:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 13:29 [Intel-gfx] [PATCH 0/2] drm/i915: refactor 915_vma_move_to_active Andrzej Hajda
2022-10-13 13:30 ` [Intel-gfx] [PATCH 1/2] drm/i915: add wait and lock to i915_vma_move_to_active Andrzej Hajda
2022-10-13 14:00   ` Tvrtko Ursulin
2022-10-21 15:51   ` Andi Shyti
2022-10-24 13:45     ` Andrzej Hajda
2022-10-13 13:30 ` [Intel-gfx] [PATCH 2/2] drm/i915/selftests: add igt_vma_move_to_active_unlocked Andrzej Hajda
2022-10-21 15:39   ` Andi Shyti
2022-10-24 14:05     ` Andrzej Hajda
2022-10-24 15:08       ` Andi Shyti [this message]
2022-10-28 13:42         ` Andrzej Hajda
2022-10-13 15:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: refactor 915_vma_move_to_active Patchwork
2022-10-13 17:24 ` [Intel-gfx] ✗ 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=Y1aqcQj/XtTry2M3@ashyti-mobl2.lan \
    --to=andi.shyti@linux.intel.com \
    --cc=andrzej.hajda@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.auld@intel.com \
    --cc=rodrigo.vivi@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