mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 20:10:14 +01:00
egl: Don't add hardware device if there is no render node v2.
Do not offer a hardware drm backed egl device if no render node
is available. The current implementation will fail on this
egl device. On top it issues a warning that is actually missleading.
There are finally more error paths that can fail on the way to a
hardware backed egl device. Fixing all of them would kind of require
opening the drm device and see if there is a usable driver associated
with the device. The taken approach avoids a full probe and fixes at
least this kind of problem on kvm virtualization hosts I observe here.
Fixes: dbb4457d98 ("egl: add EGL_EXT_device_drm support")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
parent
8dd26fa2f0
commit
5743a36b2b
1 changed files with 2 additions and 2 deletions
|
|
@ -108,9 +108,9 @@ static int
|
|||
_eglAddDRMDevice(drmDevicePtr device, _EGLDevice **out_dev)
|
||||
{
|
||||
_EGLDevice *dev;
|
||||
const int wanted_nodes = 1 << DRM_NODE_RENDER | 1 << DRM_NODE_PRIMARY;
|
||||
|
||||
if ((device->available_nodes & (1 << DRM_NODE_PRIMARY |
|
||||
1 << DRM_NODE_RENDER)) == 0)
|
||||
if ((device->available_nodes & wanted_nodes) != wanted_nodes)
|
||||
return -1;
|
||||
|
||||
dev = _eglGlobal.DeviceList;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue