libdrm/iris: check if VFS '<gpu/>' is present

On startup check if '/dev/gpu' is present and issue an error in case it
is not.

issue #4380
This commit is contained in:
Sebastian Sumpf 2022-01-20 14:47:49 +01:00 committed by Norman Feske
parent cd4d00f31a
commit 299a35d943

View File

@ -1620,6 +1620,14 @@ static Genode::Constructible<Drm_call> _call;
void drm_init()
{
/* make sure VFS is initialized */
struct Libc::stat buf;
if (stat("/dev/gpu", &buf) < 0) {
Genode::error("'/dev/gpu' not accessible: ",
"try configure '<gpu>' in 'dev' directory of VFS'");
return;
}
_call.construct();
}