Revert "egl: Don't add hardware device if there is no render node v2."

This reverts commit 5743a36b2b.

Now that _eglAddDevice is always called with the correct software
hint, no need to bail out if the device doesn't have a render node.
On split render/display SoCs, the DRM device won't have a render
node, yet rendering is hardware-accelerated (via kmsro).

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 5743a36b2b ("egl: Don't add hardware device if there is no render node v2.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4178
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9697>
This commit is contained in:
Simon Ser 2021-03-18 21:47:05 +01:00 committed by Marge Bot
parent e39d72aec2
commit 1d349a6484
1 changed files with 2 additions and 2 deletions

View File

@ -109,9 +109,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 & wanted_nodes) != wanted_nodes)
if ((device->available_nodes & (1 << DRM_NODE_PRIMARY |
1 << DRM_NODE_RENDER)) == 0)
return -1;
dev = _eglGlobal.DeviceList;