Hi Pekka,

On 11/19/2014 04:34 PM, Pekka Paalanen wrote:
On Wed, 19 Nov 2014 15:32:38 +0900
Alexandre Courbot <acour...@nvidia.com> wrote:

Some more information: CPU usage of the EGL app (glmark2 here) is much
higher when this patch is applied, which I presume is what triggers the
frame skips.

On 11/19/2014 03:05 PM, Alexandre Courbot wrote:
Hi guys,

I am seeing a severe performance regression (lots frame drops when
running EGL apps in Weston) on Tegra/GK20A since the following commit:

commit 363b53f00069af718f64cf047f19ad5681a8bf6d
Author: Marek Olšák <marek.ol...@amd.com>
Date:   Sat Nov 1 14:31:09 2014 +0100

      egl: remove egl_gallium from the loader

Reverting said commit on top of master brings the expected performance
back. I am not knowledgeable enough about Mesa to speculate about the
reason, but could we try to investigate why this happens and how we
could fix this?

Hi,

that sounds like you used to get egl_gallium as the EGL driver, and
after that patch you get egl_dri2. These two have separate Wayland
platform implementations (and probably all other platforms as well?). I
think that might be a lead for investigation. EGL debug environment
variable (EGL_LOG_LEVEL=debug) should confirm which EGL driver gets
loaded. You can force the EGL driver with e.g. EGL_DRIVER=egl_dri2.

You are spot on, EGL_LOG_LEVEL revealed that I was using the egl_gallium driver while this patch makes Wayland applications use egl_dri2. If I set EGL_DRIVER=egl_gallium things go back to the expected behavior.


Note, that there are two different EGL platforms in play: DRM/GBM for
Weston, and Wayland for the app. Have you confirmed the problem is in
the app side? That is, does Weston itself run smoothly?

Weston seems to be fine, and since setting EGL_DRIVER=egl_gallium after starting it brings things back to the previous behavior I believe we can consider it is not part of this problem.


FYI, I've been slowly working on https://github.com/ppaalanen/wesgr but
the Weston patches are not upstream yet, and I'm in the process of
updating them currently. I hope this tool might give some indication
whether the skips/stalls happen in Weston or not.

You say "frame drops", how do you see that? Only on screen, or also in
the app performance profile? How's the average framerate for the app?

Looking at it again this is actually quite interesting. The misbehaving app is glmark2, and what happens is that despite working nicely otherwise, a given frame sometimes remain displayed for up to half a second. Now looking at the framerates reported by glmark2, I noticed that while they are capped at 60fps when using the gallium driver, the numbers are much higher when using dri2 (which is nice!). Excepted when these "stuck frames" happen, then the reported framerate drops dramatically, indicating that the app itself is also blocked by this.

Interestingly, if I run weston-simple-egl with dri2, the framerate is again capped at 60fps, so this may be something specific to glmark2.

Also, and I cannot explain why, but if there is other activity happening in Weston (e.g. another egl application, even another instance of glmark2 itself), the issue seems to not manifest itself.

Just for my education, is the egl_gallium driver going to be removed? What are egl_gallium and egl_dri2 doing differently?

Thanks,
Alex.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to