[PATCH 2/5] drm: rename null fence to stub fence in syncobj

Christian König ckoenig.leichtzumerken at gmail.com
Thu Aug 23 09:10:43 UTC 2018


Am 23.08.2018 um 10:25 schrieb Chunming Zhou:
> stub fence will be used by timeline syncobj as well.

Mhm, I'm leaning a bit towards renaming it but "null" fence or "stub" 
fence doesn't make a large difference to me.

Point is that it is a fence which is always signaled right from the 
beginning.

So any name which describes that would be welcome.

Christian.

>
> Signed-off-by: Chunming Zhou <david1.zhou at amd.com>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> ---
>   drivers/gpu/drm/drm_syncobj.c | 20 ++++++++++----------
>   1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
> index d17ed75ac7e2..d4b48fb410a1 100644
> --- a/drivers/gpu/drm/drm_syncobj.c
> +++ b/drivers/gpu/drm/drm_syncobj.c
> @@ -172,37 +172,37 @@ void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,
>   }
>   EXPORT_SYMBOL(drm_syncobj_replace_fence);
>   
> -struct drm_syncobj_null_fence {
> +struct drm_syncobj_stub_fence {
>   	struct dma_fence base;
>   	spinlock_t lock;
>   };
>   
> -static const char *drm_syncobj_null_fence_get_name(struct dma_fence *fence)
> +static const char *drm_syncobj_stub_fence_get_name(struct dma_fence *fence)
>   {
> -        return "syncobjnull";
> +        return "syncobjstub";
>   }
>   
> -static bool drm_syncobj_null_fence_enable_signaling(struct dma_fence *fence)
> +static bool drm_syncobj_stub_fence_enable_signaling(struct dma_fence *fence)
>   {
>       return !dma_fence_is_signaled(fence);
>   }
>   
> -static const struct dma_fence_ops drm_syncobj_null_fence_ops = {
> -	.get_driver_name = drm_syncobj_null_fence_get_name,
> -	.get_timeline_name = drm_syncobj_null_fence_get_name,
> -	.enable_signaling = drm_syncobj_null_fence_enable_signaling,
> +static const struct dma_fence_ops drm_syncobj_stub_fence_ops = {
> +	.get_driver_name = drm_syncobj_stub_fence_get_name,
> +	.get_timeline_name = drm_syncobj_stub_fence_get_name,
> +	.enable_signaling = drm_syncobj_stub_fence_enable_signaling,
>   	.release = NULL,
>   };
>   
>   static int drm_syncobj_assign_null_handle(struct drm_syncobj *syncobj)
>   {
> -	struct drm_syncobj_null_fence *fence;
> +	struct drm_syncobj_stub_fence *fence;
>   	fence = kzalloc(sizeof(*fence), GFP_KERNEL);
>   	if (fence == NULL)
>   		return -ENOMEM;
>   
>   	spin_lock_init(&fence->lock);
> -	dma_fence_init(&fence->base, &drm_syncobj_null_fence_ops,
> +	dma_fence_init(&fence->base, &drm_syncobj_stub_fence_ops,
>   		       &fence->lock, 0, 0);
>   	dma_fence_signal(&fence->base);
>   



More information about the dri-devel mailing list