[Piglit] [v7 07/12] tests: spec: EXT_image_dma_buf_import fd ownership transfer

Eric Anholt eric at anholt.net
Tue May 28 12:17:37 PDT 2013

Topi Pohjolainen <topi.pohjolainen at intel.com> writes:

> Simple test checking that EGL closes the export file handle and
> the creator can in turn drop its reference.
> v2:
>    - compile only on platforms that have drm (Eric)
>    - use standard drm definitions for fourcc instead of duplicated
>      local (Daniel, Eric)
>    - use helper variables for width, height and cpp instead of
>      repeating the magic numbers over and over again (Eric)
>    - try to close the export file descriptor and check that it is
>      already closed by the EGL stack (Eric, Chad)
>    - fix typo in the description (and commit) (Chad)
>    - renamed from "close_buffer" to "ownership_transfer"
>    - removed irrelevant quote of the spec (Eric)
> v3:
>    - use properly linked egl-extension calls (Eric)
>    - check for EBADF and not just for close()-failure (Daniel)

I think for this one we want to actually do some rendering with the
image after having destroyed the drm_intel_bo, to make sure the kernel
and driver's refcounting is actually working as intended.

Also, by my reading, I don't think you get to assert that it's closed
after the image is freed, only after the display is freed:

    If eglCreateImageKHR is successful for a EGL_LINUX_DMA_BUF_EXT target, the
    EGL takes ownership of the file descriptor and is responsible for closing
    it, which it may do at any time while the EGLDisplay is initialized."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130528/a32fe722/attachment.pgp>

More information about the Piglit mailing list