On Thu, 16 Feb 2023 at 10:25, Simon Ser <contact@xxxxxxxxxxx> wrote: > > On Thursday, February 16th, 2023 at 10:11, Pekka Paalanen <ppaalanen@xxxxxxxxx> 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. Yup. If we haven't, we should probably document this in the FD2HANDLE ioctl. -Daniel > > 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. -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch