All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 07/15] drm/i915: Hold a reference on the request for its fence chain
Date: Fri, 25 Nov 2016 12:31:03 +0200	[thread overview]
Message-ID: <1480069863.2828.4.camel@linux.intel.com> (raw)
In-Reply-To: <20161125093057.18491-8-chris@chris-wilson.co.uk>

On pe, 2016-11-25 at 09:30 +0000, Chris Wilson wrote:
> Currently, we have an active reference for the request until it is
> retired. Though it cannot be retired before it has been executed by
> hardware, the request may be completed before we have finished
> processing the execute fence, i.e. we may continue to process that fence
> as we free the request.
> 
> Fixes: 5590af3e115a ("drm/i915: Drive request submission through fence callbacks")
> Fixes: 23902e49c999 ("drm/i915: Split request submit/execute phase into two")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

<SNIP>

> @@ -551,8 +569,10 @@ i915_gem_request_alloc(struct intel_engine_cs *engine,
>  		       req->timeline->fence_context,
>  		       __timeline_get_seqno(req->timeline->common));
>  
> -	i915_sw_fence_init(&req->submit, submit_notify);
> -	i915_sw_fence_init(&req->execute, execute_notify);
> +	/* We bump the ref for the fence chain */
> +	i915_sw_fence_init(&i915_gem_request_get(req)->submit, submit_notify);
> +	i915_sw_fence_init(&i915_gem_request_get(req)->execute, execute_notify);

I think having the gem_request_get in a separate line before fence_init
and remove the comment. Make the code speak for itself instead of
camouflaging it. Now it looks much like a type conversion helper.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-11-25 10:31 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25  9:30 GuC vs multiple timelines Chris Wilson
2016-11-25  9:30 ` [PATCH 01/15] drm: Hold mode_config.lock to prevent hotplug whilst setting up crtcs Chris Wilson
2016-11-25  9:30 ` [PATCH 02/15] drm: Pull together probe + setup for drm_fb_helper Chris Wilson
2016-11-25  9:30 ` [PATCH 03/15] drm: Protect fb_helper list manipulation with a mutex Chris Wilson
2016-11-25  9:30 ` [PATCH 04/15] drm/i915/perf: Wrap 64bit divides in do_div() Chris Wilson
2016-11-25  9:30 ` [PATCH 05/15] drm/i915: Add is-completed assert to request retire entrypoint Chris Wilson
2016-11-25 10:36   ` Joonas Lahtinen
2016-11-25  9:30 ` [PATCH 06/15] drm/i915: Assert no external observers when unwind a failed request alloc Chris Wilson
2016-11-25 10:39   ` Joonas Lahtinen
2016-11-25 11:27     ` Chris Wilson
2016-11-25  9:30 ` [PATCH 07/15] drm/i915: Hold a reference on the request for its fence chain Chris Wilson
2016-11-25 10:31   ` Joonas Lahtinen [this message]
2016-11-25 10:46     ` Chris Wilson
2016-11-25  9:30 ` [PATCH 08/15] drm/i915: Integrate i915_sw_fence with debugobjects Chris Wilson
2016-11-25 10:24   ` Joonas Lahtinen
2016-11-25  9:30 ` [PATCH 09/15] drm/i915: Enable swfence debugobject support for i915.ko Chris Wilson
2016-11-25 10:32   ` Joonas Lahtinen
2016-11-25  9:30 ` [PATCH 10/15] HAX drm/i915: Enable guc submission Chris Wilson
2016-11-25  9:30 ` [PATCH 11/15] drm/i915: Trim i915_guc_info() stack usage Chris Wilson
2016-11-28 11:15   ` Tvrtko Ursulin
2016-11-28 11:35     ` Chris Wilson
2016-11-28 12:17       ` Tvrtko Ursulin
2016-11-25  9:30 ` [PATCH 12/15] drm/i915/guc: Rename client->cookie to match use Chris Wilson
2016-11-28 11:37   ` Tvrtko Ursulin
2016-11-25  9:30 ` [PATCH 13/15] drm/i915/guc: Initialise doorbell cookie to matching value Chris Wilson
2016-11-28 12:09   ` Tvrtko Ursulin
2016-11-28 12:18     ` Chris Wilson
2016-11-25  9:30 ` [PATCH 14/15] drm/i915/guc: Keep the execbuf client allocated across reset Chris Wilson
2016-11-28 13:49   ` Tvrtko Ursulin
2016-11-28 14:11     ` Chris Wilson
2016-11-28 15:44       ` Tvrtko Ursulin
2016-11-28 16:01         ` Chris Wilson
2016-11-25  9:30 ` [PATCH 15/15] drm/i915/guc: Split hw submission for replay after GPU reset Chris Wilson
2016-11-28 14:02   ` Tvrtko Ursulin
2016-11-28 14:19     ` Chris Wilson
2016-11-28 15:20       ` Mika Kuoppala
2016-11-28 15:55       ` Tvrtko Ursulin
2016-11-28 16:06         ` Chris Wilson
2016-11-25 10:16 ` ✗ Fi.CI.BAT: warning for series starting with [01/15] drm: Hold mode_config.lock to prevent hotplug whilst setting up crtcs 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=1480069863.2828.4.camel@linux.intel.com \
    --to=joonas.lahtinen@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.