mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
loader: Warn when we fail to open a device node due to permissions.
This is definitely not the first time I've debugged why I'm getting swrast on a device only to find out I'm not a member of the render node's group. This does mean that you'll get a warning print even without EGL_LOG_LEVEL set. This may be an issue if we expect people outside of the DRI node's group to actually be using swrast instead of getting their permissions fixed. Right now surfaceless throws a "libEGL warning: No hardware driver found, falling back to software rendering" in that case anyway, so this is just more informative. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3703> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3703>
This commit is contained in:
parent
15a9f6c072
commit
1e3b74ee73
1 changed files with 4 additions and 0 deletions
|
|
@ -91,6 +91,10 @@ loader_open_device(const char *device_name)
|
|||
if (fd != -1)
|
||||
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
|
||||
}
|
||||
if (fd == -1 && errno == EACCES) {
|
||||
log_(_LOADER_WARNING, "failed to open %s: %s\n",
|
||||
device_name, strerror(errno));
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue