public inbox for amd-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Nicolai Hähnle" <nhaehnle-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
Subject: Re: [PATCH 5/6] drm/amdgpu: add timeline support in amdgpu CS
Date: Wed, 26 Sep 2018 11:06:04 +0200	[thread overview]
Message-ID: <3577a9cb-dd33-6014-eb01-248af91df97f@gmail.com> (raw)
In-Reply-To: <20180920110353.16114-5-david1.zhou-5C7GfCeVMHo@public.gmane.org>

Hey Chunming,

On 20.09.2018 13:03, Chunming Zhou wrote:
> @@ -1113,48 +1117,91 @@ static int amdgpu_syncobj_lookup_and_add_to_sync(struct amdgpu_cs_parser *p,
>   }
>   
>   static int amdgpu_cs_process_syncobj_in_dep(struct amdgpu_cs_parser *p,
> -					    struct amdgpu_cs_chunk *chunk)
> +					    struct amdgpu_cs_chunk *chunk,
> +					    bool timeline)
>   {
>   	unsigned num_deps;
>   	int i, r;
> -	struct drm_amdgpu_cs_chunk_sem *deps;
>   
> -	deps = (struct drm_amdgpu_cs_chunk_sem *)chunk->kdata;
> -	num_deps = chunk->length_dw * 4 /
> -		sizeof(struct drm_amdgpu_cs_chunk_sem);
> +	if (!timeline) {
> +		struct drm_amdgpu_cs_chunk_sem *deps;
>   
> -	for (i = 0; i < num_deps; ++i) {
> -		r = amdgpu_syncobj_lookup_and_add_to_sync(p, deps[i].handle);
> +		deps = (struct drm_amdgpu_cs_chunk_sem *)chunk->kdata;
> +		num_deps = chunk->length_dw * 4 /
> +			sizeof(struct drm_amdgpu_cs_chunk_sem);
> +		for (i = 0; i < num_deps; ++i) {
> +			r = amdgpu_syncobj_lookup_and_add_to_sync(p, deps[i].handle,
> +								  0, 0);
>   		if (r)
>   			return r;

The indentation looks wrong.


> +		}
> +	} else {
> +		struct drm_amdgpu_cs_chunk_syncobj *syncobj_deps;
> +
> +		syncobj_deps = (struct drm_amdgpu_cs_chunk_syncobj *)chunk->kdata;
> +		num_deps = chunk->length_dw * 4 /
> +			sizeof(struct drm_amdgpu_cs_chunk_syncobj);
> +		for (i = 0; i < num_deps; ++i) {
> +			r = amdgpu_syncobj_lookup_and_add_to_sync(p, syncobj_deps[i].handle,
> +								  syncobj_deps[i].point,
> +								  syncobj_deps[i].flags);
> +		if (r)
> +			return r;

Here as well.

So I'm wondering a bit about this uapi. Specifically, what happens if 
you try to use timeline syncobjs here as dependencies _without_ 
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT?

My understanding is, it'll just return -EINVAL without any indication as 
to which syncobj actually failed. What's the caller supposed to do then?

Cheers,
Nicolai
-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-09-26  9:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 11:03 [PATCH 1/6] drm: add flags to drm_syncobj_find_fence Chunming Zhou
     [not found] ` <20180920110353.16114-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-09-20 11:03   ` [PATCH 2/6] drm: add syncobj timeline support v8 Chunming Zhou
     [not found]     ` <20180920110353.16114-2-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-09-20 11:08       ` Christian König
2018-09-20 11:03   ` [PATCH 3/6] drm: add support of syncobj timeline point wait v2 Chunming Zhou
2018-09-20 11:11     ` Christian König
2018-09-21  7:15       ` Zhou, David(ChunMing)
2018-09-21  7:21         ` Christian König
     [not found]     ` <20180920110353.16114-3-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-09-25  9:22       ` Jason Ekstrand
     [not found]         ` <CAOFGe96fXDQ8Q1piYCWhn2Z8ToOmf1JXyu+2YgUWYbMLCX7nzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-25  9:49           ` Christian König
2018-10-08  5:53             ` Zhou, David(ChunMing)
2018-10-08 17:53               ` Jason Ekstrand
2018-09-20 11:03   ` [PATCH 4/6] drm: add timeline syncobj payload query ioctl Chunming Zhou
     [not found]     ` <20180920110353.16114-4-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-09-24 10:14       ` Christian König
2018-09-20 11:03   ` [PATCH 5/6] drm/amdgpu: add timeline support in amdgpu CS Chunming Zhou
2018-09-24 10:25     ` Christian König
     [not found]     ` <20180920110353.16114-5-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-09-26  8:44       ` Nicolai Hähnle
     [not found]         ` <c5c3e0c6-1f6d-e3a3-f9bb-0c7cef10b0f5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-08  3:45           ` Zhou, David(ChunMing)
2018-09-26  9:06       ` Nicolai Hähnle [this message]
     [not found]         ` <3577a9cb-dd33-6014-eb01-248af91df97f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-08  3:38           ` Zhou, David(ChunMing)
2018-09-20 11:03   ` [PATCH 6/6] drm/amdgpu: update version for timeline syncobj support in amdgpu Chunming Zhou
2018-09-20 11:05 ` [PATCH 1/6] drm: add flags to drm_syncobj_find_fence Christian König
  -- strict thread matches above, loose matches on Subject: below --
2018-09-19  9:04 Chunming Zhou
     [not found] ` <20180919090407.24111-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-09-19  9:04   ` [PATCH 5/6] drm/amdgpu: add timeline support in amdgpu CS 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=3577a9cb-dd33-6014-eb01-248af91df97f@gmail.com \
    --to=nhaehnle-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=david1.zhou-5C7GfCeVMHo@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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