Discussion:
DMAbuf flickering from three different sources
Matteo Valdina
2018-10-03 16:19:28 UTC
Permalink
Hi Y'all,

I'm working in a Weston-based compositor (4.0 and later on the 5.0) and I
faced an issue.

I have two different sources (1 QT application and 2 GStreamer waylandsink)
that provide content a live stream using the linux-dmabuf-unstable-v1.
The issue is that the frames of this three sources are displayed in
randomly on all these sources.

I mean that source 1 display some frame for source 1 and some frame from
source 2 or 3. And this is affecting multiple processes (the QT application
is a different process).

It looks like the same DMAbuf pool is shared across all applications.

This is a Kernel 4.12, Weston 5.0, Qt5, GStreamer 1.14 Mesa 18.1.7 and on
an Intel HD graphics 610.

Any suggestions to tackle this?

Best
Matteo Valdina
--
“There are two ways of constructing a software design: One way is to make
it so simple that there are obviously no deficiencies, and the other way is
to make it so complicated that there are no obvious deficiencies. The first
method is far more difficult.”
- Tony Hoare
Pekka Paalanen
2018-10-04 10:44:45 UTC
Permalink
On Wed, 3 Oct 2018 11:19:28 -0500
Post by Matteo Valdina
Hi Y'all,
I'm working in a Weston-based compositor (4.0 and later on the 5.0) and I
faced an issue.
I have two different sources (1 QT application and 2 GStreamer waylandsink)
that provide content a live stream using the linux-dmabuf-unstable-v1.
The issue is that the frames of this three sources are displayed in
randomly on all these sources.
I mean that source 1 display some frame for source 1 and some frame from
source 2 or 3. And this is affecting multiple processes (the QT application
is a different process).
It looks like the same DMAbuf pool is shared across all applications.
This is a Kernel 4.12, Weston 5.0, Qt5, GStreamer 1.14 Mesa 18.1.7 and on
an Intel HD graphics 610.
Any suggestions to tackle this?
Hi,

is this problem only on your own compositor, while upstream Weston
works fine?

How different is your compositor from Weston, what have you modified?

I can't imagine what kind of bug in the compositor could cause mixing
up buffers from different clients at the dmabuf level.


Thanks,
pq
Matteo Valdina
2018-10-04 10:59:14 UTC
Permalink
Hi Pekka,
No the problem is also present on weston 4.0 and 5.0.

One interesting note, all sources use the same resolution (4K and GStreamer
is using format NV12).
The two gstreamer sources are in full screen in two different display.

Best
Matteo Valdina
Post by Pekka Paalanen
On Wed, 3 Oct 2018 11:19:28 -0500
Post by Matteo Valdina
Hi Y'all,
I'm working in a Weston-based compositor (4.0 and later on the 5.0) and I
faced an issue.
I have two different sources (1 QT application and 2 GStreamer
waylandsink)
Post by Matteo Valdina
that provide content a live stream using the linux-dmabuf-unstable-v1.
The issue is that the frames of this three sources are displayed in
randomly on all these sources.
I mean that source 1 display some frame for source 1 and some frame from
source 2 or 3. And this is affecting multiple processes (the QT
application
Post by Matteo Valdina
is a different process).
It looks like the same DMAbuf pool is shared across all applications.
This is a Kernel 4.12, Weston 5.0, Qt5, GStreamer 1.14 Mesa 18.1.7 and on
an Intel HD graphics 610.
Any suggestions to tackle this?
Hi,
is this problem only on your own compositor, while upstream Weston
works fine?
How different is your compositor from Weston, what have you modified?
I can't imagine what kind of bug in the compositor could cause mixing
up buffers from different clients at the dmabuf level.
Thanks,
pq
Pekka Paalanen
2018-10-04 11:28:56 UTC
Permalink
On Thu, 4 Oct 2018 05:59:14 -0500
Post by Matteo Valdina
Hi Pekka,
No the problem is also present on weston 4.0 and 5.0.
One interesting note, all sources use the same resolution (4K and GStreamer
is using format NV12).
The two gstreamer sources are in full screen in two different display.
Sorry, I have no idea. I did get a thought about a patch in master, but
then saw it was from you. :-)

Maybe it could be some state mixup around the YUV texturing in
GL-renderer, I would assume that to be rarely tested, especially with
multiple simultaneous clients hitting it.


Thanks,
pq
Post by Matteo Valdina
Post by Pekka Paalanen
On Wed, 3 Oct 2018 11:19:28 -0500
Post by Matteo Valdina
Hi Y'all,
I'm working in a Weston-based compositor (4.0 and later on the 5.0) and I
faced an issue.
I have two different sources (1 QT application and 2 GStreamer
waylandsink)
Post by Matteo Valdina
that provide content a live stream using the linux-dmabuf-unstable-v1.
The issue is that the frames of this three sources are displayed in
randomly on all these sources.
I mean that source 1 display some frame for source 1 and some frame from
source 2 or 3. And this is affecting multiple processes (the QT
application
Post by Matteo Valdina
is a different process).
It looks like the same DMAbuf pool is shared across all applications.
This is a Kernel 4.12, Weston 5.0, Qt5, GStreamer 1.14 Mesa 18.1.7 and on
an Intel HD graphics 610.
Any suggestions to tackle this?
Matteo Valdina
2018-10-05 00:14:54 UTC
Permalink
Thanks,
I'll continue to give a look.

Best
Matteo Valdina
Post by Pekka Paalanen
On Thu, 4 Oct 2018 05:59:14 -0500
Post by Matteo Valdina
Hi Pekka,
No the problem is also present on weston 4.0 and 5.0.
One interesting note, all sources use the same resolution (4K and
GStreamer
Post by Matteo Valdina
is using format NV12).
The two gstreamer sources are in full screen in two different display.
Sorry, I have no idea. I did get a thought about a patch in master, but
then saw it was from you. :-)
Maybe it could be some state mixup around the YUV texturing in
GL-renderer, I would assume that to be rarely tested, especially with
multiple simultaneous clients hitting it.
Thanks,
pq
Post by Matteo Valdina
Post by Pekka Paalanen
On Wed, 3 Oct 2018 11:19:28 -0500
Post by Matteo Valdina
Hi Y'all,
I'm working in a Weston-based compositor (4.0 and later on the 5.0)
and I
Post by Matteo Valdina
Post by Pekka Paalanen
Post by Matteo Valdina
faced an issue.
I have two different sources (1 QT application and 2 GStreamer
waylandsink)
Post by Matteo Valdina
that provide content a live stream using the
linux-dmabuf-unstable-v1.
Post by Matteo Valdina
Post by Pekka Paalanen
Post by Matteo Valdina
The issue is that the frames of this three sources are displayed in
randomly on all these sources.
I mean that source 1 display some frame for source 1 and some frame
from
Post by Matteo Valdina
Post by Pekka Paalanen
Post by Matteo Valdina
source 2 or 3. And this is affecting multiple processes (the QT
application
Post by Matteo Valdina
is a different process).
It looks like the same DMAbuf pool is shared across all applications.
This is a Kernel 4.12, Weston 5.0, Qt5, GStreamer 1.14 Mesa 18.1.7
and on
Post by Matteo Valdina
Post by Pekka Paalanen
Post by Matteo Valdina
an Intel HD graphics 610.
Any suggestions to tackle this?
Loading...