All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 1/2] dma-fence: Flag when a fence-array is using signal-on-any
Date: Sat, 18 Feb 2017 08:41:39 +0100	[thread overview]
Message-ID: <898a24a1-d48f-6371-9f29-dc7a58d20701@amd.com> (raw)
In-Reply-To: <20170217183536.26100-1-chris@chris-wilson.co.uk>

Am 17.02.2017 um 19:35 schrieb Chris Wilson:
> Indicate that the fence array will be signaled on the first completion
> (signal-on-any mode) as opposed to waiting for all to be signaled.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: Gustavo Padovan <gustavo@padovan.org>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: "Christian König" <christian.koenig@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/dma-buf/dma-fence-array.c | 3 +++
>   include/linux/dma-fence-array.h   | 4 ++++
>   2 files changed, 7 insertions(+)
>
> diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence-array.c
> index 67eb7c8fb88c..8c48402a2daa 100644
> --- a/drivers/dma-buf/dma-fence-array.c
> +++ b/drivers/dma-buf/dma-fence-array.c
> @@ -137,6 +137,9 @@ struct dma_fence_array *dma_fence_array_create(int num_fences,
>   	dma_fence_init(&array->base, &dma_fence_array_ops, &array->lock,
>   		       context, seqno);
>   
> +	if (num_fences > 1 && signal_on_any)
> +		__set_bit(DMA_FENCE_ARRAY_SIGNAL_ANY, &array->base.flags);
> +
>   	array->num_fences = num_fences;
>   	atomic_set(&array->num_pending, signal_on_any ? 1 : num_fences);
>   	array->fences = fences;
> diff --git a/include/linux/dma-fence-array.h b/include/linux/dma-fence-array.h
> index 5900945f962d..4270d33d05b3 100644
> --- a/include/linux/dma-fence-array.h
> +++ b/include/linux/dma-fence-array.h
> @@ -49,6 +49,10 @@ struct dma_fence_array {
>   	struct dma_fence **fences;
>   };
>   
> +enum {
> +	DMA_FENCE_ARRAY_SIGNAL_ANY = DMA_FENCE_FLAG_USER_BITS,
> +};
> +
>   extern const struct dma_fence_ops dma_fence_array_ops;
>   
>   /**


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

      parent reply	other threads:[~2017-02-18  7:41 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       ` [Intel-gfx] " Maarten Lankhorst
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 ` Christian König [this message]

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=898a24a1-d48f-6371-9f29-dc7a58d20701@amd.com \
    --to=christian.koenig@amd.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --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.