From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: John.C.Harrison@Intel.com, Intel-GFX@Lists.FreeDesktop.Org
Cc: devel@driverdev.osuosl.org,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Riley Andrews" <riandrews@android.com>,
"Maarten Lankhorst" <maarten.lankhorst@canonical.com>
Subject: Re: [PATCH 02/13] staging/android/sync: add sync_fence_create_dma
Date: Thu, 17 Dec 2015 09:29:03 -0800 [thread overview]
Message-ID: <5672F0DF.404@virtuousgeek.org> (raw)
In-Reply-To: <1449839521-21958-3-git-send-email-John.C.Harrison@Intel.com>
On 12/11/2015 05:11 AM, John.C.Harrison@Intel.com wrote:
> From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
>
> This allows users of dma fences to create a android fence.
>
> v2: Added kerneldoc. (Tvrtko Ursulin).
>
> v4: Updated comments from review feedback my Maarten.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: devel@driverdev.osuosl.org
> Cc: Riley Andrews <riandrews@android.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Arve Hjønnevåg <arve@android.com>
> ---
> drivers/staging/android/sync.c | 13 +++++++++----
> drivers/staging/android/sync.h | 10 ++++++++++
> 2 files changed, 19 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> index f83e00c..7f0e919 100644
> --- a/drivers/staging/android/sync.c
> +++ b/drivers/staging/android/sync.c
> @@ -188,7 +188,7 @@ static void fence_check_cb_func(struct fence *f, struct fence_cb *cb)
> }
>
> /* TODO: implement a create which takes more that one sync_pt */
> -struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt)
> +struct sync_fence *sync_fence_create_dma(const char *name, struct fence *pt)
> {
> struct sync_fence *fence;
>
> @@ -199,16 +199,21 @@ struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt)
> fence->num_fences = 1;
> atomic_set(&fence->status, 1);
>
> - fence->cbs[0].sync_pt = &pt->base;
> + fence->cbs[0].sync_pt = pt;
> fence->cbs[0].fence = fence;
> - if (fence_add_callback(&pt->base, &fence->cbs[0].cb,
> - fence_check_cb_func))
> + if (fence_add_callback(pt, &fence->cbs[0].cb, fence_check_cb_func))
> atomic_dec(&fence->status);
>
> sync_fence_debug_add(fence);
>
> return fence;
> }
> +EXPORT_SYMBOL(sync_fence_create_dma);
> +
> +struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt)
> +{
> + return sync_fence_create_dma(name, &pt->base);
> +}
> EXPORT_SYMBOL(sync_fence_create);
>
> struct sync_fence *sync_fence_fdget(int fd)
> diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
> index 61f8a3a..afa0752 100644
> --- a/drivers/staging/android/sync.h
> +++ b/drivers/staging/android/sync.h
> @@ -254,6 +254,16 @@ void sync_pt_free(struct sync_pt *pt);
> */
> struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt);
>
> +/**
> + * sync_fence_create_dma() - creates a sync fence from dma-fence
> + * @name: name of fence to create
> + * @pt: dma-fence to add to the fence
> + *
> + * Creates a fence containg @pt. Once this is called, the fence takes
> + * ownership of @pt.
> + */
> +struct sync_fence *sync_fence_create_dma(const char *name, struct fence *pt);
> +
> /*
> * API for sync_fence consumers
> */
>
I've been using this one for awhile, so:
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-12-17 17:36 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 13:11 [PATCH 00/13] Convert requests to use struct fence John.C.Harrison
2015-12-11 13:11 ` [PATCH 01/13] staging/android/sync: Support sync points created from dma-fences John.C.Harrison
2015-12-17 17:32 ` [Intel-gfx] " Jesse Barnes
2015-12-11 13:11 ` [PATCH 02/13] staging/android/sync: add sync_fence_create_dma John.C.Harrison
2015-12-17 17:29 ` Jesse Barnes [this message]
2015-12-11 13:11 ` [PATCH 03/13] staging/android/sync: Move sync framework out of staging John.C.Harrison
2015-12-17 17:35 ` Jesse Barnes
2015-12-21 10:03 ` Daniel Vetter
2015-12-21 14:20 ` John Harrison
2015-12-21 15:46 ` Daniel Vetter
2015-12-22 12:14 ` John Harrison
2015-12-11 13:11 ` [PATCH 04/13] android/sync: Improved debug dump to dmesg John.C.Harrison
2015-12-17 17:36 ` Jesse Barnes
2015-12-11 13:11 ` [PATCH 05/13] drm/i915: Convert requests to use struct fence John.C.Harrison
2015-12-17 17:43 ` Jesse Barnes
2016-01-04 17:20 ` Jesse Barnes
2016-01-04 20:57 ` Chris Wilson
2016-01-04 21:16 ` Jesse Barnes
2016-01-08 21:47 ` Chris Wilson
2016-01-08 21:55 ` Jesse Barnes
2015-12-11 13:11 ` [PATCH 06/13] drm/i915: Removed now redudant parameter to i915_gem_request_completed() John.C.Harrison
2015-12-11 13:11 ` [PATCH 07/13] drm/i915: Add per context timelines to fence object John.C.Harrison
2015-12-17 17:49 ` Jesse Barnes
2015-12-21 10:16 ` Chris Wilson
2015-12-11 13:11 ` [PATCH 08/13] drm/i915: Delay the freeing of requests until retire time John.C.Harrison
2015-12-11 13:11 ` [PATCH 09/13] drm/i915: Interrupt driven fences John.C.Harrison
2015-12-11 15:30 ` John Harrison
2015-12-11 16:07 ` Tvrtko Ursulin
2015-12-11 13:11 ` [PATCH 10/13] drm/i915: Updated request structure tracing John.C.Harrison
2015-12-11 13:11 ` [PATCH 11/13] android/sync: Fix reversed sense of signaled fence John.C.Harrison
2015-12-11 15:57 ` Tvrtko Ursulin
2015-12-14 11:22 ` John Harrison
2015-12-14 12:37 ` Tvrtko Ursulin
2015-12-11 13:12 ` [PATCH 12/13] drm/i915: Add sync framework support to execbuff IOCTL John.C.Harrison
2015-12-11 15:29 ` Tvrtko Ursulin
2015-12-14 11:46 ` John Harrison
2015-12-14 12:23 ` Chris Wilson
2015-12-11 13:12 ` [PATCH 13/13] drm/i915: Cache last IRQ seqno to reduce IRQ overhead John.C.Harrison
2015-12-11 14:28 ` Tvrtko Ursulin
2015-12-14 11:58 ` John Harrison
2015-12-14 12:52 ` Tvrtko Ursulin
2015-12-11 14:55 ` Chris Wilson
2015-12-11 15:35 ` John Harrison
2015-12-11 16:07 ` Chris Wilson
2016-01-08 18:47 ` [PATCH 0/7] Convert requests to use struct fence John.C.Harrison
2016-01-08 18:47 ` [PATCH 1/7] drm/i915: " John.C.Harrison
2016-01-08 21:59 ` Chris Wilson
2016-01-11 19:03 ` John Harrison
2016-01-11 22:41 ` Jesse Barnes
2016-01-08 18:47 ` [PATCH 2/7] drm/i915: Removed now redudant parameter to i915_gem_request_completed() John.C.Harrison
2016-01-11 22:43 ` Jesse Barnes
2016-01-08 18:47 ` [PATCH 3/7] drm/i915: Add per context timelines to fence object John.C.Harrison
2016-01-08 22:05 ` Chris Wilson
2016-01-11 19:03 ` John Harrison
2016-01-11 22:47 ` Jesse Barnes
2016-01-11 22:58 ` Chris Wilson
2016-01-12 11:03 ` John Harrison
2016-01-12 11:26 ` Chris Wilson
2016-01-08 18:47 ` [PATCH 4/7] drm/i915: Delay the freeing of requests until retire time John.C.Harrison
2016-01-08 22:08 ` Chris Wilson
2016-01-11 19:06 ` John Harrison
2016-01-25 11:52 ` Maarten Lankhorst
2016-01-25 12:11 ` Chris Wilson
2016-01-08 18:47 ` [PATCH 5/7] drm/i915: Interrupt driven fences John.C.Harrison
2016-01-08 22:14 ` Chris Wilson
2016-01-09 0:30 ` Chris Wilson
2016-01-08 22:46 ` Chris Wilson
2016-01-11 19:10 ` John Harrison
2016-01-11 23:01 ` Jesse Barnes
2016-01-08 18:47 ` [PATCH 6/7] drm/i915: Updated request structure tracing John.C.Harrison
2016-01-08 22:16 ` Chris Wilson
2016-01-08 18:47 ` [PATCH 7/7] drm/i915: Cache last IRQ seqno to reduce IRQ overhead John.C.Harrison
2016-01-08 22:47 ` [PATCH 0/7] Convert requests to use struct fence Chris Wilson
2016-01-11 19:15 ` John Harrison
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=5672F0DF.404@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=Intel-GFX@Lists.FreeDesktop.Org \
--cc=John.C.Harrison@Intel.com \
--cc=arve@android.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=maarten.lankhorst@canonical.com \
--cc=riandrews@android.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.