[PATCH] drm: document expectations for GETFB2 handles
Pekka Paalanen
ppaalanen at gmail.com
Thu Feb 16 11:19:06 UTC 2023
On Thu, 16 Feb 2023 09:25:38 +0000
Simon Ser <contact at emersion.fr> wrote:
> On Thursday, February 16th, 2023 at 10:11, Pekka Paalanen <ppaalanen at gmail.com> wrote:
>
> > Btw. does this also mean that if you use GETFB2 to get handle A, you
> > export that as dmabuf and import in the same open device instance, you
> > again get handle A?
>
> I haven't tested it, but I believe that is correct.
>
> > IOW, you should never ever export a dmabuf of what you got with
> > GETFB2. If one did, one might import it oneself via GBM, breaking all
> > reference counting. But you also cannot "just leak" the handle A,
> > because if GBM happens to run on a different DRM device opened
> > instance, GBM would get a different handle to own.
> >
> > That's... err. How is a compositor supposed to do transition animation
> > from an old FB to its own thing? I guess mmap + glTexImage2D equivalent
> > to make a copy of the old FB so one can use it as a texture?
>
> I think the compositor can export the handle as DMA-BUF, then close the
> handle immediately. Then go about its business as usual.
Ah! Of course, I didn't think of that.
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230216/2d415f1c/attachment.sig>
More information about the dri-devel
mailing list