All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: Avoid decomposing a signal-on-any fence-array
Date: Mon, 20 Feb 2017 13:12:34 +0100	[thread overview]
Message-ID: <75cb0b97-5f43-0a56-3212-bd7b74db5325@linux.intel.com> (raw)
In-Reply-To: <20170220120336.GF11809@nuc-i3427.alporthouse.com>

Op 20-02-17 om 13:03 schreef Chris Wilson:
> On Mon, Feb 20, 2017 at 01:32:42PM +0200, Joonas Lahtinen wrote:
>> On pe, 2017-02-17 at 18:35 +0000, Chris Wilson wrote:
>>> The code currently assumes that all fence arrays it sees are the normal
>>> signal-on-all variety, and decomposes the array into its individual
>>> fences so that it can extract the native i915 fences. If the fence array
>>> is using signal-on-any, we should not decompose as we must not wait on
>>> them all, just the first in *that* set.
>>>
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> CC: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> <SNIP>
>>
>>> @@ -696,7 +696,8 @@ i915_gem_request_await_dma_fence(struct drm_i915_gem_request *req,
>>>  	if (dma_fence_is_i915(fence))
>>>  		return i915_gem_request_await_request(req, to_request(fence));
>>>  
>>> -	if (!dma_fence_is_array(fence)) {
>>> +	if (!dma_fence_is_array(fence) ||
>>> +	    test_bit(DMA_FENCE_ARRAY_SIGNAL_ANY, &fence->flags)) {
>> Smells like a helper function? While that helper is finding the way
>> upstream;
> Blurgh.
>
> enum dma_fence_array_signal_mode {
>         DMA_FENCE_ARRAY_SIGNAL_ON_ALL = 0,
>         DMA_FENCE_ARRAY_SIGNAL_ON_ANY,
> };
>
> enum dma_fence_array_signal_mode
> dma_fence_array_get_signaling_mode(struct dma_fence_array *array)
> {       
>         return test_bit(DMA_FENCE_ARRAY_SIGNAL_ANY, &array->base.flags) ?
>                 DMA_FENCE_ARRAY_SIGNAL_ON_ANY : DMA_FENCE_ARRAY_SIGNAL_ON_ALL;
> }
>
> if (!dma_fence_is_array(fence) ||
>     dma_fence_array_get_signaling_mode(to_dma_fence_array(fence)) == DMA_FENCE_ARRAY_SIGNAL_ON_ANY)
>
> Hmm. Not happy with that yet.
> -Chris
>
bool dma_fence_array_signal_on_any with a WARN_ON(!dma_fence_is_array(fence))?

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-02-20 12:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 18:35 [PATCH 1/2] dma-fence: Flag when a fence-array is using signal-on-any Chris Wilson
2017-02-17 18:35 ` [PATCH 2/2] drm/i915: Avoid decomposing a signal-on-any fence-array Chris Wilson
2017-02-20 11:32   ` Joonas Lahtinen
2017-02-20 12:03     ` Chris Wilson
2017-02-20 12:12       ` Maarten Lankhorst [this message]
2017-02-21  8:53         ` Joonas Lahtinen
2017-02-17 21:22 ` ✓ Fi.CI.BAT: success for series starting with [1/2] dma-fence: Flag when a fence-array is using signal-on-any Patchwork
2017-02-18  7:41 ` [PATCH 1/2] " Christian König

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=75cb0b97-5f43-0a56-3212-bd7b74db5325@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=tvrtko.ursulin@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 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.