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
Yes, this is expected behavior, even if it's not intuitive. For more details, see:
https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110
On Tue, 12 Oct 2021 17:33:18 +0000, you wrote:
Yes, this is expected behavior, even if it's not intuitive. For more details, see:
https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110
Thanks - as noted in that discussion the behaviour is a bit unhelpful but just knowing that it is expected means I can deal with it.
JC
On Tue, Oct 12, 2021 at 07:37:11PM +0100, John Cox wrote:
On Tue, 12 Oct 2021 17:33:18 +0000, you wrote:
Yes, this is expected behavior, even if it's not intuitive. For more details, see:
https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110
Thanks - as noted in that discussion the behaviour is a bit unhelpful but just knowing that it is expected means I can deal with it.
kerneldoc in that uapi header to explain precisely what and why is going on would be good too. -Daniel
dri-devel@lists.freedesktop.org