[platforms/virtual] Use rendernode or vgem device if available for egl
ClosedPublic

Authored by graesslin on Jul 19 2016, 8:57 AM.

Details

Summary

The egl implementation for the virtual platform tries to use a render
node if available. If there is no render node it looks for a virtual
(kernel driver vgem) device, which unfortunately does not create a
render node in mainline kernel (there are patches in ChromiumOS).

For this the Udev wrapper is extended to search for renderNode devices
and for virtual dri devices.

If either render node or vgem dri device is found, it is tried to be
opened (without logind escalation) and on success a gbm device is
created on it. If any step of this fails the so far default behavior
of default device is tried for creating the EGLDisplay.

All of this is compile optional, so that the virtual platform does not
hard depend on udev and/or gbm.

Test Plan

Auto tests which need OpenGL executed and verified that they
use the render node or vgem device.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 5294.Jul 19 2016, 8:57 AM
graesslin retitled this revision from to [platforms/virtual] Use rendernode or vgem device if available for egl.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma on Wayland.
Restricted Application added projects: Plasma on Wayland, KWin. · View Herald TranscriptJul 19 2016, 8:57 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
bshah accepted this revision.Jul 21 2016, 6:02 AM
bshah added a reviewer: bshah.
This revision is now accepted and ready to land.Jul 21 2016, 6:02 AM
This revision was automatically updated to reflect the committed changes.