All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhoucm1 <david1.zhou-5C7GfCeVMHo@public.gmane.org>
To: "Dave Airlie" <airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Christian König"
	<deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
Cc: "amd-gfx mailing list"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"Marek Olšák" <maraeo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 3/3] drm/amdgpu: add FENCE_TO_HANDLE ioctl that returns syncobj or sync_file
Date: Thu, 14 Sep 2017 10:26:32 +0800	[thread overview]
Message-ID: <5264b020-c850-2765-d0d7-dc49d96815cf@amd.com> (raw)
In-Reply-To: <8a800613-07ce-b417-8a1e-0db5a2e31758-5C7GfCeVMHo@public.gmane.org>



On 2017年09月14日 10:07, zhoucm1 wrote:
>
>
> On 2017年09月14日 09:52, Dave Airlie wrote:
>> On 14 September 2017 at 00:16, Christian König 
>> <deathsimple@vodafone.de> wrote:
>>> Am 13.09.2017 um 16:06 schrieb Marek Olšák:
>>>> On Wed, Sep 13, 2017 at 3:46 PM, Zhou, David(ChunMing)
>>>> <David1.Zhou@amd.com> wrote:
>>>>> For android using mesa instance, egl draw will dequeue an android 
>>>>> buffer,
>>>>> after egl draw, the buffer will back to android bufffer queue, but 
>>>>> need
>>>>> append a syncfile fd. If getting syncfile fd for every egl draw 
>>>>> always
>>>>> needs
>>>>> several syncobj ioctls, the io overhead isn't small. But if we 
>>>>> directly
>>>>> return syncfile when egl draw CS,  isn't it better?
>>>> You have a good point. I'd be OK with either approach, or even with
>>>> having both options in the kernel.
>>>
>>> I don't have a strong opinion for the CS IOCTL either. If it saves 
>>> us an
>>> extra IOCTL when we directly return a syncfile fd then why not?
>>>
>>> But we really shouldn't use syncfile for the VA IOCTL. That's 
>>> nothing we
>>> want to share with other processes and the returned fence or 
>>> sequence needs
>>> to be lightweight.
>>>
>>> Ideally I would say it should be a sequence number, so that you can say
>>> max(seq1, seq2) and always have the latest.
>>>
>>> The next best approach I think would be to use syncobj, cause it is 
>>> simply
>>> rather easily to implement.
>> I'd go with not returning fd's by default, it's a bad use of a 
>> limited resource,
>> creating fd's should happen on giving the object to another process 
>> or API.
>>
>> However having an optional chunk or flag to say this ioctl will 
>> return an
>> android sync fd if asked is fine with me, if is usually returns a 
>> syncobj.
> OK, that means we return fd only when UMD ask, right?
> I will send V2.
But think a bit more, if not by default, that isn't meaningful, we can 
continue to use seq_no base fence and Marek's syncfile fd approach.

Regards,
David Zhou
>
>
> Thanks all.
> David Zhou
>>
>> Dave.
>

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

  parent reply	other threads:[~2017-09-14  2:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12 20:42 [PATCH 1/3] drm/syncobj: extract two helpers from drm_syncobj_create Marek Olšák
2017-09-12 20:42 ` [PATCH 3/3] drm/amdgpu: add FENCE_TO_HANDLE ioctl that returns syncobj or sync_file Marek Olšák
     [not found]   ` <1505248934-1819-3-git-send-email-maraeo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-13  3:03     ` zhoucm1
2017-09-13  6:57       ` Christian König
     [not found]         ` <10bed18c-f41b-5570-c299-2be190767a20-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-09-13  7:03           ` zhoucm1
2017-09-13  7:09             ` Christian König
     [not found]               ` <a6c564e8-fe75-0e05-d267-e6dc7255b4af-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-09-13  7:39                 ` zhoucm1
2017-09-13  8:07                   ` Christian König
     [not found]                     ` <58914d9d-f140-9cf3-f91b-78db7d913d12-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-09-13  9:57                       ` zhoucm1
2017-09-13 10:11       ` Marek Olšák
     [not found]         ` <CAAxE2A7aR15Y9C2r_V_+6fTp-kEuFKwDApQRCnx_rxdsDOKtmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-13 11:32           ` Zhou, David(ChunMing)
     [not found]             ` <MWHPR1201MB020689874960A24D32C4A39CB46E0-3iK1xFAIwjrUF/YbdlDdgWrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-09-13 12:06               ` Marek Olšák
2017-09-13 12:25                 ` Zhou, David(ChunMing)
2017-09-13 13:04                   ` Christian König
     [not found]                     ` <8927d6b6-f87c-00d9-57af-fdf4fb6dfcb8-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-09-13 13:46                       ` Zhou, David(ChunMing)
2017-09-13 14:06                         ` Marek Olšák
     [not found]                           ` <CAAxE2A72RAC61KOF10GTuged-pM4kpKGnnMJh-nmtF-xM4f9AQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-13 14:16                             ` Christian König
     [not found]                               ` <be64ba03-3aa9-6eaf-9267-c3ec51882c12-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-09-14  1:52                                 ` Dave Airlie
     [not found]                                   ` <CAPM=9typSOcf3L5Y6acDChY6R5fKMQ44LdCvKp_YZbX7B1LWiw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-14  2:07                                     ` zhoucm1
     [not found]                                       ` <8a800613-07ce-b417-8a1e-0db5a2e31758-5C7GfCeVMHo@public.gmane.org>
2017-09-14  2:26                                         ` zhoucm1 [this message]
2017-09-14  2:33                                           ` Dave Airlie
2017-09-14  2:34                                             ` zhoucm1
2017-09-28 20:41     ` Marek Olšák
2017-09-28 23:42       ` Dave Airlie
     [not found]         ` <CAPM=9ty8YhG16QSE8OQTDaAPQxT7mXE=cRn1OJXXznUtcBaRSA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-29 12:35           ` Marek Olšák
2017-09-14  7:56 ` [PATCH 1/3] drm/syncobj: extract two helpers from drm_syncobj_create Emil Velikov
     [not found]   ` <CACvgo50uprnZZ_+wXLH59Knq2SUCZwoFsyYH6ydcNJQ9Eiaw3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-14  8:01     ` Emil Velikov
     [not found]       ` <CACvgo51-pfQJgas_VhVv3gyp7DDAQfAtpb6pxNN7c54xDc46wQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-28 22:06         ` Marek Olšák
     [not found] ` <1505248934-1819-1-git-send-email-maraeo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-12 20:42   ` [PATCH 2/3] drm/syncobj: add a new helper drm_syncobj_get_fd Marek Olšák
2017-09-29  2:44   ` [PATCH 1/3] drm/syncobj: extract two helpers from drm_syncobj_create Chunming Zhou
2017-09-29 14:13     ` Marek Olšák
     [not found]       ` <CAAxE2A42G4-eD4x6VunDe4rW2c_GuaChn0Df+HE7wbvQYK0QFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-29 14:15         ` Marek Olšák
     [not found]           ` <CAAxE2A6ecZnArHSu8P_DuHPOGhz0+6TfXtQshKWvhU1=1V4Lyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-30  1:55             ` Chunming Zhou
2017-09-30 15:55               ` Marek Olšák
     [not found]                 ` <CAAxE2A6gfDHWU73ji+KVbtZH8pG1f8-1Ts2_FUh9MjyYa+b=oA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-30 23:20                   ` Zhou, David(ChunMing)
     [not found]                     ` <MWHPR1201MB02061877B54A8E252C7D2196B47F0-3iK1xFAIwjrUF/YbdlDdgWrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-10-12 20:33                       ` Marek Olšák

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=5264b020-c850-2765-d0d7-dc49d96815cf@amd.com \
    --to=david1.zhou-5c7gfcevmho@public.gmane.org \
    --cc=airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=maraeo-Re5JQEeQqe8AvxtiuMwx3w@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 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.