mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2025-02-20 01:52:49 +00:00
egl: only take render nodes into account when listing DRM devices
We don't want to expose an EGL device for a display-only DRM devices (like VKMS). For these DRM devices we have a separate software-rendering device (the first in the list, always present). There is a similar check in _eglAddDRMDevice, however it will be removed in a future commit to allow split render/display devices to be properly added. We can't figure out whether we're on a split render/display system before loading the driver. Signed-off-by: Simon Ser <contact@emersion.fr> Fixes: 5743a36b2b32 ("egl: Don't add hardware device if there is no render node v2.") Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9697>
This commit is contained in:
parent
08a51770bd
commit
e39d72aec2
@ -274,6 +274,9 @@ _eglRefreshDeviceList(void)
|
||||
|
||||
num_devs = drmGetDevices2(0, devices, ARRAY_SIZE(devices));
|
||||
for (int i = 0; i < num_devs; i++) {
|
||||
if (!(devices[i]->available_nodes & (1 << DRM_NODE_RENDER)))
|
||||
continue;
|
||||
|
||||
ret = _eglAddDRMDevice(devices[i], NULL);
|
||||
|
||||
/* Device is not added - error or already present */
|
||||
|
Loading…
x
Reference in New Issue
Block a user