Re: Graphics performance on wayland vs eglfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2/8/22 7:36 PM, Paulo Sherring wrote:
> Hello Marius,
> Thanks for the quick reply, as always :)
> I know that KPIs and more information were really missing, I was
> trying to find a way to reliability measure FPS to no avail.
> Thanks for suggesting the GALLIUM_HUD, worked really nice! Please, see
> below for some more information.
> 
>> Platform:
> The platform I use is RPi4, 2GiB.
> Configs are the same stock agl-compositor, except for
> transform=normal. Full config: https://pastebin.com/2a8nn7DV
> App is built using default compiler flags and in debug.
> 
>> Use-case:
> QML based app, that plays a video on startup, applies a fade-out as
> the video gets closer to the end.
> The QML app uses some animations to change properties on a QML Glow object.
> Side note on this Glow stuff: Qt (5.14.2) version I am using likely
> has some memory leak because when enabled, memory gets chewed up in 3
> minutes or so

Search Qt bug reports Jira for mem leaks, think there was a timer leak
fixed a while back, but probably unrelated to this.

> 
>> Measurements with GALLIUM_HUD:
> eglfs:
> Still pic: https://imgur.com/wqlcVHe
> Video: https://youtu.be/42G7x8G4JcE
> Observed behavior: smoother playback, fadeout, lower CPU usage, higher
> and steadier fps
> 
> wayland (agl-compositor):
> Still pic: https://imgur.com/fCuSUEo
> Video: https://youtu.be/V3woUyn1Pts
> Observed behavior: worse in all aspects wrt to eglfs.

Well unfortunately the videos do not seem to be working (private), but I
see there's a 10fps difference from the images.

> 
>> Are you sure you're using the GPU and not llvmpipe/softpipe?
> No, at this point, I am not sure at all. Both runs were using the same
> built image, I just changed the platform.
> But, as you mentioned, I'd expect that agl-compositor and the DRM
> backend are making use of the GPU.

You should clearly see that in the compositor logs. On my RPi4 I do. `GL
vendor: Broadcom`. I wonder if this isn't about the fkms issue where you
can't have 3D acceleration unless you enable it (which is by default on
AGL), but if you use that, you'll have tearing because the of DRM driver
and having out to tune out the repaint-window.

> In regards to eglfs vs using wayland, I'd expect that there would be
> some extra effort to move around requests to the compositor, but not
> to necessarily to the point impacting like this the performance.
> Using gstreamer (gst-launcher) + weston directly, I found that I can
> playback a video with no glitches. I couldn't use gst-launcher
> directly with agl-compositor (nothing showed on the screen), but I'd
> expect that as agl-compositor uses some extra APIs (shell extensions?)
> to enable the surface visibility. Do I get this right?

Yeah, master has a patch which allows you use gst-launch-1.0 directly.
Have a MR in flight for that at
https://gerrit.automotivelinux.org/gerrit/c/AGL/documentation/+/27134
that explains how to set-up the waylandsink. camera-gstreamer should
also do it if you have it.

If you're using lamprey for that you'll need to apply
https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26981 to
gstreamer plugins-bad to make it work, and then use the above docs.

> 
> So, I am now thinking that there is something going on with Qt itself.
> Are there some knobs I could turn to change things in regards to
> wayland platform on Qt?

In the past I've used QT_LOGGING_RULES env variable
https://doc.qt.io/qt-5/qloggingcategory.html.

Something like QT_LOGGING_RULES=*.true should enable all possible debug
logs, including Qt QPA. But more than that, I don't know what/which you
should enable. Someone much more closer to Qt should know more. Maybe
Risto Avila can help out here?

If you do that, maybe attach also the wayland logs for the client and
put all of that in a Jira task? (run the application with
WAYLAND_DEBUG=1).

> 
> Regards, Paulo.
> 
> On Tue, Feb 8, 2022 at 2:43 PM Marius Vlad <marius.vlad@xxxxxxxxxxxxx> wrote:
>>
>> Wrt to the cluster question, see Scott's answer:
>>
>> https://lists.automotivelinux.org/g/agl-dev-community/message/9626
>>
>>
>> On 2/8/22 2:41 PM, Paulo Sherring wrote:
>>> Hello all,
>>>
>>> I am working (more accurately playing around) on an Instrument Cluster
>>> application. I am currently based on master and it is basically the same IC
>>> application we had in past branches.
>>> I am currently experimenting with GFX (effects, animations, fade in, fade
>>> out) and video playback.
>>>
>>> One thing that I noticed is that if I don't use Wayland (i.e., no
>>> running compositor and passing QT_QPA_PLATFORM=eglfs), I get much smoother
>>> graphics, so much that it is visible to the eyes: smoother opacity
>>> changing, smoother video playback, visual effects such as QML Glow becomes
>>> really efficient.
>>>
>>> So, my question is: is there a way of getting eglfs equivalent performance
>>> when using Wayland?
>>
>>
>> This is quite vague, I guess some real numbers could tell how much of a
>> difference you're seeing between the two. With mesa drivers you could
>> use GALLIUM_HUD=cpu,fps and have a look at both. Probably that's
>> possible with rpi4 but probably not with r-car. Same with vivante vs
>> etnaviv. What platform you're using? Are you sure you're using the GPU
>> and not llvmpipe/softpipe?
>>
>> Itself wayland is just a protocol not a drawing API so there's nothing
>> to make it much for faster, than it currently is. Not really sure what
>> to recommend at this point, but I guess a difference between the two is
>> the fact that with Wayland you have multiple clients
>> and you have composite imagine, while with eglfs you have a single,
>> full-screen application. But even so,
>> compositors attempts to make use of the HW, if available, just like
>> probably happens with eglfs and the KMS backend.
>>
>> It is rather hard at this point to tell, without some specific use-cases
>> to compare and more information on the matter.
>>
>>>
>>> BTW, in regards to IC images on the master branch, do we still get
>>> agl-cluster somehow? If not, will we get it again? I couldn't find it on
>>> master nor on the docs and proceedings.
>>>
>>> Kind regards,
>>> Paulo Sherring.
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> --
>> Marius Vlad
>>
>>
>>
>>
>>
> 
> 
> 
> 
> 

-- 
Marius Vlad


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9665): https://lists.automotivelinux.org/g/agl-dev-community/message/9665
Mute This Topic: https://lists.automotivelinux.org/mt/88995048/2167316
Group Owner: agl-dev-community+owner@xxxxxxxxxxxxxxxxxxxxxxxxx
Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/4543822/2167316/883735764/xyzzy [list-automotive-discussions82@xxxxxxxxxxx]
-=-=-=-=-=-=-=-=-=-=-=-






[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux