<div dir="ltr">Gustavo, you added fence_put() in __drm_atomic_helper_plane_destroy_state(), shouldn't we also add a corresponding fence_get() in __drm_atomic_helper_plane_duplicate_state() ?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 29, 2016 at 3:23 PM, Rob Clark <span dir="ltr"><<a href="mailto:robdclark@gmail.com" target="_blank">robdclark@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, Apr 29, 2016 at 3:48 AM, Daniel Stone <<a href="mailto:daniel@fooishbar.org">daniel@fooishbar.org</a>> wrote:<br>
> Hi,<br>
><br>
> On 28 April 2016 at 23:28, Rob Clark <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>> wrote:<br>
>> On Wed, Apr 27, 2016 at 2:39 AM, Daniel Vetter <<a href="mailto:daniel@ffwll.ch">daniel@ffwll.ch</a>> wrote:<br>
>>> On Tue, Apr 26, 2016 at 01:48:02PM -0700, Greg Hackmann wrote:<br>
>>>> A (per-CRTC?) array of fences would be more flexible. And even in the cases<br>
>>>> where you could make a 1-to-1 mapping between planes and fences, it's not<br>
>>>> that much more work for userspace to assemble those fences into an array<br>
>>>> anyway.<br>
>>><br>
>>> I'm ok with an array too if that's what you folks prefer (it's meant to be<br>
>>> used by you after all). I just don't want just 1 fence for the entire op,<br>
>>> forcing userspace to first merge them all together. That seems silly.<br>
>><br>
>> I was kinda more a fan of array too, if for no other reason that to be<br>
>> consistent w/ how out-fences work. (And using property just for<br>
>> in-fence seemed slightly weird/abusive to me)<br>
><br>
> I don't think it's really useful to look for much consistency between<br>
> the two, beyond the name. I'm more concerned with consistency between<br>
> in-fences and the implicit fences on buffers/FBs, and between<br>
> out-fences and the page_flip_events.<br>
><br>
>>> One side-effect of that is that we'd also have to rework all the internal<br>
>>> bits and move fences around in atomic. Which means change a pile of<br>
>>> drivers. Not sure that's worth it, but I'd be ok either way really.<br>
>><br>
>> hmm, well we could keep the array per-plane (and if one layer is using<br>
>> multiple planes, just list the same fd multiple times).. then it<br>
>> mostly comes down to changes in the ioctl fxn itself.<br>
><br>
> ... and new API in libdrm, which is going to be a serious #ifdef and<br>
> distribution pain. The core property API has been available since<br>
> 2.4.62 last June, but for this we'd have to write the code, wait for<br>
> the kernel code, wait for HWC, get everything together, and then merge<br>
> and release. That gives minimum one year of libdrm releases which have<br>
> had atomic but not in-fence API support, if we're adding a new array.<br>
> And I just don't really see what it buys us, apart from the need for<br>
> the core atomic_get_property helper to statically return -1 when<br>
> requesting FENCE_FD.<br>
<br>
</div></div>don't we have the same issue for out-fences anyway?<br>
<br>
ofc, I suspect we could handle making fences look like properties in<br>
userspace in libdrm (at least if there was a sane way that libdrm<br>
could track and eventually close() old out-fence fd's). I'm not<br>
entirely sure this matters, I mean how do we make implicit vs explicit<br>
fencing transparent to the compositor and the proto between<br>
compositor<->app?<br>
<br>
Admittedly I haven't given *too* much thought yet about the<br>
implications to libdrm and it's users, but it seems like we need to<br>
make a v2 API rev anyway for out-fences, and the compositor is going<br>
to need different codepaths for explicit vs implicit (if it supports<br>
both). So I don't think in-fences as something other than property<br>
really costs us anything additional?<br>
<br>
(Unless there is some sane reason to have an intermediate state w/<br>
in-fences but pageflip events instead of out-fences? But that seems<br>
odd..)<br>
<br>
BR,<br>
-R<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> Cheers,<br>
> Daniel<br>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</div></div></blockquote></div><br></div>