Hi,

2014-07-24 19:45 GMT+02:00 Steven Toth <st...@kernellabs.com>:
> I'd like my application to allocate buffers (not DRM_PRIME or
> KERNEL_PRIME) and use each of these for a surface, passing the
> allocation by reference during CreateSurface. I've seen various
> examples (below) of projects that demonstrate the use of
> VASurfaceAttribExternalBuffers but nothing that creates via user
> allocated pointers.
>
> Based on reading the intel driver internals, I'm starting to think my
> goal isn't currently possible.
>
> Looking at the intel-driver project, function i965_CreateSurfaces2...
>
> If you pass VA_SURFACE_ATTRIB_MEM_TYPE_VA it appears as if the i965
> driver allocates the surface memory internally via
> i965_surface_native_memory()
>
> If you pass VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME or
> VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM it appears as if the i965 driver
> uses external surfaces via i965_suface_external_memory(), but not user
> pointers, only I965_SURFACE_MEM_GEM_FLINK or
> I965_SURFACE_MEM_DRM_PRIME.
>
> The only i965 driver attempt to query the
> VASurfaceAttribExternalBuffers->num_buffers/buffers member is inside
> i965_suface_external_memory().
>
> Have I missed something important, or is this simply not possible?
>
> I assume DRM_PRIME or KERNEL_PRIME handles don't permit the use of
> user allocated pointers. Correct?

Correct.

On the VA-API side, what you want is userptr support
(VA_SURFACE_ATTRIB_MEM_TYPE_USER_PTR).

However, this comes with restrictions on the driver side, and requires
additional kernel patches (vmap). What specific use-cases do you want
to support?

Regards,
Gwenole.
_______________________________________________
Libva mailing list
Libva@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libva

Reply via email to