diff options
author | Liav A <liavalb@gmail.com> | 2022-04-29 14:21:16 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-05-05 20:55:57 +0200 |
commit | b401f278adb72472e851f611e06dddb031b8b9d0 (patch) | |
tree | 18c00598bba372492799ffe77dd89185e7f23562 /Userland | |
parent | 912b8ab9650a2019065192c4e4866d6dfbd7cf1e (diff) | |
download | serenity-b401f278adb72472e851f611e06dddb031b8b9d0.zip |
Userland: Re-organize /dev GPU nodes
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Demos/VirGLDemo/VirGLDemo.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/SystemServer/main.cpp | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Userland/Demos/VirGLDemo/VirGLDemo.cpp b/Userland/Demos/VirGLDemo/VirGLDemo.cpp index 3535055f64..a653f59bd2 100644 --- a/Userland/Demos/VirGLDemo/VirGLDemo.cpp +++ b/Userland/Demos/VirGLDemo/VirGLDemo.cpp @@ -134,7 +134,7 @@ static Vector<VertexData> gen_vertex_data() static void init() { // Open the device - gpu_fd = open("/dev/gpu0", O_RDWR); + gpu_fd = open("/dev/gpu/render0", O_RDWR); VERIFY(gpu_fd >= 0); // Create a virgl context for this file descriptor VERIFY(ioctl(gpu_fd, VIRGL_IOCTL_CREATE_CONTEXT) >= 0); diff --git a/Userland/Services/SystemServer/main.cpp b/Userland/Services/SystemServer/main.cpp index e12e63db0f..b1407e357f 100644 --- a/Userland/Services/SystemServer/main.cpp +++ b/Userland/Services/SystemServer/main.cpp @@ -209,7 +209,11 @@ static void populate_devtmpfs_devices_based_on_devctl() break; } case 28: { - create_devtmpfs_block_device(String::formatted("/dev/gpu{}", minor_number), 0666, 28, minor_number); + create_devtmpfs_block_device(String::formatted("/dev/gpu/render{}", minor_number), 0666, 28, minor_number); + break; + } + case 226: { + create_devtmpfs_char_device(String::formatted("/dev/gpu/connector{}", minor_number), 0666, 226, minor_number); break; } case 29: { @@ -396,6 +400,8 @@ static ErrorOr<void> prepare_synthetic_filesystems() TRY(Core::System::symlink("/proc/self/fd/1", "/dev/stdout")); TRY(Core::System::symlink("/proc/self/fd/2", "/dev/stderr")); + TRY(Core::System::mkdir("/dev/gpu", 0755)); + populate_devtmpfs(); TRY(Core::System::mkdir("/dev/pts", 0755)); |