From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Prevent use of global_seqno=0
Date: Mon, 21 Jan 2019 11:00:50 +0200 [thread overview]
Message-ID: <87womymlkt.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190119143024.26971-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> We are not allowed to assign rq->global_seqno=0 as it has a special
> meaning of "inactive" (not executing on HW).
>
> Fixes: 6faf5916e6be ("drm/i915: Remove HW semaphores for gen7 inter-engine synchronisation")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_request.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index 5403d4e2cee0..5e178f5ac18b 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -343,6 +343,13 @@ static void move_to_timeline(struct i915_request *request,
> spin_unlock(&request->timeline->lock);
> }
>
> +static u32 next_global_seqno(struct i915_timeline *tl)
> +{
> + if (!++tl->seqno)
> + ++tl->seqno;
> + return tl->seqno;
> +}
> +
> void __i915_request_submit(struct i915_request *request)
> {
> struct intel_engine_cs *engine = request->engine;
> @@ -359,7 +366,7 @@ void __i915_request_submit(struct i915_request *request)
>
> GEM_BUG_ON(request->global_seqno);
>
> - seqno = timeline_get_seqno(&engine->timeline);
> + seqno = next_global_seqno(&engine->timeline);
Does it matter that we will allow dma fence to be
with seqno zero?
In other words, if we keep the global seqnos and timeline
seqnos 'type similar' for readability reasons, should
we enforce the 'not zero' in here too.
Dma fence code seems to handle 32bits seqnos
even tho the type is 64bit wide.
-Mika
> GEM_BUG_ON(!seqno);
> GEM_BUG_ON(intel_engine_signaled(engine, seqno));
>
> --
> 2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-01-21 9:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-19 14:30 [PATCH] drm/i915: Prevent use of global_seqno=0 Chris Wilson
2019-01-19 15:12 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-01-19 16:33 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-21 9:00 ` Mika Kuoppala [this message]
2019-01-21 9:10 ` [PATCH] " Chris Wilson
2019-01-21 9:15 ` Mika Kuoppala
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=87womymlkt.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.