<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF">
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?<br>
<br>
<p dir="ltr" style="display:inline"><span style="color:#888888"><span style="font-size:0.81em">发自坚果 Pro</span></span></p>
<style type="text/css">
<!--
* body
{padding:0 16px 30px!important;
margin:0!important;
background-color:#ffffff;
line-height:1.4;
word-wrap:break-word;
word-break:normal}
div
{word-wrap:break-word;
word-break:normal}
p
{word-wrap:break-word;
word-break:normal;
text-indent:0pt!important}
span
{word-wrap:break-word;
word-break:normal}
a
{word-wrap:break-word;
word-break:normal}
td
{word-wrap:break-word;
word-break:break-all}
-->
</style>
<div class="quote">
<div style="margin:0 0px; font-size:105%"><font color="#629140" style="line-height:1.4"><span>Christian K鰊ig <deathsimple@vodafone.de> 于 2017年9月13日 下午9:04写道:</span></font></div>
<br type="attribution">
</div>
<div>
<div class="moz-cite-prefix">
<blockquote type="cite">syncfile indeed be a good way to pass fence for user space, which already is proved in Android and is upstreamed.<br>
</blockquote>
Not really. syncfile needs a file descriptor for each handle it generates, that's quite a show stopper if you want to use it in general.<br>
<br>
Android syncfile are meant to be used for inter process sharing, but as command submission sequence number they are not such a good fit.<br>
<br>
Mareks approach looks really good to me and we should follow that direction further.<br>
<br>
Regards,<br>
Christian.<br>
<br>
Am 13.09.2017 um 14:25 schrieb Zhou, David(ChunMing):<br>
</div>
<blockquote type="cite">
<meta name="Generator" content="Microsoft Exchange Server">
<style>
<!--
.EmailQuote
{margin-left:1pt;
padding-left:4pt;
border-left:#800000 2px solid}
-->
</style>
<div>Yes, to be comptibility, I kept both seq_no and syncfile fd in the patch set, you can take a look, which really is simpler and effective way.<br>
<br>
syncfile indeed be a good way to pass fence for user space, which already is proved in Android and is upstreamed.<br>
<br>
Regards,<br>
David Zhou<br>
<br>
<p dir="ltr" style="display:inline"><span style="color:#888888"><span style="font-size:0.81em">发自坚果 Pro</span></span></p>
<style type="text/css">
<!--
* body
{padding:0 16px 30px!important;
margin:0!important;
background-color:#ffffff;
line-height:1.4;
word-wrap:break-word;
word-break:normal}
div
{word-wrap:break-word;
word-break:normal}
p
{word-wrap:break-word;
word-break:normal;
text-indent:0pt!important}
span
{word-wrap:break-word;
word-break:normal}
a
{word-wrap:break-word;
word-break:normal}
td
{word-wrap:break-word;
word-break:break-all}
-->
</style>
<div class="x_quote">
<div style="margin:0 0px; font-size:105%"><font color="#629140" style="line-height:1.4"><span>Marek Ol?醟
<a class="moz-txt-link-rfc2396E" href="mailto:maraeo@gmail.com"><maraeo@gmail.com></a> 于 2017年9月13日 下午8:06写道:</span></font></div>
<br type="attribution">
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div class="PlainText">On Wed, Sep 13, 2017 at 1:32 PM, Zhou, David(ChunMing)<br>
<a class="moz-txt-link-rfc2396E" href="mailto:David1.Zhou@amd.com"><David1.Zhou@amd.com></a> wrote:<br>
> Could you describe how difficult to directly use CS syncfile fd in Mesa<br>
> compared with concerting CS seq to syncfile fd via several syncobj ioctls?<br>
<br>
It just simplifies things. Mesa primarily uses seq_no-based fences and<br>
will continue to use them. We can't remove the seq_no fence code<br>
because we have to keep Mesa compatible with older kernels.<br>
<br>
The only possibilities are:<br>
- Mesa gets both seq_no and sync_file from CS.<br>
- Mesa only gets seq_no from CS.<br>
<br>
I decided to take the simpler option. I don't know if there is a perf<br>
difference between CS returning a sync_file and using a separate<br>
ioctl, but it's probably insignificant since we already call 3 ioctls<br>
per IB submission (BO list create+destroy, submit).<br>
<br>
Marek<br>
<br>
><br>
> Regards,<br>
> David Zhou<br>
><br>
> 发自坚果 Pro<br>
><br>
> Marek Ol?醟 <a class="moz-txt-link-rfc2396E" href="mailto:maraeo@gmail.com"><maraeo@gmail.com></a> 于 2017年9月13日 下午6:11写道:<br>
><br>
> On Wed, Sep 13, 2017 at 5:03 AM, zhoucm1 <a class="moz-txt-link-rfc2396E" href="mailto:david1.zhou@amd.com">
<david1.zhou@amd.com></a> wrote:<br>
>> Hi Marek,<br>
>><br>
>> You're doing same things with me, see my "introduce syncfile as fence<br>
>> reuturn" patch set, which makes things more simple, we just need to<br>
>> directly<br>
>> return syncfile fd to UMD when CS, then the fence UMD get will be always<br>
>> syncfile fd, UMD don't need to construct ip_type/ip_instance/ctx_id/ring<br>
>> any<br>
>> more, which also can pass to dependency and syncobj as well.<br>
><br>
> For simpler Mesa code, Mesa won't get a sync file from the CS ioctl.<br>
><br>
> Marek<br>
</div>
</span></font><br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre>_______________________________________________
amd-gfx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
</pre>
</blockquote>
<p><br>
</p>
</div>
</body>
</html>