Discussion:
[Bug 796626] New: [Feature requirement] PRIME Buffer Sharing (Buffer Import/Export).
"GStreamer" (GNOME Bugzilla)
2018-06-19 07:13:05 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

Bug ID: 796626
Summary: [Feature requirement] PRIME Buffer Sharing (Buffer
Import/Export).
Classification: Platform
Product: GStreamer
Version: git master
OS: Linux
Status: NEW
Severity: enhancement
Priority: Normal
Component: gstreamer-vaapi
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@intel.com
QA Contact: gstreamer-***@lists.freedesktop.org
CC: ***@gmail.com, ***@igalia.com
GNOME version: ---

This is an Intel feature requirement.

The video driver's vaCreateSurfaces2 driver entrypoint shall accept a
VASurfaceAttribMemoryType attribute value of
VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_PRIME. This attribute will instruct the
driver to use the buffer whose Prime file descriptor is stored in the
VASurfaceAttribExternalBufferDescriptor as the backing buffer for the new
VASurface.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-19 07:14:31 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

Fei <***@intel.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@intel.com
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-20 02:10:47 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

--- Comment #1 from sreerenj <***@gmail.com> ---
The basic infrastructure code is already there for KERNEL_PRIME buffer.I don't
know how we test this feature :)
Write a source element which can output GEM buffer id?
Do we have any upstream GL element which can output GEM buffer?
Do we need specific caps-negotiation?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-20 03:07:20 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

Fei <***@intel.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@intel.com
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-20 06:12:08 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

Julien Isorce <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-20 14:03:24 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

Nicolas Dufresne (ndufresne) <***@ndufresne.ca> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
CC| |***@ndufresne.ca

--- Comment #2 from Nicolas Dufresne (ndufresne) <***@ndufresne.ca> ---
Can someone explain how is this related to GStreamer, it's so vague that I was
temped to close this bug (and the others) either away. Answer those two
questions, and we may be able to keep track or this.

What is the issue you are facing ?
What do you expect do happen instead?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-20 14:19:18 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

--- Comment #3 from Víctor Manuel Jáquez Leal <***@igalia.com> ---
The first problem is that attribute value isn't yet defined in va.h:

https://github.com/intel/libva/blob/master/va/va.h#L1265

and I can't find any issue discussing its merge.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-20 17:55:26 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

--- Comment #4 from sreerenj <***@gmail.com> ---
(In reply to Víctor Manuel Jáquez Leal from comment #3)
Post by "GStreamer" (GNOME Bugzilla)
https://github.com/intel/libva/blob/master/va/va.h#L1265
and I can't find any issue discussing its merge.
I think Fei misspelled it:
VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-20 18:06:34 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

--- Comment #5 from sreerenj <***@gmail.com> ---
(In reply to Nicolas Dufresne (ndufresne) from comment #2)
Post by "GStreamer" (GNOME Bugzilla)
Can someone explain how is this related to GStreamer, it's so vague that I
was temped to close this bug (and the others) either away. Answer those two
questions, and we may be able to keep track or this.
What is the issue you are facing?
What do you expect do happen instead?
VA-API allows creating a vaSurface from,
a: VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME (dmabuf)
b: VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM (gem buffer)

We have proper negotiation support for dmabuf in gst-vaapi. For gem buf, there
are internal methods implemented in gstreamer-vaapi to export gem-buffer-id to
vaSurface. But no test case to test it. And no specific caps negotiation too.

IIRC, Using cluttersink with EGL (GLTextureUploadMeta) was using the
va-surface-to-gem-buffer path. But I don't know whether it is still working.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-22 03:05:20 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

--- Comment #6 from Soon, Thean Siew <***@intel.com> ---
This feature should be related to dmabuf, not gem buffer where the correct
attribute should be VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME. I believe gst-vaapi
should already have proper support on VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME.
Maybe remaining work is related to the new DRM PRIME API?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-22 03:19:45 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

--- Comment #7 from Nicolas Dufresne (ndufresne) <***@ndufresne.ca> ---
This is still pretty vague. Give me a reason to keep this bug open and managed
by the community please, otherwise I believe it should close as invalid
tomorrow. There is clearly close door discussion behind the creation of this
issue.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-22 19:22:24 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

--- Comment #8 from sreerenj <***@gmail.com> ---
I believe the request is like this:

Assume there is an upstream element which can provide gem_buffer handle,
then gst-vaapi can bind it to vaSurface similar to what we do for dmabuf and
avoid the copy.

Second use case: assume there is a downstream element which can work on
gembuffer handle (eg: get eglimage from the gembuffer id), then gst-vaapi can
extract the gem-buffer-id from vasurface and export it to downstream (similar
to dmabuf).

Now questions:
1: Is there any customer using gem-buffer like this without using dmabuf?
2: We have dmabuf which should work for any use case, so do we really need it
other than just for a feature completeness ? :)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-22 20:33:52 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

Nicolas Dufresne (ndufresne) <***@ndufresne.ca> changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|[Feature requirement] PRIME |vaapi: Add GEM buffer
|Buffer Sharing (Buffer |support
|Import/Export). |
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-06-22 20:37:22 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

--- Comment #9 from Nicolas Dufresne (ndufresne) <***@ndufresne.ca> ---
DmaBuf sharing is still missing modifiers. But indeed, it does not seems very
useful to have GEM, ION or other handles that are dmabuf compatible. Also, it's
not because VAAPI have it that we must use it. I would discourage adding this
extra layer of complexity without a use case.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-11-03 15:55:19 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=796626

GStreamer system administrator <***@gstreamer.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |OBSOLETE

--- Comment #10 from GStreamer system administrator <***@gstreamer.net> ---
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been
closed from further activity.

You can subscribe and participate further through the new bug through this link
to our GitLab instance:
https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/102.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...