[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <577BA77D.2020504@amd.com>
Date: Tue, 5 Jul 2016 14:26:37 +0200
From: Christian König <christian.koenig@....com>
To: Gustavo Padovan <gustavo@...ovan.org>,
<dri-devel@...ts.freedesktop.org>
CC: <linux-kernel@...r.kernel.org>,
Daniel Stone <daniels@...labora.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Rob Clark <robdclark@...il.com>,
"Greg Hackmann" <ghackmann@...gle.com>,
John Harrison <John.C.Harrison@...el.com>,
<laurent.pinchart@...asonboard.com>, <seanpaul@...gle.com>,
<marcheu@...gle.com>, <m.chehab@...sung.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Gustavo Padovan <gustavo.padovan@...labora.co.uk>,
Chris Wilson <chris@...is-wilson.co.uk>
Subject: Re: [PATCH v3 1/4] dma-buf/fence-array: add fence_is_array()
Am 05.07.2016 um 01:57 schrieb Gustavo Padovan:
> From: Gustavo Padovan <gustavo.padovan@...labora.co.uk>
>
> Add helper to check if fence is array.
>
> v2: Comments from Chris Wilson
> - remove ternary if from ops comparison
> - add EXPORT_SYMBOL(fence_array_ops)
>
> Cc: Chris Wilson <chris@...is-wilson.co.uk>
> Cc: Christian König <christian.koenig@....com>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@...labora.co.uk>
> Reviewed-by: Chris Wilson <chris@...is-wilson.co.uk>
For this patch Reviewed-by: Christian König <christian.koenig@....com>.
I'm not deep enough into the sync file code to fully judge, but the
remaining patches look good to me as well.
So for patch #2-#4 Acked-by: Christian König <christian.koenig@....com>.
Regards,
Christian.
> ---
> drivers/dma-buf/fence-array.c | 1 +
> include/linux/fence-array.h | 10 ++++++++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/drivers/dma-buf/fence-array.c b/drivers/dma-buf/fence-array.c
> index a8731c8..ee50022 100644
> --- a/drivers/dma-buf/fence-array.c
> +++ b/drivers/dma-buf/fence-array.c
> @@ -99,6 +99,7 @@ const struct fence_ops fence_array_ops = {
> .wait = fence_default_wait,
> .release = fence_array_release,
> };
> +EXPORT_SYMBOL(fence_array_ops);
>
> /**
> * fence_array_create - Create a custom fence array
> diff --git a/include/linux/fence-array.h b/include/linux/fence-array.h
> index 86baaa4..a44794e 100644
> --- a/include/linux/fence-array.h
> +++ b/include/linux/fence-array.h
> @@ -52,6 +52,16 @@ struct fence_array {
> extern const struct fence_ops fence_array_ops;
>
> /**
> + * fence_is_array - check if a fence is from the array subsclass
> + *
> + * Return true if it is a fence_array and false otherwise.
> + */
> +static inline bool fence_is_array(struct fence *fence)
> +{
> + return fence->ops == &fence_array_ops;
> +}
> +
> +/**
> * to_fence_array - cast a fence to a fence_array
> * @fence: fence to cast to a fence_array
> *
Powered by blists - more mailing lists