All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>, intel-gfx@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Subject: Re: [PATCH 1/3] android: add sync_fence_create_dma
Date: Wed, 14 Jan 2015 14:09:56 +0000	[thread overview]
Message-ID: <54B678B4.4020401@linux.intel.com> (raw)
In-Reply-To: <1417636147-29664-2-git-send-email-jbarnes@virtuousgeek.org>


Hi,

On 12/03/2014 07:49 PM, Jesse Barnes wrote:
> From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
>
> This allows users of dma fences to create a android fence.

I couldn't figure out the motivation here vs. just exporting 
sync_fence_create ?

Regards,

Tvrtko

> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> ---
>   drivers/staging/android/sync.c | 13 +++++++++----
>   drivers/staging/android/sync.h |  3 ++-
>   2 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> index 7bdb62b..0ee333e 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 a21b79f..50052e4 100644
> --- a/drivers/staging/android/sync.h
> +++ b/drivers/staging/android/sync.h
> @@ -250,8 +250,9 @@ void sync_pt_free(struct sync_pt *pt);
>    * @pt:		sync_pt to add to the fence
>    *
>    * Creates a fence containg @pt.  Once this is called, the fence takes
> - * ownership of @pt.
> + * a reference on @pt.
>    */
> +struct sync_fence *sync_fence_create_dma(const char *name, struct fence *pt);
>   struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt);
>
>   /*
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-01-14 14:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03 19:49 [RFC] Updated Android sync patches Jesse Barnes
2014-12-03 19:49 ` [PATCH 1/3] android: add sync_fence_create_dma Jesse Barnes
2015-01-14 14:09   ` Tvrtko Ursulin [this message]
2015-01-14 16:04     ` Maarten Lankhorst
2014-12-03 19:49 ` [PATCH 2/3] drm/i915: Android sync points for i915 v3 Jesse Barnes
2014-12-03 21:29   ` Maarten Lankhorst
2014-12-04  8:10   ` Chris Wilson
2014-12-04  9:03     ` Chris Wilson
2014-12-04 11:21   ` Daniel Vetter
2014-12-04 14:57     ` Jesse Barnes
2014-12-03 19:49 ` [PATCH 3/3] drm/i915: add fences to the request struct Jesse Barnes
2014-12-04  9:13   ` Chris Wilson
2014-12-04 11:05     ` Daniel Vetter
2014-12-04 11:29       ` Chris Wilson
2014-12-04 12:58         ` Daniel Vetter

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=54B678B4.4020401@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=maarten.lankhorst@canonical.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.