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 04/14] drm/i915: Inline __i915_gem_request_wait_for_execute()
Date: Tue, 14 Feb 2017 13:32:37 +0200	[thread overview]
Message-ID: <1487071957.3057.15.camel@linux.intel.com> (raw)
In-Reply-To: <20170202151312.31406-4-chris@chris-wilson.co.uk>

On to, 2017-02-02 at 15:13 +0000, Chris Wilson wrote:
> It had only one callsite and existed to keep the code clearer. Now
> having shared the wait-on-error between phases and with plans to change
> the wait-for-execute in the next few patches, remove the out of line
> wait loop and move it into the main body of i915_wait_request.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

<SNIP>

> @@ -1080,7 +1037,30 @@ long i915_wait_request(struct drm_i915_gem_request *req,
>  		add_wait_queue(errq, &reset);
>  
>  	if (!i915_sw_fence_done(&req->execute)) {
> -		timeout = __i915_request_wait_for_execute(req, flags, timeout);
> +		DEFINE_WAIT(exec);
> +
> +		do {
> +			prepare_to_wait(&req->execute.wait, &exec, state);
> +			if (i915_sw_fence_done(&req->execute))
> +				break;
> +
> +			if (flags & I915_WAIT_LOCKED &&
> +			    i915_reset_in_progress(&req->i915->gpu_error)) {
> +				__set_current_state(TASK_RUNNING);
> +				i915_reset(req->i915);

I'm no the expert here, but this reads funnily; "if reset in progress,
do reset".

This was pre-existing code, so;

Reviewed-by: Joonas Lahtinen <joonas.lahtine@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:[~2017-02-14 11:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 15:12 [PATCH 01/14] drm/i915: Keep a global seqno per-engine Chris Wilson
2017-02-02 15:13 ` [PATCH 02/14] drm/i915: Use a local to shorten req->i915->gpu_error.wait_queue Chris Wilson
2017-02-14 11:17   ` Joonas Lahtinen
2017-02-02 15:13 ` [PATCH 03/14] drm/i915: Add ourselves to the gpu error waitqueue for the entire wait Chris Wilson
2017-02-14 11:25   ` Joonas Lahtinen
2017-02-02 15:13 ` [PATCH 04/14] drm/i915: Inline __i915_gem_request_wait_for_execute() Chris Wilson
2017-02-14 11:32   ` Joonas Lahtinen [this message]
2017-02-14 11:55     ` Chris Wilson
2017-02-02 15:13 ` [PATCH 05/14] drm/i915: Deconstruct execute fence Chris Wilson
2017-02-02 15:13 ` [PATCH 06/14] drm/i915: Protect the request->global_seqno with the engine->timeline lock Chris Wilson
2017-02-02 15:13 ` [PATCH 07/14] drm/i915: Take a reference whilst processing the signaler request Chris Wilson
2017-02-02 15:13 ` [PATCH 08/14] drm/i915: Allow an request to be cancelled Chris Wilson
2017-02-02 15:13 ` [PATCH 09/14] drm/i915: Remove the preempted request from the execution queue Chris Wilson
2017-02-02 15:13 ` [PATCH 10/14] drm/i915: Exercise request cancellation using a mock selftest Chris Wilson
2017-02-02 15:13 ` [PATCH 11/14] drm/i915: Replace reset_wait_queue with default_wake_function Chris Wilson
2017-02-02 15:13 ` [PATCH 12/14] drm/i915: Refactor direct GPU reset from request waiters Chris Wilson
2017-02-02 15:13 ` [PATCH 13/14] drm/i915: Immediately process a reset before starting waiting Chris Wilson
2017-02-02 15:13 ` [PATCH 14/14] drm/i915: Remove one level of indention from wait-for-execute Chris Wilson
2017-02-14 11:13 ` [PATCH 01/14] drm/i915: Keep a global seqno per-engine Joonas Lahtinen
2017-02-14 11:57   ` Chris Wilson

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=1487071957.3057.15.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.