Should multiple PRIME_FD_TO_HANDLE ioctls on the same fd require multiple GEM_CLOSE?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I've a question about expected behavior. I am using the "vc4" backend.

If I convert a dmabuf fd to a bo handle twice using
DRM_IOCTL_PRIME_FD_TO_HANDLE then I get the same bo handle both times -
fair enough.

If I then close it twice with DRM_IOCTL_GEM_CLOSE then the second time
fails.

Is this expected behavior?  I think I would have hoped that the
PRIME_FD_TO_HANDLE ops would have incremented a ref count on the object
and it would need to be CLOSED as many times as it was "opened"
otherwise one bit of code can accidentally close a bo handle that was in
use in another.

Many thanks

John Cox




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux