Commit Graph

8 Commits

Author SHA1 Message Date
Scott Anderson 60b6572b35 Fix Wmaybe-uninitialized warnings
Just a couple of places which shouldn't be possible, so initialized and
added assertions to make sure.

Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
2020-01-28 12:30:56 +00:00
Stefan Agner 70e6356415 backend-headless: fix build issue without gl-renderer
If the gl-renderer is disabled build fails with:
  ../libweston/backend-headless/headless.c:394:9: error:
  ‘EGL_PLATFORM_SURFACELESS_MESA’ undeclared (first use in this function)

Fix this by including shared/weston-egl-ext.h.

Signed-off-by: Stefan Agner <stefan@agner.ch>
2019-10-24 09:09:33 +00:00
Pekka Paalanen 5104d7b2af headless, gl-renderer: support pbuffer outputs
Use the surfaceless platform in the headless backend to initialize the
GL-renderer and create pbuffer outputs. This allows headless backend to use
GL-renderer, even hardware accelerated.

This paves way for exercising GL-renderer in CI and using the Weston test suite
to test hardware GL ES implementations.

Relates to: https://gitlab.freedesktop.org/wayland/weston/issues/278

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-10-11 12:16:35 +00:00
Pekka Paalanen e62f276a21 backend-headless: make renderer type an enum
Helps adding one more type.

No functional changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-09-19 15:56:06 +03:00
Pekka Paalanen e986de729d backend-headless: refactor into headless_output_disable_pixman
Pure refactoring. Preparing for adding GL-renderer.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-09-19 15:56:06 +03:00
Pekka Paalanen 4b0688fd77 backend-headless: refactor into headless_output_enable_pixman
Pure refactoring. Preparing for adding GL-renderer.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-09-19 15:56:06 +03:00
Antonio Borneo c90fccc256 backend-drm: fix race during system suspend
Depending on system loading, weston-launcher could drop the drm
master access before the compositor and all the clients receive
the notification. In this case, some commit could be sent to the
drm driver too late and get refused with error EACCES.
This error condition is not properly managed and causes weston to
hang.

Change the return type of start_repaint_loop() and repaint_flush()
from void to int, and return 0 on success or -1 if the repaint has
to be cancelled.
In the callers of start_repaint_loop() and repaint_flush() handle
the return value and cancel the repaint when needed.
In backend-drm detect the error EACCES and return -1.
Note: to keep the code cleaner, this change inverts the execution
order between weston_output_schedule_repaint_reset() and
repaint_cancel().

No need to wait for suspend or for any notification; in case the
weston reschedules a repaint, it will get EACCES again.
At resume, damage-all guarantees a complete repaint.

This fix is for atomic modeset only.
Legacy modeset suffers from similar problems, but it is not fixed
by this change. Since drm_pending_state_apply() never returns
error for legacy modeset, this change has no impact on legacy
modeset.

Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/117
2019-07-12 17:16:52 +00:00
Pekka Paalanen 8059d317a5 backend-headless: move into new subdir
For consistency with other backends.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-05-16 13:32:34 +01:00