dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Chunming Zhou <david1.zhou-5C7GfCeVMHo@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Jason Ekstrand <jason-fQELhIk9awXprZlt/sZkLg@public.gmane.org>
Subject: Re: [PATCH 2/5] drm: rename null fence to stub fence in syncobj
Date: Thu, 23 Aug 2018 11:10:43 +0200	[thread overview]
Message-ID: <fc36a36b-b37e-6a64-73f5-f66233644ab1@gmail.com> (raw)
In-Reply-To: <20180823082542.2998-2-david1.zhou-5C7GfCeVMHo@public.gmane.org>

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@amd.com>
> Cc: Jason Ekstrand <jason@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);
>   

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-08-23  9:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23  8:25 [PATCH 1/5] drm: fix syncobj null_fence_enable_signaling Chunming Zhou
2018-08-23  8:25 ` [PATCH 2/5] drm: rename null fence to stub fence in syncobj Chunming Zhou
     [not found]   ` <20180823082542.2998-2-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-08-23  9:10     ` Christian König [this message]
2018-08-23  8:25 ` [PATCH 3/5] drm: expand drm_syncobj_find_fence to support timeline point Chunming Zhou
2018-08-23  9:03   ` Christian König
2018-08-23  8:25 ` [PATCH 4/5] drm: expand replace_fence " Chunming Zhou
     [not found]   ` <20180823082542.2998-4-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-08-23  9:06     ` Christian König
     [not found] ` <20180823082542.2998-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-08-23  8:25   ` [PATCH 5/5] drm: add syncobj timeline support v2 Chunming Zhou
     [not found]     ` <20180823082542.2998-5-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-08-23  9:08       ` Daniel Vetter
     [not found]         ` <20180823090819.GA21634-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-08-23  9:30           ` zhoucm1
2018-08-23  9:15       ` Christian König
2018-08-23  9:58         ` zhoucm1
2018-08-23 11:05           ` Christian König
2018-08-23  9:02 ` [PATCH 1/5] drm: fix syncobj null_fence_enable_signaling Christian König
     [not found]   ` <031985ce-bdae-c04d-5fd4-e4ec2416e878-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-08-23  9:04     ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2018-08-29 10:44 Chunming Zhou
     [not found] ` <20180829104434.13265-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-08-29 10:44   ` [PATCH 2/5] drm: rename null fence to stub fence in syncobj Chunming Zhou

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=fc36a36b-b37e-6a64-73f5-f66233644ab1@gmail.com \
    --to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=david1.zhou-5C7GfCeVMHo@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jason-fQELhIk9awXprZlt/sZkLg@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).