diff --git a/.github/workflows/ci-driver.yml b/.github/workflows/ci-driver.yml
index e13b1bd..ca36085 100644
--- a/.github/workflows/ci-driver.yml
+++ b/.github/workflows/ci-driver.yml
@@ -92,7 +92,7 @@ jobs:
-G "Visual Studio 18 2026"
-A "x64,version=$env:WindowsSDKVersion"
-DBUILD_TESTS=OFF
- -DBUILD_SUNSHINE_VIRTUAL_DISPLAY_DRIVER=ON
+ -DBUILD_VIRTUALDISPLAY_WINDOWS_DRIVER=ON
-DBUILD_VIRTUALDISPLAY_TOOLS=ON
-DBUILD_VIRTUALDISPLAY_PROBE=ON
"-DLIBVIRTUALDISPLAY_PACKAGE_VERSION=$env:PACKAGE_VERSION"
@@ -105,7 +105,7 @@ jobs:
id: driver_catalog
shell: pwsh
run: |
- $catalog = Resolve-Path -LiteralPath (Join-Path $env:DRIVER_PACKAGE 'sunshinevirtualdisplaydriver.cat')
+ $catalog = Resolve-Path -LiteralPath (Join-Path $env:DRIVER_PACKAGE 'lizardbytevirtualdisplay.cat')
"path=$($catalog.Path)" >> $env:GITHUB_OUTPUT
- name: Sign CI driver catalog with a local test certificate
@@ -158,7 +158,7 @@ jobs:
throw "Windows driver catalog signature is invalid: $($signature.StatusMessage)"
}
- $cer = Join-Path $env:DRIVER_PACKAGE 'SunshineVirtualDisplayDriver.cer'
+ $cer = Join-Path $env:DRIVER_PACKAGE 'LizardByteVirtualDisplay.cer'
Export-Certificate -Cert $signature.SignerCertificate -FilePath $cer | Out-Null
- name: Package driver and tools
@@ -175,17 +175,17 @@ jobs:
'LICENSE'
'README.md'
'driver/'
- 'driver/SunshineVirtualDisplayDriver.cat'
- 'driver/SunshineVirtualDisplayDriver.cer'
- 'driver/SunshineVirtualDisplayDriver.dll'
- 'driver/SunshineVirtualDisplayDriver.inf'
+ 'driver/LizardByteVirtualDisplay.cat'
+ 'driver/LizardByteVirtualDisplay.cer'
+ 'driver/LizardByteVirtualDisplay.dll'
+ 'driver/LizardByteVirtualDisplay.inf'
'tools/'
'tools/virtualdisplay.exe'
'tools/virtualdisplay_broker.exe'
'tools/virtualdisplay_probe.exe'
'vulkan-layer/'
- 'vulkan-layer/VkLayer_sunshine_hdr.dll'
- 'vulkan-layer/VkLayer_sunshine_hdr.json'
+ 'vulkan-layer/VkLayer_lizardbyte_hdr.dll'
+ 'vulkan-layer/VkLayer_lizardbyte_hdr.json'
) | ForEach-Object { "$env:WINDOWS_ARCHIVE_NAME/$_" }
$package = Get-Item -LiteralPath "artifacts/$env:WINDOWS_ARCHIVE_NAME.zip"
diff --git a/.gitignore b/.gitignore
index 7c7722b..7d00728 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,11 +7,11 @@ build-*/
cmake-build-*/
# Generated Linux DRM module build outputs.
-/linux/vibeshine-drm/*.o
-/linux/vibeshine-drm/.*.cmd
-/linux/vibeshine-drm/*.ko
-/linux/vibeshine-drm/*.mod
-/linux/vibeshine-drm/*.mod.c
-/linux/vibeshine-drm/Module.symvers
-/linux/vibeshine-drm/modules.order
-/linux/vibeshine-drm/vibeshine_drm_version.h
+/linux/virtualdisplay-drm/*.o
+/linux/virtualdisplay-drm/.*.cmd
+/linux/virtualdisplay-drm/*.ko
+/linux/virtualdisplay-drm/*.mod
+/linux/virtualdisplay-drm/*.mod.c
+/linux/virtualdisplay-drm/Module.symvers
+/linux/virtualdisplay-drm/modules.order
+/linux/virtualdisplay-drm/virtualdisplay_drm_version.h
diff --git a/AGENTS.md b/AGENTS.md
index 8115b51..8c29d06 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -12,6 +12,9 @@
## Style and workflows
+- Keep public APIs and driver behavior independent of host applications. Document the requirements of optional integrations.
+- Use `libvirtualdisplay` for the project and library, `virtualdisplay` for command and Linux component names, and
+ **LizardByte Virtual Display** for the Windows product. Use `LizardByte VD` as the short default EDID monitor name.
- Follow the repository's clang-format configuration. The VKMS-derived subtree follows the upstream kernel configuration.
- Document new and changed C/C++ APIs with Doxygen comments. Keep platform-specific tests under the applicable guards.
- Pin external GitHub Actions to full commit hashes. Declare empty workflow permissions and grant required permissions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1cb2117..b364744 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.24)
project(libvirtualdisplay
VERSION 0.0.0
- DESCRIPTION "Clean-room virtual display driver support for Sunshine."
+ DESCRIPTION "Virtual display drivers, control APIs, and tools."
HOMEPAGE_URL "https://github.com/LizardByte/libvirtualdisplay"
LANGUAGES CXX)
@@ -36,11 +36,10 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
option(BUILD_TESTS "Build tests" ON)
endif()
-option(BUILD_VIBESHINE_KWIN_GPU_BRIDGE
- "Build and install the KWin GPU-association bridge for Vibeshine DRM" OFF)
+option(BUILD_VIRTUALDISPLAY_KWIN_GPU_BRIDGE
+ "Build and install the KWin GPU-association bridge for the DRM backend" OFF)
set(_libvirtualdisplay_build_kwin_bridge OFF)
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND BUILD_VIBESHINE_KWIN_GPU_BRIDGE AND
- NOT SUNSHINE_BUILD_APPIMAGE AND NOT SUNSHINE_BUILD_FLATPAK)
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND BUILD_VIRTUALDISPLAY_KWIN_GPU_BRIDGE)
set(_libvirtualdisplay_build_kwin_bridge ON)
endif()
diff --git a/README.md b/README.md
index c1caea3..8ffd2a7 100644
--- a/README.md
+++ b/README.md
@@ -13,18 +13,12 @@
-Cross-platform virtual display driver support for Sunshine.
-
-This repository owns Sunshine's dedicated virtual display control protocols,
-identity model, EDID generation, Windows UMDF/IddCx driver implementation, and
-Linux DRM virtual-display backend.
-It is intentionally separate from Sunshine's existing `libdisplaydevice`
-dependency, which remains only a display enumeration/settings library.
+libvirtualdisplay provides drivers, C++ control APIs, and tools for creating
+and managing virtual displays. It includes a Windows UMDF/IddCx driver and a
+Linux DRM backend that applications can use independently.
## Scope
-The driver is dedicated to Sunshine virtual-display use cases:
-
- create and remove temporary displays through the control API
- set and query a small permanent-display pool
- preserve stable display identity through `DisplayId`
@@ -57,19 +51,19 @@ and pass `-C Release` to CTest. Standalone GNU test builds enable coverage autom
On Linux, the same build also tests the connector broker, module installer,
kernel-source contract, deterministic HDR EDID, and the public
-`LinuxControlClient`. The `linux/vibeshine-drm` tree contains the GPL-licensed
+`LinuxControlClient`. The `linux/virtualdisplay-drm` tree contains the GPL-licensed
out-of-tree DRM module derived from upstream VKMS; its source files retain the
upstream SPDX identifiers. Service and installer assets live under
`linux/packaging`.
-The optional KWin bridge (`-DBUILD_VIBESHINE_KWIN_GPU_BRIDGE=ON`) requires
+The optional KWin bridge (`-DBUILD_VIRTUALDISPLAY_KWIN_GPU_BRIDGE=ON`) requires
libdrm 2.4.127 or newer and the GBM development package.
-To build only the Windows driver, CLI, and runtime probe:
+To build the Windows driver and tools:
```powershell
-cmake -S . -B build-driver -G Ninja -DBUILD_TESTS=OFF -DBUILD_SUNSHINE_VIRTUAL_DISPLAY_DRIVER=ON -DBUILD_VIRTUALDISPLAY_TOOLS=ON -DBUILD_VIRTUALDISPLAY_PROBE=ON
-cmake --build build-driver --target SunshineVirtualDisplayDriver virtualdisplay_tools -j 10
+cmake -S . -B cmake-build-driver -G Ninja -DBUILD_TESTS=OFF -DBUILD_VIRTUALDISPLAY_WINDOWS_DRIVER=ON -DBUILD_VIRTUALDISPLAY_TOOLS=ON -DBUILD_VIRTUALDISPLAY_PROBE=ON
+cmake --build cmake-build-driver --parallel
```
The Windows driver build requires MSVC and the Windows Driver Kit. Packaging
@@ -81,19 +75,19 @@ developer environment.
To build the release ZIP locally:
```powershell
-cmake -S . -B build-driver -G Ninja -DBUILD_TESTS=OFF -DBUILD_SUNSHINE_VIRTUAL_DISPLAY_DRIVER=ON -DBUILD_VIRTUALDISPLAY_TOOLS=ON -DBUILD_VIRTUALDISPLAY_PROBE=ON -DLIBVIRTUALDISPLAY_PACKAGE_VERSION=0.1.0
-cmake --build build-driver --target package -j 10
+cmake -S . -B cmake-build-driver -G Ninja -DBUILD_TESTS=OFF -DBUILD_VIRTUALDISPLAY_WINDOWS_DRIVER=ON -DBUILD_VIRTUALDISPLAY_TOOLS=ON -DBUILD_VIRTUALDISPLAY_PROBE=ON -DLIBVIRTUALDISPLAY_PACKAGE_VERSION=0.1.0
+cmake --build cmake-build-driver --target package --parallel
```
The ZIP contains:
-- `driver/SunshineVirtualDisplayDriver.inf`
-- `driver/SunshineVirtualDisplayDriver.cat`
-- `driver/SunshineVirtualDisplayDriver.dll`
+- `driver/LizardByteVirtualDisplay.inf`
+- `driver/LizardByteVirtualDisplay.cat`
+- `driver/LizardByteVirtualDisplay.dll`
- `tools/virtualdisplay.exe`
- `tools/virtualdisplay_broker.exe`
- `tools/virtualdisplay_probe.exe`
-- `vulkan-layer/VkLayer_sunshine_hdr.dll` and `vulkan-layer/VkLayer_sunshine_hdr.json`
+- `vulkan-layer/VkLayer_lizardbyte_hdr.dll` and `vulkan-layer/VkLayer_lizardbyte_hdr.json`
- `README.md` and `LICENSE`
Support traces and Event Log capture should follow
@@ -104,8 +98,7 @@ is intended for the driver, CLI, and probe tools.
## CLI usage
-`virtualdisplay.exe` is the user-facing command line tool. It talks to the
-installed driver through the same control interface Sunshine uses.
+`virtualdisplay.exe` manages the **LizardByte Virtual Display** driver through its control interface.
After extracting the release ZIP, run commands from the extracted top-level
directory. Install the driver with:
@@ -117,12 +110,12 @@ directory. Install the driver with:
For a local developer build, the same command can be run from the build output:
```powershell
-.\build-driver\src\driver\virtualdisplay.exe driver install
+.\cmake-build-driver\src\driver\virtualdisplay.exe driver install
```
`driver install` self-elevates through the Windows UAC prompt when it is not
already running as administrator. By default it installs
-`driver\SunshineVirtualDisplayDriver.inf` from the same extracted release
+`driver\LizardByteVirtualDisplay.inf` from the same extracted release
directory. To install a different INF:
```powershell
@@ -190,7 +183,8 @@ Supported settings:
- `--physical-width-mm`: physical panel width advertised in EDID, in millimeters.
- `--physical-height-mm`: physical panel height advertised in EDID, in millimeters.
- `--refresh`: preferred refresh rate. Values up to `1000` are treated as Hz, so `120` means `120 Hz`; larger values are treated as millihertz.
-- `--name`: monitor name advertised in EDID, truncated to the protocol limit.
+- `--name` sets the monitor name advertised in EDID. The default is `LizardByte VD`.
+ The EDID name field holds up to 13 ASCII characters.
The driver validates modes against the protocol range:
@@ -199,7 +193,7 @@ The driver validates modes against the protocol range:
- physical width and height: `10 mm` through `2550 mm`
- refresh: any positive millihertz value accepted by the protocol; the driver no longer applies a policy refresh-rate ceiling
-### Vulkan HDR layer
+### Optional Vulkan HDR layer
Vendor Vulkan ICDs (NVIDIA, Intel) only advertise HDR surface formats for
displays driven by their own display pipeline. Indirect (IddCx) displays are
@@ -211,7 +205,7 @@ correctly when asked (verified by reading back DWM's FP16 scRGB composition
through Desktop Duplication). DirectX HDR is unaffected; this gap is specific
to Vulkan surface-format enumeration.
-`VK_LAYER_SUNSHINE_virtual_hdr` is an implicit Vulkan layer that closes the
+`VK_LAYER_LIZARDBYTE_virtual_hdr` is an implicit Vulkan layer that closes the
gap: it appends the two missing HDR format pairs to
`vkGetPhysicalDeviceSurfaceFormats(2)KHR` results when the surface's monitor
reports HDR support in Windows and the ICD did not already advertise them.
@@ -224,13 +218,15 @@ Register it system-wide with:
```
`vulkan-layer install` self-elevates and registers the manifest from the
-`vulkan-layer` directory of the extracted release (or next to the CLI in a
-build tree); pass `--json PATH` to register a different manifest. Set
-The layer only injects HDR formats while Sunshine publishes an active HDR stream
-signal; outside an HDR stream it remains loaded but passes results through
-unchanged. Set `DISABLE_SUNSHINE_VIRTUAL_HDR=1` to disable it per-process, or
-`SUNSHINE_VHDR_FORCE=1` to inject the formats regardless of the monitor's
-reported HDR support while the Sunshine HDR stream signal is active.
+`vulkan-layer` directory of the extracted release or next to the CLI in a build
+tree. Pass `--json PATH` to register a different manifest.
+
+The layer injects HDR formats while a host signals an active HDR session using
+the Windows event `Global\LizardByteVirtualHdrActive` or its local equivalent
+`Local\LizardByteVirtualHdrActive`. Other queries pass through unchanged.
+Set `DISABLE_LIBVIRTUALDISPLAY_HDR_LAYER=1` to disable the layer for a process.
+Set `LIBVIRTUALDISPLAY_HDR_FORCE=1` to bypass the monitor HDR capability check while
+the event is signaled.
Use `virtualdisplay_probe.exe` for diagnostics and runtime validation rather
than normal display management. Common commands are:
diff --git a/docs/frame-transport.md b/docs/frame-transport.md
index fbd2872..ba25167 100644
--- a/docs/frame-transport.md
+++ b/docs/frame-transport.md
@@ -1,9 +1,9 @@
# Experimental frame transport
-This is the opt-in source path for Nonary/Vibepollo#626. It implements the
-owner-authenticated ring, WDF request identity adapter, IddCx producer, and
-matching host capture integration. Both host and native driver build options
-default off. No signed driver, install, or release is part of this source change.
+The experimental frame transport provides an owner-authenticated frame ring,
+WDF request identity handling, an IddCx producer, and a D3D11 consumer adapter.
+Enable the driver producer with `LIBVIRTUALDISPLAY_ENABLE_FRAME_TRANSPORT`.
+The host application's capture integration is opt-in.
Protocol 3.8 adds `QueryFrameTransportCapabilities` (read access, no input, a
40-byte `FrameTransportCapabilities` reply) and an owner-authenticated target
@@ -101,11 +101,9 @@ primitive, including wrong owner, expiry, failed registration, late clear/error,
display recreation and in-flight resource lifetime. They do not execute WDF,
DXGI handle duplication, GPU synchronization or IddCx callbacks.
-The current host packages self-signed release v1.6.4 from revision
-`2a29ea71a52d15522c95b3de532b6612c54d75cc`, independently of the submodule's
-source revision. Neither build option enables frame push by default. A native
-Windows/WDK build, direct requestor identity/process access checks, four old/new
-host-driver combinations, handle-negative tests, and lifecycle stress must
+Frame push is disabled by default. A native Windows/WDK build, direct requestor
+identity and process access checks, four old/new host-driver combinations,
+handle-negative tests, and lifecycle stress must
precede enabling or shipping it. Keep WGC/DDA available throughout.
Validate frame correctness and acquire-to-receiver timing at 60/120/240 Hz on
diff --git a/docs/support-diagnostics.md b/docs/support-diagnostics.md
index eb82f66..4ffd451 100644
--- a/docs/support-diagnostics.md
+++ b/docs/support-diagnostics.md
@@ -5,7 +5,7 @@ HDR, color profile, swapchain, or driver restart issues.
## Driver ETW Trace
-The UMDF driver registers the `Sunshine.VirtualDisplayDriver` TraceLogging
+The UMDF driver registers the `LizardByte.VirtualDisplay` TraceLogging
provider:
- Provider GUID: `{3d5d3bd9-8500-4523-9334-583f4b5e6f80}`
@@ -18,9 +18,9 @@ provider:
Collect a live trace with:
```powershell
-logman start SunshineVDD -p "{3d5d3bd9-8500-4523-9334-583f4b5e6f80}" 0xffffffff 0xff -ets
+logman start VirtualDisplayDriver -p "{3d5d3bd9-8500-4523-9334-583f4b5e6f80}" 0xffffffff 0xff -ets
# Reproduce the issue.
-logman stop SunshineVDD -ets
+logman stop VirtualDisplayDriver -ets
```
Export or archive the generated ETL with the matching driver package, PDB, and
@@ -37,10 +37,10 @@ recent in-memory trace ring with:
## Broker And Helper Events
The broker and active-session helper write Windows Event Log entries through
-the `SunshineVirtualDisplayBroker` source. Capture recent entries with:
+the `LizardByteVirtualDisplayBroker` source. Capture recent entries with:
```powershell
-wevtutil qe Application /q:"*[System[Provider[@Name='SunshineVirtualDisplayBroker']]]" /f:text /c:100
+wevtutil qe Application /q:"*[System[Provider[@Name='LizardByteVirtualDisplayBroker']]]" /f:text /c:100
```
Include these helper command outputs when they are relevant:
diff --git a/linux/kwin-gpu-bridge.md b/linux/kwin-gpu-bridge.md
index 423ccd9..b6c07d4 100644
--- a/linux/kwin-gpu-bridge.md
+++ b/linux/kwin-gpu-bridge.md
@@ -1,12 +1,11 @@
# KWin virtual rendering bridge
-The native Linux package preloads `libvibeshine-kwin-gpu.so` into the KDE
-desktop and login compositors. Only `/usr/bin/kwin_wayland` enables its hooks;
-other processes pass through unchanged and compositor children do not inherit
-the preload.
+The optional bridge loads `libvirtualdisplay-kwin-gpu.so` into the KDE desktop and
+login compositors. Its hooks activate in `/usr/bin/kwin_wayland`, and the
+compositor's children run without the preload.
For KWin's recognized legacy GBM allocator ABI (including KWin 6.7), the
-bridge gives a Vibeshine faux KMS device a GBM allocator opened on a real
+bridge gives a libvirtualdisplay faux KMS device a GBM allocator opened on a real
NVIDIA render node. The original KMS fd remains the output's scanout endpoint.
Physical DRM devices, libdrm identities and enumeration order are unchanged.
KWin and EGL use their normal per-output GPU import path. This also avoids advertising the virtual card as a second copy of an
@@ -22,7 +21,7 @@ allocation keep the NVIDIA render fd. This scope is thread-local and restored
after nested or failed allocations. Physical seat allocators retain their fds.
KWin 6.8 also resolves each display's compatible render device independently
-of its GBM allocator. For the Vibeshine faux device alone, the bridge asks
+of its GBM allocator. For the libvirtualdisplay faux device alone, the bridge asks
KWin's compatibility policy for the same verified NVIDIA render device. The
physical seat and libdrm device identities are unchanged. If that renderer is
unavailable, KWin's original compatibility policy remains the fallback. Merely
@@ -63,7 +62,7 @@ PCI identity explicitly for each intended KWin service:
```ini
# /etc/systemd/user/plasma-kwin_wayland.service.d/90-virtual-renderer.conf
[Service]
-Environment=VIBESHINE_KWIN_RENDER_PCI=0000:01:00.0
+Environment=VIRTUALDISPLAY_KWIN_RENDER_PCI=0000:01:00.0
```
The login compositor uses `plasma-login-kwin_wayland.service.d` with the same
@@ -71,9 +70,9 @@ setting. These settings take effect when the corresponding compositor next
starts. No monitor or dummy plug is required by the bridge. An unrelated seat
GPU, including a VM's Virtio console, retains its own GBM device.
-`VIBESHINE_KWIN_RENDER_PCI` selects **virtual-output rendering**. Vibeshine's
-`adapter_name` selects **capture/encoding** and must not implicitly change the
-compositor's seat primary. To use the same GPU for both, resolve the chosen
+`VIRTUALDISPLAY_KWIN_RENDER_PCI` selects the GPU for virtual-output rendering.
+Applications choose their capture and encoding GPU independently of the
+compositor's primary GPU. To use the same GPU for both, resolve the chosen
render node's `/sys/class/drm/renderD*/device` to its PCI identity and configure
the virtual renderer deliberately. The automatic default does not infer the
encoder or KWin's eventual primary renderer: KWin constructs these allocators
diff --git a/linux/kwin_gpu_interposer.cpp b/linux/kwin_gpu_interposer.cpp
index 90fa27e..90747de 100644
--- a/linux/kwin_gpu_interposer.cpp
+++ b/linux/kwin_gpu_interposer.cpp
@@ -19,7 +19,7 @@
#include
#include
-#ifdef VIBESHINE_KWIN_NATIVE_ALLOCATOR
+#ifdef VIRTUALDISPLAY_KWIN_NATIVE_ALLOCATOR
#include "kwin_native_abi.h"
#include
@@ -32,8 +32,8 @@ namespace {
using drm_get_devices2_fn = int (*)(std::uint32_t, drmDevicePtr[], int);
using drm_get_device2_fn = int (*)(int, std::uint32_t, drmDevicePtr *);
- constexpr std::string_view kRenderPciEnvironment = "VIBESHINE_KWIN_RENDER_PCI";
- constexpr std::string_view kPreloadActiveEnvironment = "VIBESHINE_KWIN_GPU_PRELOAD_ACTIVE";
+ constexpr std::string_view kRenderPciEnvironment = "VIRTUALDISPLAY_KWIN_RENDER_PCI";
+ constexpr std::string_view kPreloadActiveEnvironment = "VIRTUALDISPLAY_KWIN_GPU_PRELOAD_ACTIVE";
std::atomic real_gbm_create_device {nullptr};
std::atomic real_gbm_device_destroy {nullptr};
@@ -56,7 +56,7 @@ namespace {
std::unordered_map owned_render_fds;
thread_local bool software_allocation = false;
-#ifdef VIBESHINE_KWIN_NATIVE_ALLOCATOR
+#ifdef VIRTUALDISPLAY_KWIN_NATIVE_ALLOCATOR
using native_allocate_fn = KWin::GraphicsBuffer *(*)(void *, const KWin::GraphicsBufferOptions &);
std::atomic real_native_allocate {nullptr};
constexpr char native_allocate_symbol[] = "_ZN4KWin26GbmGraphicsBufferAllocator8allocateERKNS_21GraphicsBufferOptionsE";
@@ -66,17 +66,17 @@ namespace {
#endif
bool native_allocator_runtime_compatible(bool report_failure = false) {
-#ifdef VIBESHINE_KWIN_NATIVE_ALLOCATOR
+#ifdef VIRTUALDISPLAY_KWIN_NATIVE_ALLOCATOR
// GraphicsBufferOptions is a C++ ABI. Only read the layout of the exact
// KWin library whose public headers were used to build this bridge.
- const auto probe = vibeshine::kwin::probe_native_abi(
+ const auto probe = virtual_display::kwin::probe_native_abi(
native_allocate_symbol,
- VIBESHINE_KWIN_NATIVE_LIBRARY_NAME
+ VIRTUALDISPLAY_KWIN_NATIVE_LIBRARY_NAME
);
if (report_failure) {
- vibeshine::kwin::report_native_abi_failure(stderr, probe, VIBESHINE_KWIN_NATIVE_LIBRARY_NAME);
+ virtual_display::kwin::report_native_abi_failure(stderr, probe, VIRTUALDISPLAY_KWIN_NATIVE_LIBRARY_NAME);
}
- return probe.result == vibeshine::kwin::native_abi_result::compatible;
+ return probe.result == virtual_display::kwin::native_abi_result::compatible;
#else
(void) report_failure;
#endif
@@ -96,9 +96,9 @@ namespace {
return function;
}
- bool is_vibeshine_display(const drmDevicePtr device) {
+ bool is_virtualdisplay_display(const drmDevicePtr device) {
return device && device->bustype == DRM_BUS_FAUX && device->businfo.faux &&
- std::strcmp(device->businfo.faux->name, "vibeshine") == 0;
+ std::strcmp(device->businfo.faux->name, "virtualdisplay") == 0;
}
bool is_nvidia_render_device(const drmDevicePtr device) {
@@ -149,7 +149,7 @@ namespace {
if (!configured_value.empty() && !configured) {
if (!ambiguous_gpu_logged.exchange(true, std::memory_order_relaxed)) {
constexpr char message[] =
- "[vibeshine-kwin-gpu] invalid VIBESHINE_KWIN_RENDER_PCI; refusing virtual GPU association\n";
+ "[virtualdisplay-kwin-gpu] invalid VIRTUALDISPLAY_KWIN_RENDER_PCI; refusing virtual GPU association\n";
(void) write(STDERR_FILENO, message, sizeof(message) - 1);
}
return nullptr;
@@ -171,7 +171,7 @@ namespace {
}
if (matches > 1 && !ambiguous_gpu_logged.exchange(true, std::memory_order_relaxed)) {
constexpr char message[] =
- "[vibeshine-kwin-gpu] multiple NVIDIA render devices found; using lowest PCI address for virtual outputs unless VIBESHINE_KWIN_RENDER_PCI selects another\n";
+ "[virtualdisplay-kwin-gpu] multiple NVIDIA render devices found; using lowest PCI address for virtual outputs unless VIRTUALDISPLAY_KWIN_RENDER_PCI selects another\n";
(void) write(STDERR_FILENO, message, sizeof(message) - 1);
}
// GBM allocators are created before KWin chooses its primary renderer.
@@ -228,7 +228,7 @@ namespace {
return;
}
char message[224] {};
- const auto length = std::snprintf(message, sizeof(message), "[vibeshine-kwin-gpu] virtual GBM uses NVIDIA render node %04x:%02x:%02x.%u; seat DRM devices unchanged\n", identity.domain, identity.bus, identity.dev, identity.func);
+ const auto length = std::snprintf(message, sizeof(message), "[virtualdisplay-kwin-gpu] virtual GBM uses NVIDIA render node %04x:%02x:%02x.%u; seat DRM devices unchanged\n", identity.domain, identity.bus, identity.dev, identity.func);
if (length > 0) {
(void) write(STDERR_FILENO, message, std::min(static_cast(length), sizeof(message) - 1));
}
@@ -260,7 +260,7 @@ namespace {
const bool legacy_allocator = lookup(RTLD_DEFAULT, "_ZN4KWin26GbmGraphicsBufferAllocatorC1EP10gbm_devicem") != nullptr;
const bool native_allocator = lookup(RTLD_DEFAULT, "_ZN4KWin26GbmGraphicsBufferAllocatorC1EPNS_9DrmDeviceE") != nullptr;
bool native_supported = false;
-#ifdef VIBESHINE_KWIN_NATIVE_ALLOCATOR
+#ifdef VIRTUALDISPLAY_KWIN_NATIVE_ALLOCATOR
native_supported = native_allocator && !legacy_allocator && native_abi_compatible;
#endif
native_hooks_enabled.store(native_supported, std::memory_order_release);
@@ -271,7 +271,7 @@ namespace {
if (!hooks_enabled.load(std::memory_order_acquire)) {
(void) native_allocator_runtime_compatible(true);
constexpr char message[] =
- "[vibeshine-kwin-gpu] preserving native KMS allocator for current KWin ABI\n";
+ "[virtualdisplay-kwin-gpu] preserving native KMS allocator for current KWin ABI\n";
(void) write(STDERR_FILENO, message, sizeof(message) - 1);
}
}
@@ -305,7 +305,7 @@ extern "C" gbm_device *gbm_create_device(const int fd) {
const auto get_device = resolve_real_function(real_drm_get_device2, "drmGetDevice2");
drmDevicePtr device = nullptr;
const bool virtual_display = get_device && get_device(fd, 0, &device) == 0 &&
- is_vibeshine_display(device);
+ is_virtualdisplay_display(device);
drmFreeDevice(&device);
if (!virtual_display) {
return pass_through();
@@ -386,16 +386,16 @@ extern "C" int gbm_device_get_fd(gbm_device *device) {
return function(device);
}
-#ifdef VIBESHINE_KWIN_NATIVE_ALLOCATOR
-extern "C" void *vibeshine_kwin_render_device(const void *, drmDevicePtr) asm("_ZNK4KWin10GpuManager26findCompatibleRenderDeviceEP10_drmDevice");
+#ifdef VIRTUALDISPLAY_KWIN_NATIVE_ALLOCATOR
+extern "C" void *virtualdisplay_kwin_render_device(const void *, drmDevicePtr) asm("_ZNK4KWin10GpuManager26findCompatibleRenderDeviceEP10_drmDevice");
-extern "C" void *vibeshine_kwin_render_device(const void *manager, drmDevicePtr device) {
+extern "C" void *virtualdisplay_kwin_render_device(const void *manager, drmDevicePtr device) {
const auto function = resolve_real_function(real_native_render_device, native_render_device_symbol);
if (!function) {
errno = ENOSYS;
return nullptr;
}
- if (native_hooks_enabled.load(std::memory_order_acquire) && is_vibeshine_display(device)) {
+ if (native_hooks_enabled.load(std::memory_order_acquire) && is_virtualdisplay_display(device)) {
// KWin 6.8 chooses render devices independently of the scanout allocator.
// Ask its normal compatibility policy about the verified NVIDIA device,
// only for our virtual output. Never rewrite either device's identity.
@@ -418,9 +418,9 @@ extern "C" void *vibeshine_kwin_render_device(const void *manager, drmDevicePtr
return function(manager, device);
}
-extern "C" KWin::GraphicsBuffer *vibeshine_kwin_allocate(void *, const KWin::GraphicsBufferOptions &) asm("_ZN4KWin26GbmGraphicsBufferAllocator8allocateERKNS_21GraphicsBufferOptionsE");
+extern "C" KWin::GraphicsBuffer *virtualdisplay_kwin_allocate(void *, const KWin::GraphicsBufferOptions &) asm("_ZN4KWin26GbmGraphicsBufferAllocator8allocateERKNS_21GraphicsBufferOptionsE");
-extern "C" KWin::GraphicsBuffer *vibeshine_kwin_allocate(void *allocator, const KWin::GraphicsBufferOptions &options) {
+extern "C" KWin::GraphicsBuffer *virtualdisplay_kwin_allocate(void *allocator, const KWin::GraphicsBufferOptions &options) {
const auto function = resolve_real_function(real_native_allocate, native_allocate_symbol);
if (!function) {
errno = ENOSYS;
@@ -444,6 +444,6 @@ extern "C" KWin::GraphicsBuffer *vibeshine_kwin_allocate(void *allocator, const
}
#endif
-extern "C" unsigned int vibeshine_kwin_gpu_interposer_abi() {
+extern "C" unsigned int virtualdisplay_kwin_gpu_interposer_abi() {
return 7;
}
diff --git a/linux/kwin_native_abi.h b/linux/kwin_native_abi.h
index 58a0b09..0d494b6 100644
--- a/linux/kwin_native_abi.h
+++ b/linux/kwin_native_abi.h
@@ -7,7 +7,7 @@
#include
#include
-namespace vibeshine::kwin {
+namespace virtual_display::kwin {
enum class native_abi_result {
compatible,
missing_allocator,
@@ -76,7 +76,7 @@ namespace vibeshine::kwin {
break;
}
std::fprintf(output,
- "[vibeshine-kwin-gpu] native GPU bridge disabled: %s (built for %s; resolved current pathname %s; mapped library identity unverified). "
+ "[virtualdisplay-kwin-gpu] native GPU bridge disabled: %s (built for %s; resolved current pathname %s; mapped library identity unverified). "
"Keeping native KMS allocation; virtual capture may fall back to CPU upload. "
"Install a bridge package rebuilt against the installed KWin, then log out and back in or reboot. "
"Restarting the streaming service alone does not reload the compositor bridge.\n",
@@ -84,4 +84,4 @@ namespace vibeshine::kwin {
expected_library,
probe.resolved_library[0] ? probe.resolved_library.data() : "unknown");
}
-} // namespace vibeshine::kwin
+} // namespace virtual_display::kwin
diff --git a/linux/packaging/vibeshine-drm-setup.service.in b/linux/packaging/vibeshine-drm-setup.service.in
deleted file mode 100644
index 1cb26eb..0000000
--- a/linux/packaging/vibeshine-drm-setup.service.in
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Build and install Vibeshine HDR DRM module
-Documentation=https://github.com/Nonary/vibeshine
-After=local-fs.target
-Before=vibeshine-vkms.service display-manager.service
-
-[Service]
-Type=oneshot
-ExecStart=@VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/vibeshine-drm-install install
-SuccessExitStatus=4 5
-TimeoutStartSec=10min
-UMask=0022
diff --git a/linux/packaging/vibeshine-vkms-control.socket.in b/linux/packaging/vibeshine-vkms-control.socket.in
deleted file mode 100644
index 11334d8..0000000
--- a/linux/packaging/vibeshine-vkms-control.socket.in
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Vibeshine virtual-display control socket
-PartOf=vibeshine-vkms.service
-
-[Socket]
-ListenStream=/run/vibeshine/vkms-control.sock
-SocketMode=0660
-SocketGroup=vibeshine-vkms
-DirectoryMode=0755
-Accept=yes
-RemoveOnStop=yes
-MaxConnections=16
-MaxConnectionsPerSource=4
diff --git a/linux/packaging/vibeshine-vkms.service.in b/linux/packaging/vibeshine-vkms.service.in
deleted file mode 100644
index ad901ee..0000000
--- a/linux/packaging/vibeshine-vkms.service.in
+++ /dev/null
@@ -1,22 +0,0 @@
-[Unit]
-Description=Vibeshine virtual display pool
-Documentation=https://docs.kernel.org/gpu/vkms.html
-Wants=vibeshine-drm-setup.service vibeshine-vkms-control.socket
-After=systemd-modules-load.service vibeshine-drm-setup.service
-Before=systemd-user-sessions.service display-manager.service
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-RuntimeDirectory=vibeshine/vkms-leases
-RuntimeDirectoryMode=0700
-ExecStartPre=@VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/vibeshine-drm-install status
-ExecStart=@VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/vibeshine-vkms start
-ExecStop=@VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/vibeshine-vkms stop
-ExecStopPost=@VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/vibeshine-vkms-quiesce
-TimeoutStartSec=30s
-TimeoutStopSec=30s
-UMask=0022
-
-[Install]
-WantedBy=multi-user.target
diff --git a/linux/packaging/vibeshine-vkms.sysusers b/linux/packaging/vibeshine-vkms.sysusers
deleted file mode 100644
index 29a6f9c..0000000
--- a/linux/packaging/vibeshine-vkms.sysusers
+++ /dev/null
@@ -1 +0,0 @@
-g vibeshine-vkms - -
diff --git a/linux/packaging/vibeshine-drm-install.in b/linux/packaging/virtualdisplay-drm-install.in
similarity index 95%
rename from linux/packaging/vibeshine-drm-install.in
rename to linux/packaging/virtualdisplay-drm-install.in
index 469be00..df26e62 100644
--- a/linux/packaging/vibeshine-drm-install.in
+++ b/linux/packaging/virtualdisplay-drm-install.in
@@ -1,15 +1,15 @@
#!/usr/bin/env bash
-# Install Vibeshine's out-of-tree DRM module. DKMS is preferred so kernel
+# Install libvirtualdisplay's out-of-tree DRM module. DKMS is preferred so kernel
# updates rebuild the module; a current-kernel direct build is the fallback.
set -uo pipefail
umask 022
-PROGRAM_NAME="vibeshine-drm-install"
-DKMS_NAME="vibeshine-drm"
-MODULE_NAME="vibeshine_drm"
+PROGRAM_NAME="virtualdisplay-drm-install"
+DKMS_NAME="virtualdisplay-drm"
+MODULE_NAME="virtualdisplay_drm"
MODULE_VERSION="@PROJECT_VERSION_NUMERIC@"
-MODULE_SOURCE_ID="@VIBESHINE_DRM_SOURCE_ID@"
+MODULE_SOURCE_ID="@VIRTUALDISPLAY_DRM_SOURCE_ID@"
RELOAD_REQUIRED_EXIT=4
ENROLLMENT_PENDING_EXIT=5
@@ -126,7 +126,7 @@ prepare_signing_key() {
log "generating the local DKMS module-signing key"
if ! (umask 077 && openssl req -new -x509 -nodes -days 36500 \
- -subj "/CN=Vibeshine DKMS module signing key/" \
+ -subj "/CN=libvirtualdisplay DKMS module signing key/" \
-newkey rsa:2048 -keyout "$MOK_SIGNING_KEY" \
-addext "extendedKeyUsage=codeSigning" \
-outform DER -out "$MOK_CERTIFICATE" >/dev/null 2>&1); then
@@ -221,7 +221,7 @@ verify_module_signature_matches_certificate() {
module_key=${module_key//:/}
module_key=${module_key^^}
if [[ -z "$module_key" || "$module_key" != "$certificate_key" ]]; then
- error "${module_file} was not signed with the configured Vibeshine key"
+ error "${module_file} was not signed with the configured libvirtualdisplay key"
return 1
fi
}
@@ -382,17 +382,17 @@ report_enrollment_needed() {
fi
if [[ "$boot_state" == enabled ]]; then
- log "Secure Boot is enabled, but the Vibeshine module-signing key is not trusted."
+ log "Secure Boot is enabled, but the libvirtualdisplay module-signing key is not trusted."
else
- log "The running kernel enforces signatures, but the Vibeshine module-signing key is not trusted."
+ log "The running kernel enforces signatures, but the libvirtualdisplay module-signing key is not trusted."
fi
if mok_manager_is_active; then
- log "Run '@VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/${PROGRAM_NAME} enroll-key', reboot, and complete the MOK requests."
+ log "Run '@VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/${PROGRAM_NAME} enroll-key', reboot, and complete the MOK requests."
elif sbctl_is_configured; then
log "This system uses direct sbctl/UEFI owner keys. Those keys trust EFI programs, not out-of-tree Linux modules."
- log "For trusted module loading, boot through shim once and enroll the Vibeshine MOK key."
+ log "For trusted module loading, boot through shim once and enroll the libvirtualdisplay MOK key."
else
- log "Boot through shim once, then run '@VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/${PROGRAM_NAME} enroll-key'."
+ log "Boot through shim once, then run '@VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/${PROGRAM_NAME} enroll-key'."
fi
error "the running kernel enforces trusted module signatures; managed displays remain unavailable until enrollment"
}
@@ -440,7 +440,7 @@ finish_module_installation() {
fi
if ((AUTO_ENROLL)); then
- log "this kernel requires one-time authorization of the Vibeshine module-signing key"
+ log "this kernel requires one-time authorization of the libvirtualdisplay module-signing key"
if ! request_signing_key_enrollment; then
error "could not start the module-signing authorization prompt"
return 1
@@ -574,9 +574,9 @@ require_supported_kernel() {
error "managed virtual displays require Linux 6.16 or newer"
error "the running kernel is ${kernel_release} and is unsupported"
fi
- error "Vibeshine was installed, but its virtual-display driver was not"
+ error "libvirtualdisplay was installed, but its DRM module was not"
error "install and boot a supported Linux kernel, then retry:"
- error " sudo @VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/${PROGRAM_NAME} install"
+ error " sudo @VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/${PROGRAM_NAME} install"
return 1
}
@@ -611,7 +611,7 @@ report_missing_kernel_headers() {
error "install matching kernel headers that provide ${build_dir}"
fi
error "then retry:"
- error " sudo @VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/${PROGRAM_NAME} install"
+ error " sudo @VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/${PROGRAM_NAME} install"
}
validate_source_tree() {
@@ -872,7 +872,7 @@ install_with_dkms() {
direct_destination() {
local kernel_release=$1
- printf '%s/%s/updates/vibeshine/%s.ko\n' "$MODULES_ROOT" "$kernel_release" "$MODULE_NAME"
+ printf '%s/%s/updates/virtualdisplay/%s.ko\n' "$MODULES_ROOT" "$kernel_release" "$MODULE_NAME"
}
direct_marker() {
@@ -926,7 +926,7 @@ install_direct() (
error "temporary build root is unavailable or unsafe: ${BUILD_TMP_ROOT}"
return 1
fi
- if ! build_workdir=$(mktemp -d "$BUILD_TMP_ROOT/vibeshine-drm-build.XXXXXX"); then
+ if ! build_workdir=$(mktemp -d "$BUILD_TMP_ROOT/virtualdisplay-drm-build.XXXXXX"); then
error "could not create a temporary module build directory"
return 1
fi
@@ -988,7 +988,7 @@ cleanup_build_directory() {
local build_workdir=$1
case "$build_workdir" in
- "$BUILD_TMP_ROOT"/vibeshine-drm-build.*)
+ "$BUILD_TMP_ROOT"/virtualdisplay-drm-build.*)
;;
*)
error "refusing cleanup of unexpected temporary path: ${build_workdir}"
@@ -1032,7 +1032,7 @@ install_module() {
error "preserving the current DKMS installation signed with the system-configured key"
return 1
fi
- log "DKMS cannot guarantee the Vibeshine signing key; using a verified direct build"
+ log "DKMS cannot guarantee the libvirtualdisplay signing key; using a verified direct build"
else
log "DKMS is unavailable; attempting a current-kernel direct build"
fi
@@ -1066,7 +1066,7 @@ remove_direct_marker() {
done <"$marker"
case "$destination" in
- "$MODULES_ROOT"/*"/updates/vibeshine/${MODULE_NAME}.ko")
+ "$MODULES_ROOT"/*"/updates/virtualdisplay/${MODULE_NAME}.ko")
;;
*)
error "refusing unsafe direct-install destination in ${marker}: ${destination}"
@@ -1272,7 +1272,7 @@ module_status() {
return 3
fi
if ! installed_module_matches_signing_certificate "$kernel_release"; then
- error "the module selected for ${kernel_release} does not have the expected Vibeshine signature"
+ error "the module selected for ${kernel_release} does not have the expected libvirtualdisplay signature"
return 3
fi
report_enrollment_needed
@@ -1290,8 +1290,8 @@ main() {
# Privileged production paths are fixed at configure time and cannot be
# redirected through the environment. Tests source the functions directly.
configure_install_paths \
- "@VIBESHINE_DRM_SOURCE_INSTALL_DIR@" \
- /var/lib/vibeshine-drm \
+ "@VIRTUALDISPLAY_DRM_SOURCE_INSTALL_DIR@" \
+ /var/lib/virtualdisplay-drm \
/lib/modules \
/sys/module \
/var/tmp \
diff --git a/linux/packaging/virtualdisplay-drm-setup.service.in b/linux/packaging/virtualdisplay-drm-setup.service.in
new file mode 100644
index 0000000..1acb8c9
--- /dev/null
+++ b/linux/packaging/virtualdisplay-drm-setup.service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=Build and install libvirtualdisplay HDR DRM module
+Documentation=https://github.com/LizardByte/libvirtualdisplay
+After=local-fs.target
+Before=virtualdisplay-vkms.service display-manager.service
+
+[Service]
+Type=oneshot
+ExecStart=@VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/virtualdisplay-drm-install install
+SuccessExitStatus=4 5
+TimeoutStartSec=10min
+UMask=0022
diff --git a/linux/packaging/vibeshine-kwin-gpu.conf.in b/linux/packaging/virtualdisplay-kwin-gpu.conf.in
similarity index 85%
rename from linux/packaging/vibeshine-kwin-gpu.conf.in
rename to linux/packaging/virtualdisplay-kwin-gpu.conf.in
index a23b4d1..7ecc746 100644
--- a/linux/packaging/vibeshine-kwin-gpu.conf.in
+++ b/linux/packaging/virtualdisplay-kwin-gpu.conf.in
@@ -5,8 +5,8 @@
# compositor children never inherit the bridge.
[Service]
UnsetEnvironment=LD_AUDIT LD_DEBUG LD_DEBUG_OUTPUT LD_LIBRARY_PATH LD_ORIGIN_PATH LD_PROFILE LD_SHOW_AUXV
-Environment=LD_PRELOAD=@VIBESHINE_KWIN_GPU_LIBRARY_NAME@
-Environment=VIBESHINE_KWIN_GPU_PRELOAD_ACTIVE=1
+Environment=LD_PRELOAD=@VIRTUALDISPLAY_KWIN_GPU_LIBRARY_NAME@
+Environment=VIRTUALDISPLAY_KWIN_GPU_PRELOAD_ACTIVE=1
# The faux KMS identity cannot expose NVIDIA's SHM/udmabuf import limitation.
# KWin reads this before GBM routing; SHM retains its CPU upload fallback.
Environment=KWIN_DISABLE_UDMABUF_IMPORT=1
diff --git a/linux/packaging/vibeshine-login-kwin-gpu.conf.in b/linux/packaging/virtualdisplay-login-kwin-gpu.conf.in
similarity index 82%
rename from linux/packaging/vibeshine-login-kwin-gpu.conf.in
rename to linux/packaging/virtualdisplay-login-kwin-gpu.conf.in
index 05d5fab..ddfedbd 100644
--- a/linux/packaging/vibeshine-login-kwin-gpu.conf.in
+++ b/linux/packaging/virtualdisplay-login-kwin-gpu.conf.in
@@ -3,8 +3,8 @@
# set-user-ID library in the system directory and drops LD_PRELOAD afterwards.
[Service]
UnsetEnvironment=LD_AUDIT LD_DEBUG LD_DEBUG_OUTPUT LD_LIBRARY_PATH LD_ORIGIN_PATH LD_PROFILE LD_SHOW_AUXV
-Environment=LD_PRELOAD=@VIBESHINE_KWIN_GPU_LIBRARY_NAME@
-Environment=VIBESHINE_KWIN_GPU_PRELOAD_ACTIVE=1
+Environment=LD_PRELOAD=@VIRTUALDISPLAY_KWIN_GPU_LIBRARY_NAME@
+Environment=VIRTUALDISPLAY_KWIN_GPU_PRELOAD_ACTIVE=1
# The faux KMS identity cannot expose NVIDIA's SHM/udmabuf import limitation.
# KWin reads this before GBM routing; SHM retains its CPU upload fallback.
Environment=KWIN_DISABLE_UDMABUF_IMPORT=1
diff --git a/linux/packaging/vibeshine-vkms b/linux/packaging/virtualdisplay-vkms
similarity index 98%
rename from linux/packaging/vibeshine-vkms
rename to linux/packaging/virtualdisplay-vkms
index ea54a00..77dd47b 100755
--- a/linux/packaging/vibeshine-vkms
+++ b/linux/packaging/virtualdisplay-vkms
@@ -1,15 +1,14 @@
#!/usr/bin/env bash
-# Provision the private DRM outputs used by Vibeshine's Linux virtual-display
-# backend. This helper is intentionally root-run: mounting configfs, loading
-# VKMS, and changing configfs objects are privileged operations.
+# Provision the private DRM outputs used by libvirtualdisplay's Linux backend.
+# Mounting configfs, loading VKMS, and changing configfs objects require root.
set -uo pipefail
-PROGRAM_NAME="vibeshine-vkms"
-VKMS_DEVICE_NAME="vibeshine"
+PROGRAM_NAME="virtualdisplay-vkms"
+VKMS_DEVICE_NAME="virtualdisplay"
VKMS_OUTPUT_COUNT=8
-DRM_MODULE="vibeshine_drm"
-DRM_BACKEND="vibeshine-drm"
+DRM_MODULE="virtualdisplay_drm"
+DRM_BACKEND="virtualdisplay-drm"
CONNECTOR_STATUS_CONNECTED=1
CONNECTOR_STATUS_DISCONNECTED=2
@@ -96,11 +95,11 @@ ensure_configfs() {
ensure_display_backend() {
if [[ -d "$VKMS_CONFIGFS_ROOT" ]]; then
- log "using Vibeshine DRM HDR virtual-display backend"
+ log "using libvirtualdisplay HDR DRM backend"
return 0
fi
- log "loading the Vibeshine DRM HDR virtual-display module"
+ log "loading the libvirtualdisplay HDR DRM module"
if ! modprobe "$DRM_MODULE" create_default_dev=0; then
error "${DRM_MODULE} is unavailable; refusing CPU-backed stock VKMS fallback"
return 1
@@ -109,7 +108,7 @@ ensure_display_backend() {
error "${DRM_MODULE} loaded without its expected configfs subsystem at ${VKMS_CONFIGFS_ROOT}"
return 1
fi
- log "using Vibeshine DRM HDR virtual-display backend"
+ log "using libvirtualdisplay HDR DRM backend"
}
write_attribute() {
@@ -301,7 +300,7 @@ cleanup_is_safe() {
local group group_dir entry name index
# Cleanup never accepts a caller-provided instance name and only works below
- # the path derived from the fixed "vibeshine" instance identifier.
+ # the path derived from the fixed "virtualdisplay" instance identifier.
if [[ "$VKMS_DEVICE_DIR" != "${VKMS_CONFIGFS_ROOT}/${VKMS_DEVICE_NAME}" ]]; then
error "refusing cleanup of unexpected path: ${VKMS_DEVICE_DIR}"
return 1
@@ -1016,7 +1015,7 @@ main() {
# Do not accept an environment override for this privileged path. Cleanup is
# deliberately restricted to one exact configfs instance.
configure_paths /sys/kernel/config
- configure_lease_paths /run/vibeshine/vkms-leases
+ configure_lease_paths /run/virtualdisplay/vkms-leases
FAKE_CONFIGFS=0
require_command awk || return 1
diff --git a/linux/packaging/virtualdisplay-vkms-control.socket.in b/linux/packaging/virtualdisplay-vkms-control.socket.in
new file mode 100644
index 0000000..80912d9
--- /dev/null
+++ b/linux/packaging/virtualdisplay-vkms-control.socket.in
@@ -0,0 +1,13 @@
+[Unit]
+Description=libvirtualdisplay control socket
+PartOf=virtualdisplay-vkms.service
+
+[Socket]
+ListenStream=/run/virtualdisplay/vkms-control.sock
+SocketMode=0660
+SocketGroup=virtualdisplay-vkms
+DirectoryMode=0755
+Accept=yes
+RemoveOnStop=yes
+MaxConnections=16
+MaxConnectionsPerSource=4
diff --git a/linux/packaging/vibeshine-vkms-control@.service.in b/linux/packaging/virtualdisplay-vkms-control@.service.in
similarity index 59%
rename from linux/packaging/vibeshine-vkms-control@.service.in
rename to linux/packaging/virtualdisplay-vkms-control@.service.in
index da95f1d..07749bf 100644
--- a/linux/packaging/vibeshine-vkms-control@.service.in
+++ b/linux/packaging/virtualdisplay-vkms-control@.service.in
@@ -1,16 +1,16 @@
[Unit]
-Description=Vibeshine virtual-display control connection
-Requires=vibeshine-vkms.service
-After=vibeshine-vkms.service
+Description=libvirtualdisplay control connection
+Requires=virtualdisplay-vkms.service
+After=virtualdisplay-vkms.service
# Let an admitted connector request finish before the machine host completes
# its shutdown fence; the bounded request cgroup still ends before the
# client's longer protocol deadline.
-Before=vibeshine.service
+Before=virtualdisplay.service
[Service]
Type=exec
User=root
-ExecStart=@VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/vibeshine-vkms-peercred @VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/vibeshine-vkms control
+ExecStart=@VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/virtualdisplay-vkms-peercred @VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/virtualdisplay-vkms control
StandardInput=socket
StandardOutput=socket
StandardError=journal
@@ -25,7 +25,7 @@ NoNewPrivileges=yes
PrivateTmp=yes
ProtectHome=yes
ProtectSystem=strict
-ReadWritePaths=-/sys/kernel/config/vibeshine-drm -/sys/kernel/config/vkms /run/vibeshine/vkms-leases
+ReadWritePaths=-/sys/kernel/config/virtualdisplay-drm -/sys/kernel/config/vkms /run/virtualdisplay/vkms-leases
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
diff --git a/linux/packaging/vibeshine-vkms-quiesce b/linux/packaging/virtualdisplay-vkms-quiesce
similarity index 77%
rename from linux/packaging/vibeshine-vkms-quiesce
rename to linux/packaging/virtualdisplay-vkms-quiesce
index 4b665a9..e1e5dbf 100755
--- a/linux/packaging/vibeshine-vkms-quiesce
+++ b/linux/packaging/virtualdisplay-vkms-quiesce
@@ -4,8 +4,8 @@
set -uo pipefail
-PROGRAM_NAME="vibeshine-vkms-quiesce"
-QUIESCE_PATH="${VIBESHINE_VKMS_QUIESCE_PATH:-/sys/bus/faux/devices/vibeshine/quiesce}"
+PROGRAM_NAME="virtualdisplay-vkms-quiesce"
+QUIESCE_PATH="${VIRTUALDISPLAY_VKMS_QUIESCE_PATH:-/sys/bus/faux/devices/virtualdisplay/quiesce}"
error() {
printf '%s: error: %s\n' "$PROGRAM_NAME" "$*" >&2
@@ -14,8 +14,8 @@ error() {
system_is_stopping() {
local state
- if [[ -n ${VIBESHINE_SYSTEM_STATE:-} ]]; then
- state=$VIBESHINE_SYSTEM_STATE
+ if [[ -n ${VIRTUALDISPLAY_SYSTEM_STATE:-} ]]; then
+ state=$VIRTUALDISPLAY_SYSTEM_STATE
else
state=$(systemctl is-system-running 2>/dev/null || true)
fi
diff --git a/linux/packaging/virtualdisplay-vkms.service.in b/linux/packaging/virtualdisplay-vkms.service.in
new file mode 100644
index 0000000..e39026d
--- /dev/null
+++ b/linux/packaging/virtualdisplay-vkms.service.in
@@ -0,0 +1,22 @@
+[Unit]
+Description=libvirtualdisplay display pool
+Documentation=https://docs.kernel.org/gpu/vkms.html
+Wants=virtualdisplay-drm-setup.service virtualdisplay-vkms-control.socket
+After=systemd-modules-load.service virtualdisplay-drm-setup.service
+Before=systemd-user-sessions.service display-manager.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+RuntimeDirectory=virtualdisplay/vkms-leases
+RuntimeDirectoryMode=0700
+ExecStartPre=@VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/virtualdisplay-drm-install status
+ExecStart=@VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/virtualdisplay-vkms start
+ExecStop=@VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/virtualdisplay-vkms stop
+ExecStopPost=@VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/virtualdisplay-vkms-quiesce
+TimeoutStartSec=30s
+TimeoutStopSec=30s
+UMask=0022
+
+[Install]
+WantedBy=multi-user.target
diff --git a/linux/packaging/virtualdisplay-vkms.sysusers b/linux/packaging/virtualdisplay-vkms.sysusers
new file mode 100644
index 0000000..fb5c645
--- /dev/null
+++ b/linux/packaging/virtualdisplay-vkms.sysusers
@@ -0,0 +1 @@
+g virtualdisplay-vkms - -
diff --git a/linux/vibeshine-drm/vibeshine_drm_mode.h b/linux/vibeshine-drm/vibeshine_drm_mode.h
deleted file mode 100644
index 502f65b..0000000
--- a/linux/vibeshine-drm/vibeshine_drm_mode.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-#ifndef _VIBESHINE_DRM_MODE_H_
-#define _VIBESHINE_DRM_MODE_H_
-
-#include
-
-#define VIBESHINE_DRM_MIN_REFRESH_MILLIHZ 1000U
-#define VIBESHINE_DRM_MAX_REFRESH_MILLIHZ 1000000U
-
-struct vibeshine_drm_requested_mode {
- __u32 width;
- __u32 height;
- __u32 refresh_millihz;
-};
-
-static inline int vibeshine_drm_requested_mode_valid(
- const struct vibeshine_drm_requested_mode *mode)
-{
- return mode->width >= 64 && mode->width <= 8192 && mode->height >= 64 &&
- mode->height <= 8192 &&
- mode->refresh_millihz >= VIBESHINE_DRM_MIN_REFRESH_MILLIHZ &&
- mode->refresh_millihz <= VIBESHINE_DRM_MAX_REFRESH_MILLIHZ;
-}
-
-static inline int
-vibeshine_drm_doubled_mode(const struct vibeshine_drm_requested_mode *mode,
- struct vibeshine_drm_requested_mode *doubled)
-{
- if (!vibeshine_drm_requested_mode_valid(mode) ||
- mode->refresh_millihz > VIBESHINE_DRM_MAX_REFRESH_MILLIHZ / 2)
- return 0;
-
- *doubled = *mode;
- doubled->refresh_millihz *= 2;
- return 1;
-}
-
-/* This virtual connector has no physical timing restriction. Fixed blanking
- * preserves exact client dimensions, unlike CVT's width alignment. Round only
- * the kHz pixel clock; the worst refresh error within the bounds is 0.021 Hz.
- */
-static inline __u32 vibeshine_drm_requested_mode_clock_khz(
- const struct vibeshine_drm_requested_mode *mode)
-{
- __u64 pixels = (__u64)(mode->width + 160) * (mode->height + 45);
-
- return (pixels * mode->refresh_millihz + 500000) / 1000000;
-}
-
-#endif
diff --git a/linux/vibeshine-drm/vibeshine_drm_present.h b/linux/vibeshine-drm/vibeshine_drm_present.h
deleted file mode 100644
index aec0ec8..0000000
--- a/linux/vibeshine-drm/vibeshine_drm_present.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-
-#ifndef _VIBESHINE_DRM_PRESENT_H_
-#define _VIBESHINE_DRM_PRESENT_H_
-
-#ifndef __KERNEL__
-#include
-#endif
-
-#include "vibeshine_drm_uapi.h"
-
-#define VIBESHINE_DRM_PRESENT_MAX_WAITERS 64U
-
-/* Per-commit timing, never the output's mutable last-vblank timestamp. */
-struct vibeshine_drm_present_timing {
- __u64 timestamp_ns;
- bool pending;
-};
-
-static inline void
-vibeshine_drm_present_timing_arm(struct vibeshine_drm_present_timing *timing)
-{
- timing->timestamp_ns = 0;
- timing->pending = true;
-}
-
-static inline bool vibeshine_drm_present_timing_complete(
- struct vibeshine_drm_present_timing *timing, bool flip_complete,
- __u64 event_timestamp_ns)
-{
- if (!timing->pending || !flip_complete || !event_timestamp_ns)
- return false;
- timing->timestamp_ns = event_timestamp_ns;
- timing->pending = false;
- return true;
-}
-
-static inline __u64
-vibeshine_drm_present_timing_finish(struct vibeshine_drm_present_timing *timing,
- __u64 fallback_timestamp_ns)
-{
- /* Disarm even on a flip timeout; a later event must not alter this frame. */
- timing->pending = false;
- return timing->timestamp_ns ? timing->timestamp_ns :
- fallback_timestamp_ns;
-}
-
-enum vibeshine_drm_present_wait_decision_e {
- VIBESHINE_DRM_PRESENT_RETURN_CURRENT,
- VIBESHINE_DRM_PRESENT_REGISTER_WAITER,
- VIBESHINE_DRM_PRESENT_REJECT_BUSY,
-};
-
-static inline bool vibeshine_drm_present_request_valid(
- const struct vibeshine_drm_wait_present *request)
-{
- return request->abi_version == VIBESHINE_DRM_PRESENT_ABI_VERSION &&
- request->timeout_ms <= VIBESHINE_DRM_PRESENT_MAX_TIMEOUT_MS &&
- !request->reserved[0] && !request->reserved[1];
-}
-
-static inline enum vibeshine_drm_present_wait_decision_e
-vibeshine_drm_present_decide_wait(
- const struct vibeshine_drm_wait_present *request,
- __u64 current_sequence, unsigned int waiter_count)
-{
- /*
- * A completed sequence is immediately consumable even when a newer atomic
- * commit is pending. The exported framebuffer is pinned at completion, so
- * waiting for the entire producer queue to drain only turns closely spaced
- * presentations into avoidable frame gaps.
- */
- if (!request->timeout_ms || current_sequence != request->sequence)
- return VIBESHINE_DRM_PRESENT_RETURN_CURRENT;
- if (waiter_count >= VIBESHINE_DRM_PRESENT_MAX_WAITERS)
- return VIBESHINE_DRM_PRESENT_REJECT_BUSY;
- return VIBESHINE_DRM_PRESENT_REGISTER_WAITER;
-}
-
-static inline void vibeshine_drm_present_complete_response(
- struct vibeshine_drm_wait_present *request, __u64 requested_sequence,
- __u64 current_sequence, __u64 timestamp_ns, bool presentation_pending)
-{
- request->sequence = current_sequence;
- request->timestamp_ns = timestamp_ns;
- request->flags = current_sequence != requested_sequence ?
- VIBESHINE_DRM_PRESENT_CHANGED :
- VIBESHINE_DRM_PRESENT_TIMEOUT;
- if (presentation_pending)
- request->flags |= VIBESHINE_DRM_PRESENT_PENDING;
-}
-
-#endif /* _VIBESHINE_DRM_PRESENT_H_ */
diff --git a/linux/vibeshine-drm/.clang-format b/linux/virtualdisplay-drm/.clang-format
similarity index 100%
rename from linux/vibeshine-drm/.clang-format
rename to linux/virtualdisplay-drm/.clang-format
diff --git a/linux/vibeshine-drm/Makefile b/linux/virtualdisplay-drm/Makefile
similarity index 75%
rename from linux/vibeshine-drm/Makefile
rename to linux/virtualdisplay-drm/Makefile
index 84be968..5fcb3d9 100644
--- a/linux/vibeshine-drm/Makefile
+++ b/linux/virtualdisplay-drm/Makefile
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-only
-vibeshine_drm-y := \
+virtualdisplay_drm-y := \
vkms_drv.o \
vkms_capture.o \
- vibeshine_drm_dumb.o \
+ virtualdisplay_drm_dumb.o \
vkms_plane.o \
vkms_output.o \
vkms_formats.o \
@@ -15,4 +15,4 @@ vibeshine_drm-y := \
vkms_colorop.o \
vkms_luts.o
-obj-m += vibeshine_drm.o
+obj-m += virtualdisplay_drm.o
diff --git a/linux/vibeshine-drm/README.md b/linux/virtualdisplay-drm/README.md
similarity index 91%
rename from linux/vibeshine-drm/README.md
rename to linux/virtualdisplay-drm/README.md
index 49a4ced..7253206 100644
--- a/linux/vibeshine-drm/README.md
+++ b/linux/virtualdisplay-drm/README.md
@@ -1,12 +1,11 @@
-# Vibeshine HDR virtual DRM driver
+# libvirtualdisplay HDR DRM driver
-This directory contains Vibeshine's out-of-tree virtual KMS driver. It is
+This directory contains an out-of-tree virtual KMS driver. It is
derived from the Linux 7.2 VKMS driver and retains the upstream SPDX license
identifiers on every source file. The imported upstream revision is Linux tag `v7.2`
(`237a1c39e8df`).
-Vibeshine's changes give each configfs-created virtual connector a stable HDR10
-monitor contract:
+Each configfs-created virtual connector has a stable HDR10 monitor contract:
- a CTA-861 EDID advertising BT.2020, PQ, HLG, and static HDR metadata;
- atomic `HDR_OUTPUT_METADATA`, `Colorspace`, and 8-16 `max bpc` properties;
@@ -21,7 +20,7 @@ monitor contract:
DMA-BUF instead of polling KMS state at a fixed rate;
- late reboot quiescing which drains virtual scanout and releases imported
renderer-GPU framebuffers before physical GPU device shutdown; and
-- an independent `/sys/kernel/config/vibeshine-drm` configfs namespace, so the
+- an independent `/sys/kernel/config/virtualdisplay-drm` configfs namespace, so the
driver can coexist with a distribution's normal `vkms` module.
Each connector's configfs `drm_name` attribute is read-only and reports the
@@ -35,7 +34,7 @@ after the updated driver is loaded, which may require a reboot.
## Presentation and frame-export ABI
-`vibeshine_drm_uapi.h` defines `DRM_VIBESHINE_WAIT_PRESENT`. Each CRTC owns a
+`virtualdisplay_drm_uapi.h` defines `DRM_VIRTUALDISPLAY_WAIT_PRESENT`. Each CRTC owns a
monotonic presentation sequence. The sequence advances after an atomic commit
which can change that CRTC's planes, mode, color state, or connector state has
completed. A caller supplies its last sequence and may block for up to one
@@ -60,7 +59,7 @@ The response also reports when a newer atomic state has been submitted but is
not presented yet. Capture waits until that pending count reaches zero before
dequeueing a frame.
-`DRM_VIBESHINE_GET_FRAME` pins and exports the newest completed primary-plane
+`DRM_VIRTUALDISPLAY_GET_FRAME` pins and exports the newest completed primary-plane
framebuffer together with its presentation sequence, monotonic timestamp,
format, modifier, pitches, offsets, original PRIME DMA-BUF descriptors, and
optional per-plane sync-file snapshots. The framebuffer reference is exchanged under the
@@ -77,9 +76,9 @@ this also prevents an invisible source guard from surviving an `EFAULT`.
The additive `GET_FRAME_LEASED` operation gates scanout retirement while its
read-only exported objects and GPU importer references remain alive. Consumers
must follow the DRM producer rule and must not write through these objects.
-Amaterasu's required-lease profile uses this as a short source guard around a
-GPU snapshot. Its long-lived SDK leases own the private snapshot, so slow
-encoders do not retain the driver's scanout guard.
+A consumer can hold the guard while taking a GPU snapshot and then release it.
+Slow encoders can retain the private snapshot independently of the driver's
+scanout guard.
Quiescing seals capture admission before draining guards. A busy or interrupted
drain leaves the device and its resources intact and can be retried; it never
@@ -117,8 +116,8 @@ with its normal page alignment. Other pixel depths and imported PRIME/tiled
buffers retain their existing allocation and layout handling. This does not
establish that every odd-sized codec configuration is supported.
-`tests/linux/test-native-dumb-allocation.py linux/vibeshine-drm` compiles the
-same `vibeshine_drm_dumb.c` used by Kbuild, with mocks confined to kernel APIs.
+`tests/linux/test-native-dumb-allocation.py linux/virtualdisplay-drm` compiles the
+same `virtualdisplay_drm_dumb.c` used by Kbuild, with mocks confined to kernel APIs.
The test observes backing allocation requests, returned stride/size, logical
dimensions, row writes, overflow and error handling, and PRIME registration.
For reproducible historical red/green evidence, run
@@ -138,10 +137,10 @@ blocking requests fail transiently with `EBUSY`, while zero-timeout queries are
never subject to that limit.
The EDID is generated deterministically by `generate_hdr_edid.py`. Update the
-generator, not `vibeshine_hdr_edid.h`, and regenerate the header with:
+generator, not `virtualdisplay_drm_hdr_edid.h`, and regenerate the header with:
```bash
-./generate_hdr_edid.py --header vibeshine_hdr_edid.h
+./generate_hdr_edid.py --header virtualdisplay_drm_hdr_edid.h
```
The current source is derived from Linux 7.2 and includes compatibility paths
@@ -168,7 +167,7 @@ launches the authorization prompt automatically. Confirm it, reboot, and
approve the pending firmware confirmations once. A noninteractive package
frontend that cannot display the prompt should be retried from a terminal.
-DKMS signs rebuilt modules with the same key after future kernel and Vibeshine
+DKMS signs rebuilt modules with the same key after future kernel and driver
updates. The helper requests both certificate enrollment and Linux MOK-list
trust, because enrollment alone does not put MOK keys in the kernel's trusted
module keyring.
diff --git a/linux/vibeshine-drm/build-module b/linux/virtualdisplay-drm/build-module
similarity index 98%
rename from linux/vibeshine-drm/build-module
rename to linux/virtualdisplay-drm/build-module
index a8c64f3..a766327 100755
--- a/linux/vibeshine-drm/build-module
+++ b/linux/virtualdisplay-drm/build-module
@@ -4,7 +4,7 @@
set -uo pipefail
-PROGRAM_NAME="vibeshine-drm-build"
+PROGRAM_NAME="virtualdisplay-drm-build"
MODULES_ROOT=""
MINIMUM_KERNEL_MAJOR=6
MINIMUM_KERNEL_MINOR=16
diff --git a/linux/vibeshine-drm/dkms.conf.in b/linux/virtualdisplay-drm/dkms.conf.in
similarity index 84%
rename from linux/vibeshine-drm/dkms.conf.in
rename to linux/virtualdisplay-drm/dkms.conf.in
index 095a778..c63a307 100644
--- a/linux/vibeshine-drm/dkms.conf.in
+++ b/linux/virtualdisplay-drm/dkms.conf.in
@@ -1,7 +1,7 @@
-PACKAGE_NAME="vibeshine-drm"
+PACKAGE_NAME="virtualdisplay-drm"
PACKAGE_VERSION="@PROJECT_VERSION_NUMERIC@"
-BUILT_MODULE_NAME[0]="vibeshine_drm"
+BUILT_MODULE_NAME[0]="virtualdisplay_drm"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="yes"
REMAKE_INITRD="no"
diff --git a/linux/vibeshine-drm/generate_hdr_edid.py b/linux/virtualdisplay-drm/generate_hdr_edid.py
similarity index 89%
rename from linux/vibeshine-drm/generate_hdr_edid.py
rename to linux/virtualdisplay-drm/generate_hdr_edid.py
index c11c363..3eefdb0 100755
--- a/linux/vibeshine-drm/generate_hdr_edid.py
+++ b/linux/virtualdisplay-drm/generate_hdr_edid.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-"""Generate Vibeshine's deterministic HDR10 virtual-monitor EDID header."""
+"""Generate libvirtualdisplay's deterministic HDR10 virtual-monitor EDID header."""
from __future__ import annotations
@@ -35,7 +35,7 @@ def build_edid() -> bytes:
# panel and cause compositors to infer surprising scale factors.
base[66:69] = bytes((0x58, 0x54, 0x21))
base[84:87] = bytes((0x58, 0x54, 0x21))
- base[113:126] = b"Vibeshine HDR"
+ base[113:126] = b"LizardByte VD"
base[126] = 1
checksum(base)
@@ -76,14 +76,15 @@ def header(edid: bytes) -> str:
rows.append(f" {values},")
return (
"/* Generated by generate_hdr_edid.py; do not edit manually. */\n"
- "#ifndef VIBESHINE_HDR_EDID_H\n"
- "#define VIBESHINE_HDR_EDID_H\n\n"
+ "#ifndef VIRTUALDISPLAY_DRM_HDR_EDID_H\n"
+ "#define VIRTUALDISPLAY_DRM_HDR_EDID_H\n\n"
"/* clang-format off */\n"
- "static const unsigned char vibeshine_hdr_edid[] = {\n"
+ "static const unsigned char virtualdisplay_drm_hdr_edid[] = {\n"
+ "\n".join(rows)
+ "\n};\n"
"/* clang-format on */\n"
- "static const unsigned int vibeshine_hdr_edid_len = sizeof(vibeshine_hdr_edid);\n\n"
+ "static const unsigned int virtualdisplay_drm_hdr_edid_len =\n"
+ "\tsizeof(virtualdisplay_drm_hdr_edid);\n\n"
"#endif\n"
)
diff --git a/linux/vibeshine-drm/vibeshine_drm_capture.h b/linux/virtualdisplay-drm/virtualdisplay_drm_capture.h
similarity index 53%
rename from linux/vibeshine-drm/vibeshine_drm_capture.h
rename to linux/virtualdisplay-drm/virtualdisplay_drm_capture.h
index 7952d66..6f06479 100644
--- a/linux/vibeshine-drm/vibeshine_drm_capture.h
+++ b/linux/virtualdisplay-drm/virtualdisplay_drm_capture.h
@@ -1,28 +1,29 @@
/* SPDX-License-Identifier: GPL-2.0+ */
-#ifndef VIBESHINE_DRM_CAPTURE_H
-#define VIBESHINE_DRM_CAPTURE_H
+#ifndef VIRTUALDISPLAY_DRM_CAPTURE_H
+#define VIRTUALDISPLAY_DRM_CAPTURE_H
#ifdef __KERNEL__
#include
#else
#include
#endif
-#define VIBESHINE_CAPTURE_MAX_READERS 4U
+#define VIRTUALDISPLAY_CAPTURE_MAX_READERS 4U
/* All state transitions are serialized by the output's present_lock. */
-struct vibeshine_capture_state {
+struct virtualdisplay_capture_state {
unsigned int readers;
unsigned int retiring;
};
static inline bool
-vibeshine_capture_acquire(struct vibeshine_capture_state *state, bool stopping)
+virtualdisplay_capture_acquire(struct virtualdisplay_capture_state *state,
+ bool stopping)
{
if (stopping || state->retiring ||
- state->readers >= VIBESHINE_CAPTURE_MAX_READERS)
+ state->readers >= VIRTUALDISPLAY_CAPTURE_MAX_READERS)
return false;
state->readers++;
return true;
}
static inline bool
-vibeshine_capture_release(struct vibeshine_capture_state *state)
+virtualdisplay_capture_release(struct virtualdisplay_capture_state *state)
{
if (!state->readers)
return false;
@@ -30,7 +31,8 @@ vibeshine_capture_release(struct vibeshine_capture_state *state)
return true;
}
static inline bool
-vibeshine_capture_retire(struct vibeshine_capture_state *state, bool nonblock)
+virtualdisplay_capture_retire(struct virtualdisplay_capture_state *state,
+ bool nonblock)
{
if (state->readers && !nonblock)
return false;
@@ -38,7 +40,7 @@ vibeshine_capture_retire(struct vibeshine_capture_state *state, bool nonblock)
return true;
}
static inline bool
-vibeshine_capture_publish(struct vibeshine_capture_state *state)
+virtualdisplay_capture_publish(struct virtualdisplay_capture_state *state)
{
if (!state->retiring)
return false;
diff --git a/linux/vibeshine-drm/vibeshine_drm_change.h b/linux/virtualdisplay-drm/virtualdisplay_drm_change.h
similarity index 85%
rename from linux/vibeshine-drm/vibeshine_drm_change.h
rename to linux/virtualdisplay-drm/virtualdisplay_drm_change.h
index b192565..bb4fe00 100644
--- a/linux/vibeshine-drm/vibeshine_drm_change.h
+++ b/linux/virtualdisplay-drm/virtualdisplay_drm_change.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
-#ifndef _VIBESHINE_DRM_CHANGE_H_
-#define _VIBESHINE_DRM_CHANGE_H_
+#ifndef _VIRTUALDISPLAY_DRM_CHANGE_H_
+#define _VIRTUALDISPLAY_DRM_CHANGE_H_
#if !defined(__KERNEL__) && !defined(__cplusplus)
#include
@@ -12,7 +12,7 @@
* Keeping the comparison pointer-free makes the policy executable in userland
* tests and avoids comparing padding or transient DRM bookkeeping fields.
*/
-struct vibeshine_drm_plane_snapshot {
+struct virtualdisplay_drm_plane_snapshot {
bool present;
bool visible;
bool content_update;
@@ -39,7 +39,7 @@ struct vibeshine_drm_plane_snapshot {
unsigned int scaling_filter;
};
-struct vibeshine_drm_crtc_snapshot {
+struct virtualdisplay_drm_crtc_snapshot {
bool present;
bool enable;
bool active;
@@ -57,7 +57,7 @@ struct vibeshine_drm_crtc_snapshot {
bool vrr_enabled;
};
-struct vibeshine_drm_connector_snapshot {
+struct virtualdisplay_drm_connector_snapshot {
bool present;
bool self_refresh_aware;
unsigned long crtc;
@@ -75,9 +75,9 @@ struct vibeshine_drm_connector_snapshot {
unsigned int privacy_screen_sw_state;
};
-static inline bool vibeshine_drm_plane_changes_scanout(
- const struct vibeshine_drm_plane_snapshot *old_state,
- const struct vibeshine_drm_plane_snapshot *new_state)
+static inline bool virtualdisplay_drm_plane_changes_scanout(
+ const struct virtualdisplay_drm_plane_snapshot *old_state,
+ const struct virtualdisplay_drm_plane_snapshot *new_state)
{
if (old_state->present != new_state->present ||
old_state->visible != new_state->visible ||
@@ -108,9 +108,9 @@ static inline bool vibeshine_drm_plane_changes_scanout(
return new_state->content_update;
}
-static inline bool vibeshine_drm_crtc_changes_scanout(
- const struct vibeshine_drm_crtc_snapshot *old_state,
- const struct vibeshine_drm_crtc_snapshot *new_state)
+static inline bool virtualdisplay_drm_crtc_changes_scanout(
+ const struct virtualdisplay_drm_crtc_snapshot *old_state,
+ const struct virtualdisplay_drm_crtc_snapshot *new_state)
{
return old_state->present != new_state->present ||
old_state->enable != new_state->enable ||
@@ -129,9 +129,9 @@ static inline bool vibeshine_drm_crtc_changes_scanout(
new_state->color_mgmt_changed;
}
-static inline bool vibeshine_drm_connector_changes_scanout(
- const struct vibeshine_drm_connector_snapshot *old_state,
- const struct vibeshine_drm_connector_snapshot *new_state)
+static inline bool virtualdisplay_drm_connector_changes_scanout(
+ const struct virtualdisplay_drm_connector_snapshot *old_state,
+ const struct virtualdisplay_drm_connector_snapshot *new_state)
{
return old_state->present != new_state->present ||
old_state->self_refresh_aware != new_state->self_refresh_aware ||
@@ -153,4 +153,4 @@ static inline bool vibeshine_drm_connector_changes_scanout(
new_state->privacy_screen_sw_state;
}
-#endif /* _VIBESHINE_DRM_CHANGE_H_ */
+#endif /* _VIRTUALDISPLAY_DRM_CHANGE_H_ */
diff --git a/linux/vibeshine-drm/vibeshine_drm_compat.h b/linux/virtualdisplay-drm/virtualdisplay_drm_compat.h
similarity index 62%
rename from linux/vibeshine-drm/vibeshine_drm_compat.h
rename to linux/virtualdisplay-drm/virtualdisplay_drm_compat.h
index 43ddaf2..a09e70c 100644
--- a/linux/vibeshine-drm/vibeshine_drm_compat.h
+++ b/linux/virtualdisplay-drm/virtualdisplay_drm_compat.h
@@ -1,13 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0+ */
-#ifndef _VIBESHINE_DRM_COMPAT_H_
-#define _VIBESHINE_DRM_COMPAT_H_
+#ifndef _VIRTUALDISPLAY_DRM_COMPAT_H_
+#define _VIRTUALDISPLAY_DRM_COMPAT_H_
#include
#include
/*
- * Vibeshine tracks current VKMS, while the packaged driver also supports the
+ * libvirtualdisplay tracks current VKMS, while the packaged driver also supports the
* Linux 6.16 DRM API used by SteamOS 3.8. Keep compatibility decisions here
* so that the imported code stays readable and each kernel-era fallback has
* one documented boundary.
@@ -16,35 +16,35 @@
* 7.2 renamed the DRM atomic transaction type without changing the callback
* contract used by VKMS.
*/
-#define VIBESHINE_DRM_MIN_KERNEL_VERSION KERNEL_VERSION(6, 16, 0)
+#define VIRTUALDISPLAY_DRM_MIN_KERNEL_VERSION KERNEL_VERSION(6, 16, 0)
/* Keep the kernel's default PRIME import while overriding dumb allocation.
* Linux 6.17 switched shmem imports to the no-map callback.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)
-#define VIBESHINE_DRM_SHMEM_PRIME_DRIVER_OPS \
+#define VIRTUALDISPLAY_DRM_SHMEM_PRIME_DRIVER_OPS \
.gem_prime_import = drm_gem_shmem_prime_import_no_map
#else
-#define VIBESHINE_DRM_SHMEM_PRIME_DRIVER_OPS \
+#define VIRTUALDISPLAY_DRM_SHMEM_PRIME_DRIVER_OPS \
.gem_prime_import_sg_table = drm_gem_shmem_prime_import_sg_table
#endif
/* Full color-pipeline and programmable background support use the 7.1 API. */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(7, 1, 0)
-#define VIBESHINE_DRM_HAS_COLOR_PIPELINE 1
-#define VIBESHINE_DRM_HAS_BACKGROUND_COLOR 1
+#define VIRTUALDISPLAY_DRM_HAS_COLOR_PIPELINE 1
+#define VIRTUALDISPLAY_DRM_HAS_BACKGROUND_COLOR 1
#else
-#define VIBESHINE_DRM_HAS_COLOR_PIPELINE 0
-#define VIBESHINE_DRM_HAS_BACKGROUND_COLOR 0
+#define VIRTUALDISPLAY_DRM_HAS_COLOR_PIPELINE 0
+#define VIRTUALDISPLAY_DRM_HAS_BACKGROUND_COLOR 0
#endif
-/* Vibeshine's VRR-aware DRM vblank-helper path requires Linux 7.0. */
+/* libvirtualdisplay's VRR-aware DRM vblank-helper path requires Linux 7.0. */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(7, 0, 0)
-#define VIBESHINE_DRM_HAS_VBLANK_HELPER 1
-#define VIBESHINE_DRM_HAS_SHARPNESS_STRENGTH 1
+#define VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER 1
+#define VIRTUALDISPLAY_DRM_HAS_SHARPNESS_STRENGTH 1
#else
-#define VIBESHINE_DRM_HAS_VBLANK_HELPER 0
-#define VIBESHINE_DRM_HAS_SHARPNESS_STRENGTH 0
+#define VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER 0
+#define VIRTUALDISPLAY_DRM_HAS_SHARPNESS_STRENGTH 0
#endif
/* The typed zero-allocation helpers were added in Linux 7.0. */
@@ -61,4 +61,4 @@
#define drm_atomic_commit drm_atomic_state
#endif
-#endif /* _VIBESHINE_DRM_COMPAT_H_ */
+#endif /* _VIRTUALDISPLAY_DRM_COMPAT_H_ */
diff --git a/linux/vibeshine-drm/vibeshine_drm_dumb.c b/linux/virtualdisplay-drm/virtualdisplay_drm_dumb.c
similarity index 97%
rename from linux/vibeshine-drm/vibeshine_drm_dumb.c
rename to linux/virtualdisplay-drm/virtualdisplay_drm_dumb.c
index 1b1ca8a..746cb43 100644
--- a/linux/vibeshine-drm/vibeshine_drm_dumb.c
+++ b/linux/virtualdisplay-drm/virtualdisplay_drm_dumb.c
@@ -7,7 +7,7 @@
#include
-#include "vibeshine_drm_dumb.h"
+#include "virtualdisplay_drm_dumb.h"
int vkms_dumb_create(struct drm_file *file, struct drm_device *dev,
struct drm_mode_create_dumb *args)
diff --git a/linux/vibeshine-drm/vibeshine_drm_dumb.h b/linux/virtualdisplay-drm/virtualdisplay_drm_dumb.h
similarity index 51%
rename from linux/vibeshine-drm/vibeshine_drm_dumb.h
rename to linux/virtualdisplay-drm/virtualdisplay_drm_dumb.h
index ac90100..87c53fc 100644
--- a/linux/vibeshine-drm/vibeshine_drm_dumb.h
+++ b/linux/virtualdisplay-drm/virtualdisplay_drm_dumb.h
@@ -1,8 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0+ */
-#ifndef _VIBESHINE_DRM_DUMB_H_
-#define _VIBESHINE_DRM_DUMB_H_
+#ifndef _VIRTUALDISPLAY_DRM_DUMB_H_
+#define _VIRTUALDISPLAY_DRM_DUMB_H_
-#include "vibeshine_drm_compat.h"
+#include "virtualdisplay_drm_compat.h"
struct drm_file;
struct drm_device;
@@ -12,7 +12,8 @@ int vkms_dumb_create(struct drm_file *file, struct drm_device *dev,
struct drm_mode_create_dumb *args);
/* Shared registration for the module and the production-component tests. */
-#define VIBESHINE_DRM_SHMEM_DRIVER_OPS \
- VIBESHINE_DRM_SHMEM_PRIME_DRIVER_OPS, .dumb_create = vkms_dumb_create
+#define VIRTUALDISPLAY_DRM_SHMEM_DRIVER_OPS \
+ VIRTUALDISPLAY_DRM_SHMEM_PRIME_DRIVER_OPS, \
+ .dumb_create = vkms_dumb_create
-#endif /* _VIBESHINE_DRM_DUMB_H_ */
+#endif /* _VIRTUALDISPLAY_DRM_DUMB_H_ */
diff --git a/linux/vibeshine-drm/vibeshine_hdr_edid.h b/linux/virtualdisplay-drm/virtualdisplay_drm_hdr_edid.h
similarity index 80%
rename from linux/vibeshine-drm/vibeshine_hdr_edid.h
rename to linux/virtualdisplay-drm/virtualdisplay_drm_hdr_edid.h
index 2d42e6c..40e10c5 100644
--- a/linux/vibeshine-drm/vibeshine_hdr_edid.h
+++ b/linux/virtualdisplay-drm/virtualdisplay_drm_hdr_edid.h
@@ -1,9 +1,9 @@
/* Generated by generate_hdr_edid.py; do not edit manually. */
-#ifndef VIBESHINE_HDR_EDID_H
-#define VIBESHINE_HDR_EDID_H
+#ifndef VIRTUALDISPLAY_DRM_HDR_EDID_H
+#define VIRTUALDISPLAY_DRM_HDR_EDID_H
/* clang-format off */
-static const unsigned char vibeshine_hdr_edid[] = {
+static const unsigned char virtualdisplay_drm_hdr_edid[] = {
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x58, 0x53, 0x01, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x20, 0x01, 0x03, 0x80, 0x3c, 0x22, 0x78,
0x0a, 0xee, 0x91, 0xa3, 0x54, 0x4c, 0x99, 0x26, 0x0f, 0x50, 0x54, 0xa1,
@@ -13,8 +13,8 @@ static const unsigned char vibeshine_hdr_edid[] = {
0x6f, 0xc2, 0x00, 0xa0, 0xa0, 0xa0, 0x55, 0x50, 0x30, 0x20, 0x35, 0x00,
0x58, 0x54, 0x21, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x18,
0x78, 0x1e, 0xff, 0x77, 0x00, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x00, 0x00, 0x00, 0xfc, 0x00, 0x56, 0x69, 0x62, 0x65, 0x73, 0x68, 0x69,
- 0x6e, 0x65, 0x20, 0x48, 0x44, 0x52, 0x01, 0x97, 0x02, 0x03, 0x14, 0x00,
+ 0x00, 0x00, 0x00, 0xfc, 0x00, 0x4c, 0x69, 0x7a, 0x61, 0x72, 0x64, 0x42,
+ 0x79, 0x74, 0x65, 0x20, 0x56, 0x44, 0x01, 0x7e, 0x02, 0x03, 0x14, 0x00,
0x44, 0x61, 0x76, 0x10, 0x3f, 0xe3, 0x05, 0xc0, 0x00, 0xe6, 0x06, 0x0d,
0x01, 0x8a, 0x72, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -28,6 +28,7 @@ static const unsigned char vibeshine_hdr_edid[] = {
0x00, 0x00, 0x00, 0xde,
};
/* clang-format on */
-static const unsigned int vibeshine_hdr_edid_len = sizeof(vibeshine_hdr_edid);
+static const unsigned int virtualdisplay_drm_hdr_edid_len =
+ sizeof(virtualdisplay_drm_hdr_edid);
#endif
diff --git a/linux/virtualdisplay-drm/virtualdisplay_drm_mode.h b/linux/virtualdisplay-drm/virtualdisplay_drm_mode.h
new file mode 100644
index 0000000..3171774
--- /dev/null
+++ b/linux/virtualdisplay-drm/virtualdisplay_drm_mode.h
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+#ifndef _VIRTUALDISPLAY_DRM_MODE_H_
+#define _VIRTUALDISPLAY_DRM_MODE_H_
+
+#include
+
+#define VIRTUALDISPLAY_DRM_MIN_REFRESH_MILLIHZ 1000U
+#define VIRTUALDISPLAY_DRM_MAX_REFRESH_MILLIHZ 1000000U
+
+struct virtualdisplay_drm_requested_mode {
+ __u32 width;
+ __u32 height;
+ __u32 refresh_millihz;
+};
+
+static inline int virtualdisplay_drm_requested_mode_valid(
+ const struct virtualdisplay_drm_requested_mode *mode)
+{
+ return mode->width >= 64 && mode->width <= 8192 && mode->height >= 64 &&
+ mode->height <= 8192 &&
+ mode->refresh_millihz >=
+ VIRTUALDISPLAY_DRM_MIN_REFRESH_MILLIHZ &&
+ mode->refresh_millihz <= VIRTUALDISPLAY_DRM_MAX_REFRESH_MILLIHZ;
+}
+
+static inline int virtualdisplay_drm_doubled_mode(
+ const struct virtualdisplay_drm_requested_mode *mode,
+ struct virtualdisplay_drm_requested_mode *doubled)
+{
+ if (!virtualdisplay_drm_requested_mode_valid(mode) ||
+ mode->refresh_millihz > VIRTUALDISPLAY_DRM_MAX_REFRESH_MILLIHZ / 2)
+ return 0;
+
+ *doubled = *mode;
+ doubled->refresh_millihz *= 2;
+ return 1;
+}
+
+/* This virtual connector has no physical timing restriction. Fixed blanking
+ * preserves exact client dimensions, unlike CVT's width alignment. Round only
+ * the kHz pixel clock; the worst refresh error within the bounds is 0.021 Hz.
+ */
+static inline __u32 virtualdisplay_drm_requested_mode_clock_khz(
+ const struct virtualdisplay_drm_requested_mode *mode)
+{
+ __u64 pixels = (__u64)(mode->width + 160) * (mode->height + 45);
+
+ return (pixels * mode->refresh_millihz + 500000) / 1000000;
+}
+
+#endif
diff --git a/linux/virtualdisplay-drm/virtualdisplay_drm_present.h b/linux/virtualdisplay-drm/virtualdisplay_drm_present.h
new file mode 100644
index 0000000..9a5a5b4
--- /dev/null
+++ b/linux/virtualdisplay-drm/virtualdisplay_drm_present.h
@@ -0,0 +1,95 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef _VIRTUALDISPLAY_DRM_PRESENT_H_
+#define _VIRTUALDISPLAY_DRM_PRESENT_H_
+
+#ifndef __KERNEL__
+#include
+#endif
+
+#include "virtualdisplay_drm_uapi.h"
+
+#define VIRTUALDISPLAY_DRM_PRESENT_MAX_WAITERS 64U
+
+/* Per-commit timing, never the output's mutable last-vblank timestamp. */
+struct virtualdisplay_drm_present_timing {
+ __u64 timestamp_ns;
+ bool pending;
+};
+
+static inline void virtualdisplay_drm_present_timing_arm(
+ struct virtualdisplay_drm_present_timing *timing)
+{
+ timing->timestamp_ns = 0;
+ timing->pending = true;
+}
+
+static inline bool virtualdisplay_drm_present_timing_complete(
+ struct virtualdisplay_drm_present_timing *timing, bool flip_complete,
+ __u64 event_timestamp_ns)
+{
+ if (!timing->pending || !flip_complete || !event_timestamp_ns)
+ return false;
+ timing->timestamp_ns = event_timestamp_ns;
+ timing->pending = false;
+ return true;
+}
+
+static inline __u64 virtualdisplay_drm_present_timing_finish(
+ struct virtualdisplay_drm_present_timing *timing,
+ __u64 fallback_timestamp_ns)
+{
+ /* Disarm even on a flip timeout; a later event must not alter this frame. */
+ timing->pending = false;
+ return timing->timestamp_ns ? timing->timestamp_ns :
+ fallback_timestamp_ns;
+}
+
+enum virtualdisplay_drm_present_wait_decision_e {
+ VIRTUALDISPLAY_DRM_PRESENT_RETURN_CURRENT,
+ VIRTUALDISPLAY_DRM_PRESENT_REGISTER_WAITER,
+ VIRTUALDISPLAY_DRM_PRESENT_REJECT_BUSY,
+};
+
+static inline bool virtualdisplay_drm_present_request_valid(
+ const struct virtualdisplay_drm_wait_present *request)
+{
+ return request->abi_version == VIRTUALDISPLAY_DRM_PRESENT_ABI_VERSION &&
+ request->timeout_ms <=
+ VIRTUALDISPLAY_DRM_PRESENT_MAX_TIMEOUT_MS &&
+ !request->reserved[0] && !request->reserved[1];
+}
+
+static inline enum virtualdisplay_drm_present_wait_decision_e
+virtualdisplay_drm_present_decide_wait(
+ const struct virtualdisplay_drm_wait_present *request,
+ __u64 current_sequence, unsigned int waiter_count)
+{
+ /*
+ * A completed sequence is immediately consumable even when a newer atomic
+ * commit is pending. The exported framebuffer is pinned at completion, so
+ * waiting for the entire producer queue to drain only turns closely spaced
+ * presentations into avoidable frame gaps.
+ */
+ if (!request->timeout_ms || current_sequence != request->sequence)
+ return VIRTUALDISPLAY_DRM_PRESENT_RETURN_CURRENT;
+ if (waiter_count >= VIRTUALDISPLAY_DRM_PRESENT_MAX_WAITERS)
+ return VIRTUALDISPLAY_DRM_PRESENT_REJECT_BUSY;
+ return VIRTUALDISPLAY_DRM_PRESENT_REGISTER_WAITER;
+}
+
+static inline void virtualdisplay_drm_present_complete_response(
+ struct virtualdisplay_drm_wait_present *request,
+ __u64 requested_sequence, __u64 current_sequence, __u64 timestamp_ns,
+ bool presentation_pending)
+{
+ request->sequence = current_sequence;
+ request->timestamp_ns = timestamp_ns;
+ request->flags = current_sequence != requested_sequence ?
+ VIRTUALDISPLAY_DRM_PRESENT_CHANGED :
+ VIRTUALDISPLAY_DRM_PRESENT_TIMEOUT;
+ if (presentation_pending)
+ request->flags |= VIRTUALDISPLAY_DRM_PRESENT_PENDING;
+}
+
+#endif /* _VIRTUALDISPLAY_DRM_PRESENT_H_ */
diff --git a/linux/vibeshine-drm/vibeshine_drm_uapi.h b/linux/virtualdisplay-drm/virtualdisplay_drm_uapi.h
similarity index 66%
rename from linux/vibeshine-drm/vibeshine_drm_uapi.h
rename to linux/virtualdisplay-drm/virtualdisplay_drm_uapi.h
index ca8c292..72a13f4 100644
--- a/linux/vibeshine-drm/vibeshine_drm_uapi.h
+++ b/linux/virtualdisplay-drm/virtualdisplay_drm_uapi.h
@@ -1,82 +1,83 @@
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-#ifndef _UAPI_VIBESHINE_DRM_H_
-#define _UAPI_VIBESHINE_DRM_H_
+#ifndef _UAPI_VIRTUALDISPLAY_DRM_H_
+#define _UAPI_VIRTUALDISPLAY_DRM_H_
#include
/* Driver-private DRM command indices start at DRM_COMMAND_BASE. */
-#define DRM_VIBESHINE_WAIT_PRESENT 0x00
-#define DRM_VIBESHINE_GET_FRAME 0x01
-#define DRM_VIBESHINE_GET_PRESENT_TRACE 0x02
-#define DRM_VIBESHINE_GET_FRAME_LEASED 0x03
-#define DRM_VIBESHINE_GET_FRAME_COLOR 0x04
+#define DRM_VIRTUALDISPLAY_WAIT_PRESENT 0x00
+#define DRM_VIRTUALDISPLAY_GET_FRAME 0x01
+#define DRM_VIRTUALDISPLAY_GET_PRESENT_TRACE 0x02
+#define DRM_VIRTUALDISPLAY_GET_FRAME_LEASED 0x03
+#define DRM_VIRTUALDISPLAY_GET_FRAME_COLOR 0x04
/* GET_FRAME_COLOR is a leased export with ABI version 2. reserved_u32 is
* the colour interpretation below; reserved contains the 32-byte Linux
* hdr_output_metadata (metadata_type followed by the HDMI infoframe).
* All of these fields must still be zero on input. Older ioctls are unchanged. */
-#define VIBESHINE_DRM_FRAME_COLOR_ABI_VERSION 2
-#define VIBESHINE_DRM_COLOR_UNKNOWN 0
-#define VIBESHINE_DRM_COLOR_SRGB 1
-#define VIBESHINE_DRM_COLOR_BT2020_PQ 2
+#define VIRTUALDISPLAY_DRM_FRAME_COLOR_ABI_VERSION 2
+#define VIRTUALDISPLAY_DRM_COLOR_UNKNOWN 0
+#define VIRTUALDISPLAY_DRM_COLOR_SRGB 1
+#define VIRTUALDISPLAY_DRM_COLOR_BT2020_PQ 2
-#define VIBESHINE_DRM_PRESENT_ABI_VERSION 1
-#define VIBESHINE_DRM_PRESENT_MAX_TIMEOUT_MS 1000
+#define VIRTUALDISPLAY_DRM_PRESENT_ABI_VERSION 1
+#define VIRTUALDISPLAY_DRM_PRESENT_MAX_TIMEOUT_MS 1000
-#define VIBESHINE_DRM_PRESENT_CHANGED (1U << 0)
-#define VIBESHINE_DRM_PRESENT_TIMEOUT (1U << 1)
-#define VIBESHINE_DRM_PRESENT_PENDING (1U << 2)
+#define VIRTUALDISPLAY_DRM_PRESENT_CHANGED (1U << 0)
+#define VIRTUALDISPLAY_DRM_PRESENT_TIMEOUT (1U << 1)
+#define VIRTUALDISPLAY_DRM_PRESENT_PENDING (1U << 2)
-#define VIBESHINE_DRM_FRAME_ABI_VERSION 1
-#define VIBESHINE_DRM_FRAME_MAX_PLANES 4
+#define VIRTUALDISPLAY_DRM_FRAME_ABI_VERSION 1
+#define VIRTUALDISPLAY_DRM_FRAME_MAX_PLANES 4
-#define VIBESHINE_DRM_FRAME_READY (1U << 0)
-#define VIBESHINE_DRM_FRAME_EMPTY (1U << 1)
-#define VIBESHINE_DRM_FRAME_LEASED (1U << 2)
+#define VIRTUALDISPLAY_DRM_FRAME_READY (1U << 0)
+#define VIRTUALDISPLAY_DRM_FRAME_EMPTY (1U << 1)
+#define VIRTUALDISPLAY_DRM_FRAME_LEASED (1U << 2)
-#define VIBESHINE_DRM_TRACE_ABI_VERSION 1
-#define VIBESHINE_DRM_TRACE_MAX_EVENTS 64
-#define VIBESHINE_DRM_TRACE_OVERFLOW (1U << 0)
+#define VIRTUALDISPLAY_DRM_TRACE_ABI_VERSION 1
+#define VIRTUALDISPLAY_DRM_TRACE_MAX_EVENTS 64
+#define VIRTUALDISPLAY_DRM_TRACE_OVERFLOW (1U << 0)
-struct vibeshine_drm_trace_event {
+struct virtualdisplay_drm_trace_event {
__u64 sequence;
__u64 timestamp_ns;
};
/**
- * struct vibeshine_drm_present_trace - drain completed presentation history
- * @abi_version: must be VIBESHINE_DRM_TRACE_ABI_VERSION
+ * struct virtualdisplay_drm_present_trace - drain completed presentation history
+ * @abi_version: must be VIRTUALDISPLAY_DRM_TRACE_ABI_VERSION
* @crtc_id: DRM object ID of the target CRTC
* @after_sequence: in: last trace sequence consumed by this caller
* @newest_sequence: out: newest sequence present when the snapshot was taken
* @count: out: number of valid entries in @events
- * @flags: out: VIBESHINE_DRM_TRACE_* flags
+ * @flags: out: VIRTUALDISPLAY_DRM_TRACE_* flags
* @events: out: ordered presentation events newer than @after_sequence
* @reserved: must be zero
*
* The diagnostic history is bounded. OVERFLOW means events older than the
* first returned entry were overwritten before the caller drained them.
*/
-struct vibeshine_drm_present_trace {
+struct virtualdisplay_drm_present_trace {
__u32 abi_version;
__u32 crtc_id;
__u64 after_sequence;
__u64 newest_sequence;
__u32 count;
__u32 flags;
- struct vibeshine_drm_trace_event events[VIBESHINE_DRM_TRACE_MAX_EVENTS];
+ struct virtualdisplay_drm_trace_event
+ events[VIRTUALDISPLAY_DRM_TRACE_MAX_EVENTS];
__u64 reserved[4];
};
/**
- * struct vibeshine_drm_wait_present - wait for a changed CRTC scanout
- * @abi_version: must be VIBESHINE_DRM_PRESENT_ABI_VERSION
+ * struct virtualdisplay_drm_wait_present - wait for a changed CRTC scanout
+ * @abi_version: must be VIRTUALDISPLAY_DRM_PRESENT_ABI_VERSION
* @crtc_id: DRM object ID of the target CRTC
* @sequence: in: last observed sequence; out: newest sequence
* @timestamp_ns: out: CLOCK_MONOTONIC timestamp for @sequence
* @timeout_ms: maximum interruptible wait; zero performs a query
- * @flags: out: VIBESHINE_DRM_PRESENT_* result flags; PENDING means a newer
+ * @flags: out: VIRTUALDISPLAY_DRM_PRESENT_* result flags; PENDING means a newer
* submitted state has not completed presentation yet; it does not
* invalidate the completed sequence or framebuffer being returned
* @reserved: must be zero
@@ -90,7 +91,7 @@ struct vibeshine_drm_present_trace {
* use their immediate completion time; a flip timeout retains a publication-
* time fallback when no event timestamp was obtained.
*/
-struct vibeshine_drm_wait_present {
+struct virtualdisplay_drm_wait_present {
__u32 abi_version;
__u32 crtc_id;
__u64 sequence;
@@ -101,12 +102,12 @@ struct vibeshine_drm_wait_present {
};
/**
- * struct vibeshine_drm_frame - export the latest completed primary scanout
- * @abi_version: must be VIBESHINE_DRM_FRAME_ABI_VERSION
+ * struct virtualdisplay_drm_frame - export the latest completed primary scanout
+ * @abi_version: must be VIRTUALDISPLAY_DRM_FRAME_ABI_VERSION
* @crtc_id: DRM object ID of the target CRTC
* @sequence: out: presentation sequence associated with this exact framebuffer
* @timestamp_ns: out: CLOCK_MONOTONIC presentation timestamp for @sequence
- * @flags: out: exactly one VIBESHINE_DRM_FRAME_* result flag
+ * @flags: out: exactly one VIRTUALDISPLAY_DRM_FRAME_* result flag
* @width: out: framebuffer width in pixels
* @height: out: framebuffer height in pixels
* @fourcc: out: DRM framebuffer format
@@ -139,7 +140,7 @@ struct vibeshine_drm_wait_present {
* On input every field except @abi_version and @crtc_id must be zero. Returned
* file descriptors belong to the calling process and must be closed.
*/
-struct vibeshine_drm_frame {
+struct virtualdisplay_drm_frame {
__u32 abi_version;
__u32 crtc_id;
__u64 sequence;
@@ -150,12 +151,12 @@ struct vibeshine_drm_frame {
__u32 fourcc;
__u64 modifier;
__u32 plane_count;
- __s32 dma_buf_fds[VIBESHINE_DRM_FRAME_MAX_PLANES];
- __u32 pitches[VIBESHINE_DRM_FRAME_MAX_PLANES];
- __u32 offsets[VIBESHINE_DRM_FRAME_MAX_PLANES];
- __s32 sync_file_fds[VIBESHINE_DRM_FRAME_MAX_PLANES];
+ __s32 dma_buf_fds[VIRTUALDISPLAY_DRM_FRAME_MAX_PLANES];
+ __u32 pitches[VIRTUALDISPLAY_DRM_FRAME_MAX_PLANES];
+ __u32 offsets[VIRTUALDISPLAY_DRM_FRAME_MAX_PLANES];
+ __s32 sync_file_fds[VIRTUALDISPLAY_DRM_FRAME_MAX_PLANES];
__u32 reserved_u32;
__u64 reserved[4];
};
-#endif /* _UAPI_VIBESHINE_DRM_H_ */
+#endif /* _UAPI_VIRTUALDISPLAY_DRM_H_ */
diff --git a/linux/vibeshine-drm/vibeshine_drm_vrr.h b/linux/virtualdisplay-drm/virtualdisplay_drm_vrr.h
similarity index 70%
rename from linux/vibeshine-drm/vibeshine_drm_vrr.h
rename to linux/virtualdisplay-drm/virtualdisplay_drm_vrr.h
index 9dfd2d6..a1e8121 100644
--- a/linux/vibeshine-drm/vibeshine_drm_vrr.h
+++ b/linux/virtualdisplay-drm/virtualdisplay_drm_vrr.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
-#ifndef _VIBESHINE_DRM_VRR_H_
-#define _VIBESHINE_DRM_VRR_H_
+#ifndef _VIRTUALDISPLAY_DRM_VRR_H_
+#define _VIRTUALDISPLAY_DRM_VRR_H_
/*
* Return the earliest legal presentation time for a VRR output whose mode
@@ -10,9 +10,9 @@
* a corrupt/stale timestamp from wrapping into the past.
*/
static inline unsigned long long
-vibeshine_drm_vrr_presentation_deadline_ns(unsigned long long previous_ns,
- unsigned long long now_ns,
- unsigned long long period_ns)
+virtualdisplay_drm_vrr_presentation_deadline_ns(unsigned long long previous_ns,
+ unsigned long long now_ns,
+ unsigned long long period_ns)
{
unsigned long long deadline_ns;
@@ -25,4 +25,4 @@ vibeshine_drm_vrr_presentation_deadline_ns(unsigned long long previous_ns,
return deadline_ns > now_ns ? deadline_ns : now_ns;
}
-#endif /* _VIBESHINE_DRM_VRR_H_ */
+#endif /* _VIRTUALDISPLAY_DRM_VRR_H_ */
diff --git a/linux/vibeshine-drm/vkms_capture.c b/linux/virtualdisplay-drm/vkms_capture.c
similarity index 98%
rename from linux/vibeshine-drm/vkms_capture.c
rename to linux/virtualdisplay-drm/vkms_capture.c
index 21fc8ff..d8f718d 100644
--- a/linux/vibeshine-drm/vkms_capture.c
+++ b/linux/virtualdisplay-drm/vkms_capture.c
@@ -48,7 +48,7 @@ static void vkms_capture_lease_release(struct kref *ref)
unsigned long flags;
struct drm_device *dev = output->crtc.dev;
spin_lock_irqsave(&output->present_lock, flags);
- WARN_ON_ONCE(!vibeshine_capture_release(&output->capture));
+ WARN_ON_ONCE(!virtualdisplay_capture_release(&output->capture));
spin_unlock_irqrestore(&output->present_lock, flags);
wake_up_all(&output->capture_waitq);
drm_dev_put(dev);
diff --git a/linux/vibeshine-drm/vkms_capture.h b/linux/virtualdisplay-drm/vkms_capture.h
similarity index 100%
rename from linux/vibeshine-drm/vkms_capture.h
rename to linux/virtualdisplay-drm/vkms_capture.h
diff --git a/linux/vibeshine-drm/vkms_colorop.c b/linux/virtualdisplay-drm/vkms_colorop.c
similarity index 97%
rename from linux/vibeshine-drm/vkms_colorop.c
rename to linux/virtualdisplay-drm/vkms_colorop.c
index d200856..80f6b34 100644
--- a/linux/vibeshine-drm/vkms_colorop.c
+++ b/linux/virtualdisplay-drm/vkms_colorop.c
@@ -11,9 +11,9 @@
#endif
#include "vkms_drv.h"
-#include "vibeshine_drm_compat.h"
+#include "virtualdisplay_drm_compat.h"
-#if VIBESHINE_DRM_HAS_COLOR_PIPELINE
+#if VIRTUALDISPLAY_DRM_HAS_COLOR_PIPELINE
static const u64 supported_tfs = BIT(DRM_COLOROP_1D_CURVE_SRGB_EOTF) |
BIT(DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF);
diff --git a/linux/vibeshine-drm/vkms_composer.c b/linux/virtualdisplay-drm/vkms_composer.c
similarity index 99%
rename from linux/vibeshine-drm/vkms_composer.c
rename to linux/virtualdisplay-drm/vkms_composer.c
index 278d0c7..92b56e9 100644
--- a/linux/vibeshine-drm/vkms_composer.c
+++ b/linux/virtualdisplay-drm/vkms_composer.c
@@ -19,7 +19,7 @@
#include "vkms_composer.h"
#include "vkms_luts.h"
-#include "vibeshine_drm_compat.h"
+#include "virtualdisplay_drm_compat.h"
static u16 pre_mul_blend_channel(u16 src, u16 dst, u16 alpha)
{
@@ -136,7 +136,7 @@ static void apply_lut(const struct vkms_crtc_state *crtc_state,
}
}
-#if VIBESHINE_DRM_HAS_COLOR_PIPELINE
+#if VIRTUALDISPLAY_DRM_HAS_COLOR_PIPELINE
VISIBLE_IF_KUNIT void apply_3x4_matrix(struct pixel_argb_s32 *pixel,
const struct drm_color_ctm_3x4 *matrix)
{
@@ -509,7 +509,7 @@ static void blend(struct vkms_writeback_job *wb,
{
struct vkms_plane_state **plane = crtc_state->active_planes;
u32 n_active_planes = crtc_state->num_active_planes;
-#if VIBESHINE_DRM_HAS_BACKGROUND_COLOR
+#if VIRTUALDISPLAY_DRM_HAS_BACKGROUND_COLOR
u64 bgcolor = crtc_state->base.background_color;
const struct pixel_argb_u16 background_color = {
diff --git a/linux/vibeshine-drm/vkms_composer.h b/linux/virtualdisplay-drm/vkms_composer.h
similarity index 100%
rename from linux/vibeshine-drm/vkms_composer.h
rename to linux/virtualdisplay-drm/vkms_composer.h
diff --git a/linux/vibeshine-drm/vkms_config.c b/linux/virtualdisplay-drm/vkms_config.c
similarity index 99%
rename from linux/vibeshine-drm/vkms_config.c
rename to linux/virtualdisplay-drm/vkms_config.c
index 4f856c4..9bc2697 100644
--- a/linux/vibeshine-drm/vkms_config.c
+++ b/linux/virtualdisplay-drm/vkms_config.c
@@ -6,7 +6,7 @@
#include
#include "vkms_config.h"
-#include "vibeshine_drm_compat.h"
+#include "virtualdisplay_drm_compat.h"
struct vkms_config *vkms_config_create(const char *dev_name)
{
diff --git a/linux/vibeshine-drm/vkms_config.h b/linux/virtualdisplay-drm/vkms_config.h
similarity index 99%
rename from linux/vibeshine-drm/vkms_config.h
rename to linux/virtualdisplay-drm/vkms_config.h
index ccd501c..714554d 100644
--- a/linux/vibeshine-drm/vkms_config.h
+++ b/linux/virtualdisplay-drm/vkms_config.h
@@ -11,7 +11,7 @@
#include
#include "vkms_drv.h"
-#include "vibeshine_drm_mode.h"
+#include "virtualdisplay_drm_mode.h"
/**
* struct vkms_config - General configuration for VKMS driver
@@ -119,7 +119,7 @@ struct vkms_config_connector {
struct vkms_config *config;
enum drm_connector_status status;
- struct vibeshine_drm_requested_mode requested_mode;
+ struct virtualdisplay_drm_requested_mode requested_mode;
struct xarray possible_encoders;
/* Internal usage */
diff --git a/linux/vibeshine-drm/vkms_configfs.c b/linux/virtualdisplay-drm/vkms_configfs.c
similarity index 99%
rename from linux/vibeshine-drm/vkms_configfs.c
rename to linux/virtualdisplay-drm/vkms_configfs.c
index 2c3fc4c..404cbc1 100644
--- a/linux/vibeshine-drm/vkms_configfs.c
+++ b/linux/virtualdisplay-drm/vkms_configfs.c
@@ -8,7 +8,7 @@
#include "vkms_config.h"
#include "vkms_configfs.h"
#include "vkms_connector.h"
-#include "vibeshine_drm_compat.h"
+#include "virtualdisplay_drm_compat.h"
/* To avoid registering configfs more than once or unregistering on error */
static bool is_configfs_registered;
@@ -596,7 +596,7 @@ static ssize_t connector_requested_mode_show(struct config_item *item,
char *page)
{
struct vkms_configfs_connector *connector;
- struct vibeshine_drm_requested_mode mode;
+ struct virtualdisplay_drm_requested_mode mode;
connector = connector_item_to_vkms_configfs_connector(item);
scoped_guard(mutex, &connector->dev->lock)
@@ -609,13 +609,13 @@ static ssize_t connector_requested_mode_store(struct config_item *item,
const char *page, size_t count)
{
struct vkms_configfs_connector *connector;
- struct vibeshine_drm_requested_mode mode;
+ struct virtualdisplay_drm_requested_mode mode;
char trailing;
if (!count || count > 64 ||
sscanf(page, "%u %u %u %c", &mode.width, &mode.height,
&mode.refresh_millihz, &trailing) != 3 ||
- !vibeshine_drm_requested_mode_valid(&mode))
+ !virtualdisplay_drm_requested_mode_valid(&mode))
return -EINVAL;
connector = connector_item_to_vkms_configfs_connector(item);
scoped_guard(mutex, &connector->dev->lock) {
@@ -900,7 +900,7 @@ static const struct config_item_type device_group_type = {
static struct configfs_subsystem vkms_subsys = {
.su_group = {
.cg_item = {
- .ci_name = "vibeshine-drm",
+ .ci_name = "virtualdisplay-drm",
.ci_type = &device_group_type,
},
},
diff --git a/linux/vibeshine-drm/vkms_configfs.h b/linux/virtualdisplay-drm/vkms_configfs.h
similarity index 100%
rename from linux/vibeshine-drm/vkms_configfs.h
rename to linux/virtualdisplay-drm/vkms_configfs.h
diff --git a/linux/vibeshine-drm/vkms_connector.c b/linux/virtualdisplay-drm/vkms_connector.c
similarity index 90%
rename from linux/vibeshine-drm/vkms_connector.c
rename to linux/virtualdisplay-drm/vkms_connector.c
index b1648ea..4b477ac 100644
--- a/linux/vibeshine-drm/vkms_connector.c
+++ b/linux/virtualdisplay-drm/vkms_connector.c
@@ -5,10 +5,10 @@
#include
#include
-#include "vibeshine_drm_compat.h"
+#include "virtualdisplay_drm_compat.h"
#include "vkms_config.h"
#include "vkms_connector.h"
-#include "vibeshine_hdr_edid.h"
+#include "virtualdisplay_drm_hdr_edid.h"
static enum drm_connector_status
vkms_connector_detect(struct drm_connector *connector, bool force)
@@ -32,12 +32,13 @@ static int vkms_conn_get_modes(struct drm_connector *connector)
const struct drm_edid *drm_edid;
struct vkms_connector *vkms =
drm_connector_to_vkms_connector(connector);
- struct vibeshine_drm_requested_mode requested, doubled;
+ struct virtualdisplay_drm_requested_mode requested, doubled;
struct drm_display_mode *entry;
unsigned long flags;
int count;
- drm_edid = drm_edid_alloc(vibeshine_hdr_edid, vibeshine_hdr_edid_len);
+ drm_edid = drm_edid_alloc(virtualdisplay_drm_hdr_edid,
+ virtualdisplay_drm_hdr_edid_len);
if (drm_edid) {
drm_edid_connector_update(connector, drm_edid);
count = drm_edid_connector_add_modes(connector);
@@ -53,7 +54,7 @@ static int vkms_conn_get_modes(struct drm_connector *connector)
spin_lock_irqsave(&vkms->requested_mode_lock, flags);
requested = vkms->requested_mode;
spin_unlock_irqrestore(&vkms->requested_mode_lock, flags);
- if (!vibeshine_drm_requested_mode_valid(&requested))
+ if (!virtualdisplay_drm_requested_mode_valid(&requested))
return count;
/* The stream rate remains the preferred mode. The additional 2x mode lets
@@ -74,14 +75,14 @@ static int vkms_conn_get_modes(struct drm_connector *connector)
entry->vsync_start = requested.height + 3;
entry->vsync_end = requested.height + 6;
entry->vtotal = requested.height + 45;
- entry->clock = vibeshine_drm_requested_mode_clock_khz(&requested);
+ entry->clock = virtualdisplay_drm_requested_mode_clock_khz(&requested);
entry->flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC;
entry->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
drm_mode_set_name(entry);
drm_mode_probed_add(connector, entry);
count++;
- if (!vibeshine_drm_doubled_mode(&requested, &doubled))
+ if (!virtualdisplay_drm_doubled_mode(&requested, &doubled))
return count;
entry = drm_mode_create(connector->dev);
if (!entry)
@@ -94,7 +95,7 @@ static int vkms_conn_get_modes(struct drm_connector *connector)
entry->vsync_start = doubled.height + 3;
entry->vsync_end = doubled.height + 6;
entry->vtotal = doubled.height + 45;
- entry->clock = vibeshine_drm_requested_mode_clock_khz(&doubled);
+ entry->clock = virtualdisplay_drm_requested_mode_clock_khz(&doubled);
entry->flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC;
entry->type = DRM_MODE_TYPE_DRIVER;
drm_mode_set_name(entry);
@@ -140,7 +141,7 @@ struct vkms_connector *vkms_connector_init(struct vkms_device *vkmsdev,
drm_connector_helper_add(&connector->base, &vkms_conn_helper_funcs);
WRITE_ONCE(connector->status, status);
drm_connector_attach_edid_property(&connector->base);
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
ret = drm_connector_attach_vrr_capable_property(&connector->base);
if (ret)
return ERR_PTR(ret);
@@ -180,7 +181,7 @@ void vkms_trigger_connector_hotplug(struct vkms_device *vkmsdev)
void vkms_connector_set_requested_mode(
struct vkms_connector *connector,
- const struct vibeshine_drm_requested_mode *mode)
+ const struct virtualdisplay_drm_requested_mode *mode)
{
unsigned long flags;
diff --git a/linux/vibeshine-drm/vkms_connector.h b/linux/virtualdisplay-drm/vkms_connector.h
similarity index 91%
rename from linux/vibeshine-drm/vkms_connector.h
rename to linux/virtualdisplay-drm/vkms_connector.h
index 5983141..c86bfad 100644
--- a/linux/vibeshine-drm/vkms_connector.h
+++ b/linux/virtualdisplay-drm/vkms_connector.h
@@ -6,7 +6,7 @@
#include
#include "vkms_drv.h"
-#include "vibeshine_drm_mode.h"
+#include "virtualdisplay_drm_mode.h"
#define drm_connector_to_vkms_connector(target) \
container_of(target, struct vkms_connector, base)
@@ -23,7 +23,7 @@ struct vkms_connector {
struct drm_connector base;
enum drm_connector_status status;
spinlock_t requested_mode_lock;
- struct vibeshine_drm_requested_mode requested_mode;
+ struct virtualdisplay_drm_requested_mode requested_mode;
};
/**
@@ -52,6 +52,6 @@ void vkms_trigger_connector_hotplug(struct vkms_device *vkmsdev);
void vkms_connector_set_requested_mode(
struct vkms_connector *connector,
- const struct vibeshine_drm_requested_mode *mode);
+ const struct virtualdisplay_drm_requested_mode *mode);
#endif /* _VKMS_CONNECTOR_H_ */
diff --git a/linux/vibeshine-drm/vkms_crtc.c b/linux/virtualdisplay-drm/vkms_crtc.c
similarity index 94%
rename from linux/vibeshine-drm/vkms_crtc.c
rename to linux/virtualdisplay-drm/vkms_crtc.c
index b8d1d50..91d2fb7 100644
--- a/linux/vibeshine-drm/vkms_crtc.c
+++ b/linux/virtualdisplay-drm/vkms_crtc.c
@@ -17,8 +17,8 @@
#endif
#include "vkms_drv.h"
-#include "vibeshine_drm_compat.h"
-#include "vibeshine_drm_vrr.h"
+#include "virtualdisplay_drm_compat.h"
+#include "virtualdisplay_drm_vrr.h"
static bool vkms_crtc_handle_vblank(struct drm_crtc *crtc)
{
@@ -57,7 +57,7 @@ static bool vkms_crtc_handle_vblank(struct drm_crtc *crtc)
timestamp_ns = ktime_to_ns(vblank_time);
if (!timestamp_ns)
timestamp_ns = ktime_get_ns();
- vibeshine_drm_present_timing_complete(
+ virtualdisplay_drm_present_timing_complete(
&present_state->present_timing, true, timestamp_ns);
output->pending_present_state = NULL;
}
@@ -91,7 +91,7 @@ static bool vkms_crtc_handle_vblank(struct drm_crtc *crtc)
return true;
}
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
static bool vkms_crtc_handle_vblank_timeout(struct drm_crtc *crtc)
{
return vkms_crtc_handle_vblank(crtc);
@@ -115,7 +115,7 @@ static void vkms_schedule_vrr_vblank(struct drm_crtc *crtc)
u64 period_ns;
period_ns = max_t(int, READ_ONCE(vblank->framedur_ns), 0);
- deadline_ns = vibeshine_drm_vrr_presentation_deadline_ns(
+ deadline_ns = virtualdisplay_drm_vrr_presentation_deadline_ns(
atomic64_read(&output->vrr_vblank_timestamp_ns), now_ns,
period_ns);
if (deadline_ns <= now_ns) {
@@ -249,7 +249,7 @@ static bool vkms_crtc_get_vblank_timestamp(struct drm_crtc *crtc,
struct vkms_output *output = drm_crtc_to_vkms_output(crtc);
struct drm_vblank_crtc *vblank = drm_crtc_vblank_crtc(crtc);
unsigned long flags;
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
u64 timestamp_ns;
if (!READ_ONCE(crtc->state->vrr_enabled))
@@ -370,7 +370,7 @@ static void vkms_crtc_atomic_flush(struct drm_crtc *crtc,
{
struct vkms_output *vkms_output = drm_crtc_to_vkms_output(crtc);
struct vkms_crtc_state *vkms_state = to_vkms_crtc_state(crtc->state);
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
struct drm_crtc_state *old_crtc_state;
bool vrr_flip = false;
bool vrr_disabled = false;
@@ -381,13 +381,13 @@ static void vkms_crtc_atomic_flush(struct drm_crtc *crtc,
!crtc->state->vrr_enabled;
#endif
- vibeshine_drm_present_timing_arm(&vkms_state->present_timing);
+ virtualdisplay_drm_present_timing_arm(&vkms_state->present_timing);
if (crtc->state->event) {
spin_lock(&crtc->dev->event_lock);
if (drm_crtc_vblank_get(crtc) != 0) {
/* No scheduled vblank: timestamp the immediate completion. */
- vibeshine_drm_present_timing_complete(
+ virtualdisplay_drm_present_timing_complete(
&vkms_state->present_timing, true,
ktime_get_ns());
drm_crtc_send_vblank_event(crtc, crtc->state->event);
@@ -401,12 +401,12 @@ static void vkms_crtc_atomic_flush(struct drm_crtc *crtc,
vkms_output->pending_present_state);
vkms_output->pending_present_state = vkms_state;
} else {
- vibeshine_drm_present_timing_complete(
+ virtualdisplay_drm_present_timing_complete(
&vkms_state->present_timing, true,
ktime_get_ns());
}
drm_crtc_arm_vblank_event(crtc, crtc->state->event);
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
vrr_flip = crtc->state->vrr_enabled;
#endif
}
@@ -416,7 +416,7 @@ static void vkms_crtc_atomic_flush(struct drm_crtc *crtc,
crtc->state->event = NULL;
} else {
/* Unsynchronized/no-event commits complete at the state update. */
- vibeshine_drm_present_timing_complete(
+ virtualdisplay_drm_present_timing_complete(
&vkms_state->present_timing, true, ktime_get_ns());
}
@@ -424,7 +424,7 @@ static void vkms_crtc_atomic_flush(struct drm_crtc *crtc,
spin_unlock_irq(&vkms_output->lock);
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
/*
* Adaptive sync removes the fixed cadence, not the mode's maximum refresh
* rate. Stop the periodic timer, but defer an early flip until one nominal
@@ -449,7 +449,7 @@ static void vkms_crtc_atomic_flush(struct drm_crtc *crtc,
static void vkms_crtc_atomic_enable(struct drm_crtc *crtc,
struct drm_atomic_commit *state)
{
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
drm_crtc_vblank_atomic_enable(crtc, state);
/* drm_crtc_vblank_on() starts the timer after the initial atomic flush. */
@@ -469,7 +469,7 @@ static void vkms_crtc_atomic_enable(struct drm_crtc *crtc,
static void vkms_crtc_atomic_disable(struct drm_crtc *crtc,
struct drm_atomic_commit *state)
{
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
struct vkms_output *output = drm_crtc_to_vkms_output(crtc);
hrtimer_cancel(&output->vrr_hrtimer);
@@ -504,7 +504,7 @@ u64 vkms_crtc_take_present_timestamp(struct vkms_output *output,
/* Also detach on timeout, before the atomic state can be destroyed. */
if (output->pending_present_state == vkms_state)
output->pending_present_state = NULL;
- timestamp_ns = vibeshine_drm_present_timing_finish(
+ timestamp_ns = virtualdisplay_drm_present_timing_finish(
&vkms_state->present_timing, ktime_get_ns());
spin_unlock_irq(&output->lock);
return timestamp_ns;
@@ -541,7 +541,7 @@ static void vkms_vblank_timer_cleanup(struct drm_device *dev, void *data)
(void)dev;
vkms_disable_vblank(&output->crtc);
hrtimer_cancel(&output->vblank_hrtimer);
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
hrtimer_cancel(&output->vrr_hrtimer);
#endif
}
@@ -561,9 +561,9 @@ struct vkms_output *vkms_crtc_init(struct drm_device *dev,
DRM_DEV_ERROR(dev->dev, "Failed to init CRTC\n");
return vkms_out;
}
- vkms_out->present_trace = kvcalloc(VIBESHINE_DRM_TRACE_HISTORY_SIZE,
- sizeof(*vkms_out->present_trace),
- GFP_KERNEL);
+ vkms_out->present_trace =
+ kvcalloc(VIRTUALDISPLAY_DRM_TRACE_HISTORY_SIZE,
+ sizeof(*vkms_out->present_trace), GFP_KERNEL);
if (!vkms_out->present_trace)
return ERR_PTR(-ENOMEM);
ret = drmm_add_action_or_reset(dev, vkms_present_trace_cleanup,
@@ -583,7 +583,7 @@ struct vkms_output *vkms_crtc_init(struct drm_device *dev,
drm_crtc_enable_color_mgmt(crtc, 0, false, VKMS_LUT_SIZE);
-#if VIBESHINE_DRM_HAS_BACKGROUND_COLOR
+#if VIRTUALDISPLAY_DRM_HAS_BACKGROUND_COLOR
drm_crtc_attach_background_color_property(crtc);
#endif
@@ -592,7 +592,7 @@ struct vkms_output *vkms_crtc_init(struct drm_device *dev,
spin_lock_init(&vkms_out->vblank_timer_lock);
hrtimer_setup(&vkms_out->vblank_hrtimer, &vkms_vblank_simulate,
CLOCK_MONOTONIC, HRTIMER_MODE_REL);
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
hrtimer_setup(&vkms_out->vrr_hrtimer, &vkms_vrr_vblank_simulate,
CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
#endif
diff --git a/linux/vibeshine-drm/vkms_drv.c b/linux/virtualdisplay-drm/vkms_drv.c
similarity index 87%
rename from linux/vibeshine-drm/vkms_drv.c
rename to linux/virtualdisplay-drm/vkms_drv.c
index 53643bc..f52afcf 100644
--- a/linux/vibeshine-drm/vkms_drv.c
+++ b/linux/virtualdisplay-drm/vkms_drv.c
@@ -48,15 +48,15 @@
#include "vkms_drv.h"
#include "vkms_capture.h"
#include "vkms_frame_fds.h"
-#include "vibeshine_drm_change.h"
-#include "vibeshine_drm_dumb.h"
-#include "vibeshine_drm_present.h"
-#include "vibeshine_drm_uapi.h"
-#include "vibeshine_drm_compat.h"
-#include "vibeshine_drm_version.h"
-
-#define DRIVER_NAME "vibeshine_drm"
-#define DRIVER_DESC "Vibeshine HDR Virtual Display"
+#include "virtualdisplay_drm_change.h"
+#include "virtualdisplay_drm_dumb.h"
+#include "virtualdisplay_drm_present.h"
+#include "virtualdisplay_drm_uapi.h"
+#include "virtualdisplay_drm_compat.h"
+#include "virtualdisplay_drm_version.h"
+
+#define DRIVER_NAME "virtualdisplay_drm"
+#define DRIVER_DESC "libvirtualdisplay HDR DRM driver"
#define DRIVER_MAJOR 1
#define DRIVER_MINOR 5
@@ -109,27 +109,27 @@ static const struct file_operations vkms_driver_fops = {
.fop_flags = FOP_UNSIGNED_OFFSET,
};
-#define DRM_IOCTL_VIBESHINE_WAIT_PRESENT \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIBESHINE_WAIT_PRESENT, \
- struct vibeshine_drm_wait_present)
-#define DRM_IOCTL_VIBESHINE_GET_FRAME \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIBESHINE_GET_FRAME, \
- struct vibeshine_drm_frame)
-#define DRM_IOCTL_VIBESHINE_GET_PRESENT_TRACE \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIBESHINE_GET_PRESENT_TRACE, \
- struct vibeshine_drm_present_trace)
+#define DRM_IOCTL_VIRTUALDISPLAY_WAIT_PRESENT \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTUALDISPLAY_WAIT_PRESENT, \
+ struct virtualdisplay_drm_wait_present)
+#define DRM_IOCTL_VIRTUALDISPLAY_GET_FRAME \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTUALDISPLAY_GET_FRAME, \
+ struct virtualdisplay_drm_frame)
+#define DRM_IOCTL_VIRTUALDISPLAY_GET_PRESENT_TRACE \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTUALDISPLAY_GET_PRESENT_TRACE, \
+ struct virtualdisplay_drm_present_trace)
static int vkms_wait_present_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
- struct vibeshine_drm_wait_present *request = data;
+ struct virtualdisplay_drm_wait_present *request = data;
struct vkms_output *output;
struct drm_crtc *crtc;
u64 requested_sequence;
bool waiter_registered = false;
long wait_result = 0;
- if (!vibeshine_drm_present_request_valid(request))
+ if (!virtualdisplay_drm_present_request_valid(request))
return -EINVAL;
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
@@ -144,17 +144,17 @@ static int vkms_wait_present_ioctl(struct drm_device *dev, void *data,
request->timestamp_ns = 0;
spin_lock_irq(&output->present_lock);
- switch (vibeshine_drm_present_decide_wait(
+ switch (virtualdisplay_drm_present_decide_wait(
request, atomic64_read(&output->present_sequence),
output->present_waiters)) {
- case VIBESHINE_DRM_PRESENT_REJECT_BUSY:
+ case VIRTUALDISPLAY_DRM_PRESENT_REJECT_BUSY:
spin_unlock_irq(&output->present_lock);
return -EBUSY;
- case VIBESHINE_DRM_PRESENT_REGISTER_WAITER:
+ case VIRTUALDISPLAY_DRM_PRESENT_REGISTER_WAITER:
output->present_waiters++;
waiter_registered = true;
break;
- case VIBESHINE_DRM_PRESENT_RETURN_CURRENT:
+ case VIRTUALDISPLAY_DRM_PRESENT_RETURN_CURRENT:
break;
}
spin_unlock_irq(&output->present_lock);
@@ -175,7 +175,7 @@ static int vkms_wait_present_ioctl(struct drm_device *dev, void *data,
}
spin_lock_irq(&output->present_lock);
- vibeshine_drm_present_complete_response(
+ virtualdisplay_drm_present_complete_response(
request, requested_sequence,
atomic64_read(&output->present_sequence),
output->present_timestamp_ns,
@@ -185,10 +185,11 @@ static int vkms_wait_present_ioctl(struct drm_device *dev, void *data,
return 0;
}
-static bool vkms_frame_request_valid(const struct vibeshine_drm_frame *request)
+static bool
+vkms_frame_request_valid(const struct virtualdisplay_drm_frame *request)
{
- struct vibeshine_drm_frame expected = {
- .abi_version = VIBESHINE_DRM_FRAME_ABI_VERSION,
+ struct virtualdisplay_drm_frame expected = {
+ .abi_version = VIRTUALDISPLAY_DRM_FRAME_ABI_VERSION,
.crtc_id = request->crtc_id,
};
@@ -196,10 +197,10 @@ static bool vkms_frame_request_valid(const struct vibeshine_drm_frame *request)
}
static bool vkms_present_trace_request_valid(
- const struct vibeshine_drm_present_trace *request)
+ const struct virtualdisplay_drm_present_trace *request)
{
- struct vibeshine_drm_present_trace expected = {
- .abi_version = VIBESHINE_DRM_TRACE_ABI_VERSION,
+ struct virtualdisplay_drm_present_trace expected = {
+ .abi_version = VIRTUALDISPLAY_DRM_TRACE_ABI_VERSION,
.crtc_id = request->crtc_id,
.after_sequence = request->after_sequence,
};
@@ -210,7 +211,7 @@ static bool vkms_present_trace_request_valid(
static int vkms_get_present_trace_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
- struct vibeshine_drm_present_trace *request = data;
+ struct virtualdisplay_drm_present_trace *request = data;
struct vkms_output *output;
struct drm_crtc *crtc;
u64 current_sequence;
@@ -232,27 +233,28 @@ static int vkms_get_present_trace_ioctl(struct drm_device *dev, void *data,
spin_lock_irq(&output->present_lock);
current_sequence = atomic64_read(&output->present_sequence);
first_sequence = request->after_sequence + 1;
- if (current_sequence >= VIBESHINE_DRM_TRACE_HISTORY_SIZE) {
- u64 oldest_sequence =
- current_sequence - VIBESHINE_DRM_TRACE_HISTORY_SIZE + 1;
+ if (current_sequence >= VIRTUALDISPLAY_DRM_TRACE_HISTORY_SIZE) {
+ u64 oldest_sequence = current_sequence -
+ VIRTUALDISPLAY_DRM_TRACE_HISTORY_SIZE + 1;
if (first_sequence < oldest_sequence) {
first_sequence = oldest_sequence;
- request->flags |= VIBESHINE_DRM_TRACE_OVERFLOW;
+ request->flags |= VIRTUALDISPLAY_DRM_TRACE_OVERFLOW;
}
}
request->newest_sequence = current_sequence;
for (sequence = first_sequence;
sequence <= current_sequence &&
- request->count < VIBESHINE_DRM_TRACE_MAX_EVENTS;
+ request->count < VIRTUALDISPLAY_DRM_TRACE_MAX_EVENTS;
++sequence) {
- const struct vibeshine_drm_trace_event *event =
- &output->present_trace[(sequence - 1) %
- VIBESHINE_DRM_TRACE_HISTORY_SIZE];
+ const struct virtualdisplay_drm_trace_event *event =
+ &output->present_trace
+ [(sequence - 1) %
+ VIRTUALDISPLAY_DRM_TRACE_HISTORY_SIZE];
if (event->sequence != sequence) {
- request->flags |= VIBESHINE_DRM_TRACE_OVERFLOW;
+ request->flags |= VIRTUALDISPLAY_DRM_TRACE_OVERFLOW;
continue;
}
request->events[request->count++] = *event;
@@ -264,7 +266,7 @@ static int vkms_get_present_trace_ioctl(struct drm_device *dev, void *data,
/* The first member is the stable UAPI reply; the remaining state is kernel-only. */
struct vkms_frame_export {
- struct vibeshine_drm_frame frame;
+ struct virtualdisplay_drm_frame frame;
struct vkms_frame_fds descriptors;
bool include_color;
};
@@ -354,7 +356,7 @@ static int vkms_get_frame(struct drm_device *dev, void *data,
struct drm_file *file_priv, bool leased)
{
struct vkms_frame_export *export = data;
- struct vibeshine_drm_frame *request = &export->frame;
+ struct virtualdisplay_drm_frame *request = &export->frame;
struct drm_framebuffer *fb = NULL;
struct vkms_capture_lease *lease = NULL;
struct vkms_output *output;
@@ -378,14 +380,14 @@ static int vkms_get_frame(struct drm_device *dev, void *data,
if (!lease)
return -ENOMEM;
}
- for (i = 0; i < VIBESHINE_DRM_FRAME_MAX_PLANES; ++i) {
+ for (i = 0; i < VIRTUALDISPLAY_DRM_FRAME_MAX_PLANES; ++i) {
request->dma_buf_fds[i] = -1;
request->sync_file_fds[i] = -1;
}
spin_lock_irq(&output->present_lock);
if (leased &&
- !vibeshine_capture_acquire(
+ !virtualdisplay_capture_acquire(
&output->capture,
READ_ONCE(
drm_device_to_vkms_device(dev)->capture_stopping) ||
@@ -413,25 +415,25 @@ static int vkms_get_frame(struct drm_device *dev, void *data,
if (!fb) {
if (leased) {
spin_lock_irq(&output->present_lock);
- vibeshine_capture_release(&output->capture);
+ virtualdisplay_capture_release(&output->capture);
spin_unlock_irq(&output->present_lock);
wake_up_all(&output->capture_waitq);
}
- request->flags = VIBESHINE_DRM_FRAME_EMPTY;
+ request->flags = VIRTUALDISPLAY_DRM_FRAME_EMPTY;
request->reserved_u32 = 0;
memset(request->reserved, 0, sizeof(request->reserved));
vkms_capture_lease_put(lease);
return 0;
}
- request->flags = VIBESHINE_DRM_FRAME_READY |
- (leased ? VIBESHINE_DRM_FRAME_LEASED : 0);
+ request->flags = VIRTUALDISPLAY_DRM_FRAME_READY |
+ (leased ? VIRTUALDISPLAY_DRM_FRAME_LEASED : 0);
request->width = fb->width;
request->height = fb->height;
request->fourcc = fb->format->format;
request->modifier = vkms_framebuffer_modifier(fb);
plane_count = fb->format->num_planes;
- if (!plane_count || plane_count > VIBESHINE_DRM_FRAME_MAX_PLANES) {
+ if (!plane_count || plane_count > VIRTUALDISPLAY_DRM_FRAME_MAX_PLANES) {
ret = -EINVAL;
goto out;
}
@@ -492,30 +494,31 @@ static int vkms_get_frame_ioctl(struct drm_device *dev, void *data,
return vkms_get_frame(dev, data, file_priv, false);
}
-#define DRM_IOCTL_VIBESHINE_GET_FRAME_LEASED \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIBESHINE_GET_FRAME_LEASED, \
- struct vibeshine_drm_frame)
+#define DRM_IOCTL_VIRTUALDISPLAY_GET_FRAME_LEASED \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTUALDISPLAY_GET_FRAME_LEASED, \
+ struct virtualdisplay_drm_frame)
static int vkms_get_frame_leased_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
return vkms_get_frame(dev, data, file_priv, true);
}
-#define DRM_IOCTL_VIBESHINE_GET_FRAME_COLOR \
- DRM_IOWR(DRM_COMMAND_BASE + DRM_VIBESHINE_GET_FRAME_COLOR, \
- struct vibeshine_drm_frame)
+#define DRM_IOCTL_VIRTUALDISPLAY_GET_FRAME_COLOR \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTUALDISPLAY_GET_FRAME_COLOR, \
+ struct virtualdisplay_drm_frame)
static int vkms_get_frame_color_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
struct vkms_frame_export *export = data;
int ret;
- if (export->frame.abi_version != VIBESHINE_DRM_FRAME_COLOR_ABI_VERSION)
+ if (export->frame.abi_version !=
+ VIRTUALDISPLAY_DRM_FRAME_COLOR_ABI_VERSION)
return -EINVAL;
- export->frame.abi_version = VIBESHINE_DRM_FRAME_ABI_VERSION;
+ export->frame.abi_version = VIRTUALDISPLAY_DRM_FRAME_ABI_VERSION;
export->include_color = true;
ret = vkms_get_frame(dev, data, file_priv, true);
- export->frame.abi_version = VIBESHINE_DRM_FRAME_COLOR_ABI_VERSION;
+ export->frame.abi_version = VIRTUALDISPLAY_DRM_FRAME_COLOR_ABI_VERSION;
return ret;
}
@@ -530,9 +533,9 @@ static long vkms_frame_ioctl(struct file *file, unsigned int command,
struct vkms_frame_export export = {};
struct drm_file *client = file->private_data;
drm_ioctl_t *operation =
- command == DRM_IOCTL_VIBESHINE_GET_FRAME_COLOR ?
+ command == DRM_IOCTL_VIRTUALDISPLAY_GET_FRAME_COLOR ?
vkms_get_frame_color_ioctl :
- (command == DRM_IOCTL_VIBESHINE_GET_FRAME_LEASED ?
+ (command == DRM_IOCTL_VIRTUALDISPLAY_GET_FRAME_LEASED ?
vkms_get_frame_leased_ioctl :
vkms_get_frame_ioctl);
void __user *reply = (void __user *)argument;
@@ -553,9 +556,9 @@ static long vkms_frame_ioctl(struct file *file, unsigned int command,
static bool vkms_is_frame_ioctl(unsigned int command)
{
- return command == DRM_IOCTL_VIBESHINE_GET_FRAME ||
- command == DRM_IOCTL_VIBESHINE_GET_FRAME_LEASED ||
- command == DRM_IOCTL_VIBESHINE_GET_FRAME_COLOR;
+ return command == DRM_IOCTL_VIRTUALDISPLAY_GET_FRAME ||
+ command == DRM_IOCTL_VIRTUALDISPLAY_GET_FRAME_LEASED ||
+ command == DRM_IOCTL_VIRTUALDISPLAY_GET_FRAME_COLOR;
}
static long vkms_ioctl(struct file *file, unsigned int command,
@@ -579,11 +582,12 @@ static long vkms_compat_ioctl(struct file *file, unsigned int command,
#endif
static const struct drm_ioctl_desc vkms_ioctls[] = {
- DRM_IOCTL_DEF_DRV(VIBESHINE_GET_FRAME_COLOR, drm_invalid_op, 0),
- DRM_IOCTL_DEF_DRV(VIBESHINE_GET_FRAME_LEASED, drm_invalid_op, 0),
- DRM_IOCTL_DEF_DRV(VIBESHINE_WAIT_PRESENT, vkms_wait_present_ioctl, 0),
- DRM_IOCTL_DEF_DRV(VIBESHINE_GET_FRAME, drm_invalid_op, 0),
- DRM_IOCTL_DEF_DRV(VIBESHINE_GET_PRESENT_TRACE,
+ DRM_IOCTL_DEF_DRV(VIRTUALDISPLAY_GET_FRAME_COLOR, drm_invalid_op, 0),
+ DRM_IOCTL_DEF_DRV(VIRTUALDISPLAY_GET_FRAME_LEASED, drm_invalid_op, 0),
+ DRM_IOCTL_DEF_DRV(VIRTUALDISPLAY_WAIT_PRESENT, vkms_wait_present_ioctl,
+ 0),
+ DRM_IOCTL_DEF_DRV(VIRTUALDISPLAY_GET_FRAME, drm_invalid_op, 0),
+ DRM_IOCTL_DEF_DRV(VIRTUALDISPLAY_GET_PRESENT_TRACE,
vkms_get_present_trace_ioctl, 0),
};
@@ -624,7 +628,7 @@ static bool vkms_commit_touches_crtc(struct drm_atomic_commit *state,
static void
vkms_snapshot_plane_state(struct drm_plane_state *state,
- struct vibeshine_drm_plane_snapshot *snapshot)
+ struct virtualdisplay_drm_plane_snapshot *snapshot)
{
memset(snapshot, 0, sizeof(*snapshot));
if (!state)
@@ -637,7 +641,7 @@ vkms_snapshot_plane_state(struct drm_plane_state *state,
state->fb_damage_clips || state->color_mgmt_changed;
snapshot->crtc = (unsigned long)state->crtc;
snapshot->framebuffer = (unsigned long)state->fb;
-#if VIBESHINE_DRM_HAS_COLOR_PIPELINE
+#if VIRTUALDISPLAY_DRM_HAS_COLOR_PIPELINE
snapshot->color_pipeline = (unsigned long)state->color_pipeline;
#endif
snapshot->crtc_x = state->crtc_x;
@@ -662,7 +666,7 @@ vkms_snapshot_plane_state(struct drm_plane_state *state,
static void
vkms_snapshot_crtc_state(const struct drm_crtc_state *state,
- struct vibeshine_drm_crtc_snapshot *snapshot)
+ struct virtualdisplay_drm_crtc_snapshot *snapshot)
{
memset(snapshot, 0, sizeof(*snapshot));
if (!state)
@@ -679,19 +683,19 @@ vkms_snapshot_crtc_state(const struct drm_crtc_state *state,
snapshot->degamma_lut = (unsigned long)state->degamma_lut;
snapshot->ctm = (unsigned long)state->ctm;
snapshot->gamma_lut = (unsigned long)state->gamma_lut;
-#if VIBESHINE_DRM_HAS_BACKGROUND_COLOR
+#if VIRTUALDISPLAY_DRM_HAS_BACKGROUND_COLOR
snapshot->background_color = state->background_color;
#endif
snapshot->scaling_filter = state->scaling_filter;
-#if VIBESHINE_DRM_HAS_SHARPNESS_STRENGTH
+#if VIRTUALDISPLAY_DRM_HAS_SHARPNESS_STRENGTH
snapshot->sharpness_strength = state->sharpness_strength;
#endif
snapshot->vrr_enabled = state->vrr_enabled;
}
-static void
-vkms_snapshot_connector_state(const struct drm_connector_state *state,
- struct vibeshine_drm_connector_snapshot *snapshot)
+static void vkms_snapshot_connector_state(
+ const struct drm_connector_state *state,
+ struct virtualdisplay_drm_connector_snapshot *snapshot)
{
memset(snapshot, 0, sizeof(*snapshot));
if (!state)
@@ -728,34 +732,36 @@ static bool vkms_commit_changes_crtc(struct drm_atomic_commit *state,
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state,
new_crtc_state, i) {
- struct vibeshine_drm_crtc_snapshot old_snapshot, new_snapshot;
+ struct virtualdisplay_drm_crtc_snapshot old_snapshot,
+ new_snapshot;
if (crtc != target)
continue;
vkms_snapshot_crtc_state(old_crtc_state, &old_snapshot);
vkms_snapshot_crtc_state(new_crtc_state, &new_snapshot);
- if (vibeshine_drm_crtc_changes_scanout(&old_snapshot,
- &new_snapshot))
+ if (virtualdisplay_drm_crtc_changes_scanout(&old_snapshot,
+ &new_snapshot))
return true;
}
for_each_oldnew_plane_in_state(state, plane, old_plane_state,
new_plane_state, i) {
- struct vibeshine_drm_plane_snapshot old_snapshot, new_snapshot;
+ struct virtualdisplay_drm_plane_snapshot old_snapshot,
+ new_snapshot;
if ((!old_plane_state || old_plane_state->crtc != target) &&
(!new_plane_state || new_plane_state->crtc != target))
continue;
vkms_snapshot_plane_state(old_plane_state, &old_snapshot);
vkms_snapshot_plane_state(new_plane_state, &new_snapshot);
- if (vibeshine_drm_plane_changes_scanout(&old_snapshot,
- &new_snapshot))
+ if (virtualdisplay_drm_plane_changes_scanout(&old_snapshot,
+ &new_snapshot))
return true;
}
for_each_oldnew_connector_in_state(
state, connector, old_connector_state, new_connector_state, i) {
- struct vibeshine_drm_connector_snapshot old_snapshot,
+ struct virtualdisplay_drm_connector_snapshot old_snapshot,
new_snapshot;
if ((!old_connector_state ||
@@ -767,8 +773,8 @@ static bool vkms_commit_changes_crtc(struct drm_atomic_commit *state,
&old_snapshot);
vkms_snapshot_connector_state(new_connector_state,
&new_snapshot);
- if (vibeshine_drm_connector_changes_scanout(&old_snapshot,
- &new_snapshot))
+ if (virtualdisplay_drm_connector_changes_scanout(&old_snapshot,
+ &new_snapshot))
return true;
}
@@ -794,14 +800,14 @@ static void vkms_publish_color(struct drm_atomic_commit *state,
if (!new_state || new_state->crtc != crtc)
continue;
- output->present_color = VIBESHINE_DRM_COLOR_UNKNOWN;
+ output->present_color = VIRTUALDISPLAY_DRM_COLOR_UNKNOWN;
memset(output->present_hdr_metadata, 0,
sizeof(output->present_hdr_metadata));
if (!new_state->hdr_output_metadata) {
if (new_state->colorspace ==
DRM_MODE_COLORIMETRY_DEFAULT)
output->present_color =
- VIBESHINE_DRM_COLOR_SRGB;
+ VIRTUALDISPLAY_DRM_COLOR_SRGB;
continue;
}
if (new_state->hdr_output_metadata->length != sizeof(*hdr))
@@ -812,7 +818,7 @@ static void vkms_publish_color(struct drm_atomic_commit *state,
hdr->hdmi_metadata_type1.eotf != 2 ||
new_state->colorspace != DRM_MODE_COLORIMETRY_BT2020_RGB)
continue;
- output->present_color = VIBESHINE_DRM_COLOR_BT2020_PQ;
+ output->present_color = VIRTUALDISPLAY_DRM_COLOR_BT2020_PQ;
memcpy(output->present_hdr_metadata, hdr, sizeof(*hdr));
}
}
@@ -848,7 +854,7 @@ static void vkms_signal_presented_crtcs(struct drm_atomic_commit *state)
spin_lock_irq(&output->present_lock);
if (scanout_changed) {
u64 completed_sequence;
- struct vibeshine_drm_trace_event *trace_event;
+ struct virtualdisplay_drm_trace_event *trace_event;
if (primary_state ||
(crtc_state && !crtc_state->active)) {
@@ -864,12 +870,12 @@ static void vkms_signal_presented_crtcs(struct drm_atomic_commit *state)
trace_event =
&output->present_trace
[(completed_sequence - 1) %
- VIBESHINE_DRM_TRACE_HISTORY_SIZE];
+ VIRTUALDISPLAY_DRM_TRACE_HISTORY_SIZE];
trace_event->sequence = completed_sequence;
trace_event->timestamp_ns =
output->present_timestamp_ns;
}
- WARN_ON_ONCE(!vibeshine_capture_publish(&output->capture));
+ WARN_ON_ONCE(!virtualdisplay_capture_publish(&output->capture));
if (WARN_ON_ONCE(atomic_read(&output->pending_commits) <= 0))
atomic_set(&output->pending_commits, 0);
else
@@ -976,7 +982,7 @@ static const struct drm_driver vkms_driver = {
.fops = &vkms_driver_fops,
.ioctls = vkms_ioctls,
.num_ioctls = ARRAY_SIZE(vkms_ioctls),
- VIBESHINE_DRM_SHMEM_DRIVER_OPS,
+ VIRTUALDISPLAY_DRM_SHMEM_DRIVER_OPS,
DRM_FBDEV_SHMEM_DRIVER_OPS,
.name = DRIVER_NAME,
@@ -1023,7 +1029,8 @@ static int vkms_reserve_capture_outputs(struct drm_atomic_commit *state,
continue;
output = drm_crtc_to_vkms_output(crtc);
spin_lock_irq(&output->present_lock);
- reserved = vibeshine_capture_retire(&output->capture, nonblock);
+ reserved = virtualdisplay_capture_retire(&output->capture,
+ nonblock);
spin_unlock_irq(&output->present_lock);
if (!reserved) {
failed = crtc;
@@ -1042,7 +1049,7 @@ static int vkms_reserve_capture_outputs(struct drm_atomic_commit *state,
continue;
output = drm_crtc_to_vkms_output(crtc);
spin_lock_irq(&output->present_lock);
- WARN_ON_ONCE(!vibeshine_capture_publish(&output->capture));
+ WARN_ON_ONCE(!virtualdisplay_capture_publish(&output->capture));
spin_unlock_irq(&output->present_lock);
}
return -EBUSY;
@@ -1059,7 +1066,7 @@ static void vkms_unreserve_capture_outputs(struct drm_atomic_commit *state)
continue;
output = drm_crtc_to_vkms_output(crtc);
spin_lock_irq(&output->present_lock);
- WARN_ON_ONCE(!vibeshine_capture_publish(&output->capture));
+ WARN_ON_ONCE(!virtualdisplay_capture_publish(&output->capture));
spin_unlock_irq(&output->present_lock);
}
}
@@ -1474,8 +1481,8 @@ module_exit(vkms_exit);
MODULE_AUTHOR("Haneen Mohammed ");
MODULE_AUTHOR("Rodrigo Siqueira ");
-MODULE_AUTHOR("Vibeshine contributors");
+MODULE_AUTHOR("libvirtualdisplay contributors");
MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_VERSION(VIBESHINE_DRM_VERSION);
+MODULE_VERSION(VIRTUALDISPLAY_DRM_VERSION);
MODULE_IMPORT_NS("DMA_BUF");
MODULE_LICENSE("GPL");
diff --git a/linux/vibeshine-drm/vkms_drv.h b/linux/virtualdisplay-drm/vkms_drv.h
similarity index 97%
rename from linux/vibeshine-drm/vkms_drv.h
rename to linux/virtualdisplay-drm/vkms_drv.h
index 0f80b6e..01f5901 100644
--- a/linux/vibeshine-drm/vkms_drv.h
+++ b/linux/virtualdisplay-drm/vkms_drv.h
@@ -3,7 +3,7 @@
#ifndef _VKMS_DRV_H_
#define _VKMS_DRV_H_
-#include "vibeshine_drm_capture.h"
+#include "virtualdisplay_drm_capture.h"
#include
#include
#include
@@ -16,9 +16,9 @@
#include
#include
-#include "vibeshine_drm_compat.h"
-#include "vibeshine_drm_present.h"
-#include "vibeshine_drm_uapi.h"
+#include "virtualdisplay_drm_compat.h"
+#include "virtualdisplay_drm_present.h"
+#include "virtualdisplay_drm_uapi.h"
#define DEFAULT_DEVICE_NAME "vkms"
@@ -34,7 +34,7 @@
#define NUM_OVERLAY_PLANES 8
#define VKMS_LUT_SIZE 256
-#define VIBESHINE_DRM_TRACE_HISTORY_SIZE 4096U
+#define VIRTUALDISPLAY_DRM_TRACE_HISTORY_SIZE 4096U
/**
* struct vkms_frame_info - Structure to store the state of a frame
@@ -214,7 +214,7 @@ struct vkms_crtc_state {
bool wb_pending;
u64 frame_start;
u64 frame_end;
- struct vibeshine_drm_present_timing present_timing;
+ struct virtualdisplay_drm_present_timing present_timing;
};
/**
@@ -250,7 +250,7 @@ struct vkms_output {
spinlock_t vblank_timer_lock;
ktime_t period_ns;
bool vblank_timer_enabled;
-#if VIBESHINE_DRM_HAS_VBLANK_HELPER
+#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER
struct hrtimer vrr_hrtimer;
#endif
struct workqueue_struct *composer_workq;
@@ -275,12 +275,12 @@ struct vkms_output {
u32 present_color;
u64 present_hdr_metadata[4];
unsigned int present_waiters;
- struct vibeshine_capture_state capture;
+ struct virtualdisplay_capture_state capture;
wait_queue_head_t capture_waitq;
spinlock_t present_lock;
wait_queue_head_t present_waitq;
- struct vibeshine_drm_trace_event *present_trace;
+ struct virtualdisplay_drm_trace_event *present_trace;
};
struct vkms_config;
diff --git a/linux/vibeshine-drm/vkms_formats.c b/linux/virtualdisplay-drm/vkms_formats.c
similarity index 100%
rename from linux/vibeshine-drm/vkms_formats.c
rename to linux/virtualdisplay-drm/vkms_formats.c
diff --git a/linux/vibeshine-drm/vkms_formats.h b/linux/virtualdisplay-drm/vkms_formats.h
similarity index 100%
rename from linux/vibeshine-drm/vkms_formats.h
rename to linux/virtualdisplay-drm/vkms_formats.h
diff --git a/linux/vibeshine-drm/vkms_frame_fds.h b/linux/virtualdisplay-drm/vkms_frame_fds.h
similarity index 100%
rename from linux/vibeshine-drm/vkms_frame_fds.h
rename to linux/virtualdisplay-drm/vkms_frame_fds.h
diff --git a/linux/vibeshine-drm/vkms_luts.c b/linux/virtualdisplay-drm/vkms_luts.c
similarity index 100%
rename from linux/vibeshine-drm/vkms_luts.c
rename to linux/virtualdisplay-drm/vkms_luts.c
diff --git a/linux/vibeshine-drm/vkms_luts.h b/linux/virtualdisplay-drm/vkms_luts.h
similarity index 100%
rename from linux/vibeshine-drm/vkms_luts.h
rename to linux/virtualdisplay-drm/vkms_luts.h
diff --git a/linux/vibeshine-drm/vkms_output.c b/linux/virtualdisplay-drm/vkms_output.c
similarity index 100%
rename from linux/vibeshine-drm/vkms_output.c
rename to linux/virtualdisplay-drm/vkms_output.c
diff --git a/linux/vibeshine-drm/vkms_plane.c b/linux/virtualdisplay-drm/vkms_plane.c
similarity index 99%
rename from linux/vibeshine-drm/vkms_plane.c
rename to linux/virtualdisplay-drm/vkms_plane.c
index 6784afd..80ae956 100644
--- a/linux/vibeshine-drm/vkms_plane.c
+++ b/linux/virtualdisplay-drm/vkms_plane.c
@@ -13,7 +13,7 @@
#include "vkms_drv.h"
#include "vkms_formats.h"
-#include "vibeshine_drm_compat.h"
+#include "virtualdisplay_drm_compat.h"
static const u32 vkms_formats[] = {
DRM_FORMAT_ARGB8888, DRM_FORMAT_ABGR8888,
@@ -327,7 +327,7 @@ struct vkms_plane *vkms_plane_init(struct vkms_device *vkmsdev,
BIT(DRM_COLOR_YCBCR_FULL_RANGE),
DRM_COLOR_YCBCR_BT601, DRM_COLOR_YCBCR_FULL_RANGE);
-#if VIBESHINE_DRM_HAS_COLOR_PIPELINE
+#if VIRTUALDISPLAY_DRM_HAS_COLOR_PIPELINE
if (vkms_config_plane_get_default_pipeline(plane_cfg))
vkms_initialize_colorops(&plane->base);
#endif
diff --git a/linux/vibeshine-drm/vkms_writeback.c b/linux/virtualdisplay-drm/vkms_writeback.c
similarity index 99%
rename from linux/vibeshine-drm/vkms_writeback.c
rename to linux/virtualdisplay-drm/vkms_writeback.c
index 5346c3c..2ae13f5 100644
--- a/linux/vibeshine-drm/vkms_writeback.c
+++ b/linux/virtualdisplay-drm/vkms_writeback.c
@@ -14,7 +14,7 @@
#include "vkms_drv.h"
#include "vkms_formats.h"
-#include "vibeshine_drm_compat.h"
+#include "virtualdisplay_drm_compat.h"
static const u32 vkms_wb_formats[] = {
DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888, DRM_FORMAT_ABGR8888,
diff --git a/linux/vkms_peercred.cpp b/linux/vkms_peercred.cpp
index 35f07ce..76e04e5 100644
--- a/linux/vkms_peercred.cpp
+++ b/linux/vkms_peercred.cpp
@@ -10,7 +10,7 @@
namespace {
int fail(const char *message) {
- std::fprintf(stderr, "vibeshine-vkms-peercred: %s: %s\n", message, std::strerror(errno));
+ std::fprintf(stderr, "virtualdisplay-vkms-peercred: %s: %s\n", message, std::strerror(errno));
return 1;
}
@@ -18,7 +18,7 @@ namespace {
int main(int argc, char **argv) {
if (argc < 2 || argv[1][0] != '/') {
- std::fputs("vibeshine-vkms-peercred: an absolute broker path is required\n", stderr);
+ std::fputs("virtualdisplay-vkms-peercred: an absolute broker path is required\n", stderr);
return 2;
}
@@ -28,7 +28,7 @@ int main(int argc, char **argv) {
return fail("standard input is not a socket");
}
if (local_address.ss_family != AF_UNIX) {
- std::fputs("vibeshine-vkms-peercred: standard input is not an AF_UNIX socket\n", stderr);
+ std::fputs("virtualdisplay-vkms-peercred: standard input is not an AF_UNIX socket\n", stderr);
return 1;
}
@@ -38,7 +38,7 @@ int main(int argc, char **argv) {
return fail("could not obtain peer credentials");
}
if (peer_size != sizeof(peer) || peer.pid <= 0 || peer.uid == static_cast(-1)) {
- std::fputs("vibeshine-vkms-peercred: incomplete peer credentials\n", stderr);
+ std::fputs("virtualdisplay-vkms-peercred: incomplete peer credentials\n", stderr);
return 1;
}
diff --git a/src/driver/CMakeLists.txt b/src/driver/CMakeLists.txt
index 464b43c..cc7290e 100644
--- a/src/driver/CMakeLists.txt
+++ b/src/driver/CMakeLists.txt
@@ -27,11 +27,11 @@ if(WIN32)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- add_executable(vibeshine_vkms_peercred
+ add_executable(virtualdisplay_vkms_peercred
"${_LIBVIRTUALDISPLAY_LINUX_ROOT}/vkms_peercred.cpp")
- set_target_properties(vibeshine_vkms_peercred PROPERTIES
- OUTPUT_NAME vibeshine-vkms-peercred)
- target_compile_features(vibeshine_vkms_peercred PRIVATE cxx_std_20)
+ set_target_properties(virtualdisplay_vkms_peercred PROPERTIES
+ OUTPUT_NAME virtualdisplay-vkms-peercred)
+ target_compile_features(virtualdisplay_vkms_peercred PRIVATE cxx_std_20)
endif()
if(_libvirtualdisplay_build_kwin_bridge)
@@ -42,12 +42,12 @@ if(_libvirtualdisplay_build_kwin_bridge)
pkg_check_modules(LIBVIRTUALDISPLAY_KWIN_DRM REQUIRED IMPORTED_TARGET libdrm>=2.4.127)
pkg_check_modules(LIBVIRTUALDISPLAY_KWIN_GBM REQUIRED IMPORTED_TARGET gbm)
- add_library(vibeshine_kwin_gpu SHARED
+ add_library(virtualdisplay_kwin_gpu SHARED
"${_LIBVIRTUALDISPLAY_LINUX_ROOT}/kwin_gpu_interposer.cpp")
- set_target_properties(vibeshine_kwin_gpu PROPERTIES
- OUTPUT_NAME vibeshine-kwin-gpu)
- target_compile_features(vibeshine_kwin_gpu PRIVATE cxx_std_20)
- target_link_libraries(vibeshine_kwin_gpu PRIVATE
+ set_target_properties(virtualdisplay_kwin_gpu PROPERTIES
+ OUTPUT_NAME virtualdisplay-kwin-gpu)
+ target_compile_features(virtualdisplay_kwin_gpu PRIVATE cxx_std_20)
+ target_link_libraries(virtualdisplay_kwin_gpu PRIVATE
PkgConfig::LIBVIRTUALDISPLAY_KWIN_DRM
PkgConfig::LIBVIRTUALDISPLAY_KWIN_GBM
lizardbyte::common
@@ -65,11 +65,11 @@ if(_libvirtualdisplay_build_kwin_bridge)
# This is the reviewed GraphicsBufferOptions layout. New minor versions
# remain on the native safe path until their allocator contract is reviewed.
if(_kwin_library_name MATCHES "^libkwin\\.so\\.6\\.8\\.[0-9]+$")
- target_include_directories(vibeshine_kwin_gpu PRIVATE "${LIBVIRTUALDISPLAY_KWIN_INCLUDE_DIR}")
- target_link_libraries(vibeshine_kwin_gpu PRIVATE Qt6::Core)
- target_compile_definitions(vibeshine_kwin_gpu PRIVATE
- VIBESHINE_KWIN_NATIVE_ALLOCATOR=1
- VIBESHINE_KWIN_NATIVE_LIBRARY_NAME="${_kwin_library_name}")
+ target_include_directories(virtualdisplay_kwin_gpu PRIVATE "${LIBVIRTUALDISPLAY_KWIN_INCLUDE_DIR}")
+ target_link_libraries(virtualdisplay_kwin_gpu PRIVATE Qt6::Core)
+ target_compile_definitions(virtualdisplay_kwin_gpu PRIVATE
+ VIRTUALDISPLAY_KWIN_NATIVE_ALLOCATOR=1
+ VIRTUALDISPLAY_KWIN_NATIVE_LIBRARY_NAME="${_kwin_library_name}")
endif()
endif()
@@ -80,32 +80,32 @@ if(_libvirtualdisplay_build_kwin_bridge)
# way instead of stripping KWin's capability: KWin keeps realtime
# scheduling and the vendor binary is never modified. The bit is a trust
# marker only; a shared object is never executed with it.
- set(VIBESHINE_KWIN_GPU_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH
- "Trusted system library directory for the Vibeshine KWin GPU bridge")
- set(VIBESHINE_KWIN_GPU_SYSTEMD_USER_INSTALL_DIR "/usr/lib/systemd/user" CACHE PATH
- "Systemd user-unit directory for the Vibeshine KWin GPU bridge drop-in")
- set(VIBESHINE_KWIN_GPU_LIBRARY_NAME "libvibeshine-kwin-gpu.so")
+ set(VIRTUALDISPLAY_KWIN_GPU_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH
+ "Trusted system library directory for the libvirtualdisplay KWin GPU bridge")
+ set(VIRTUALDISPLAY_KWIN_GPU_SYSTEMD_USER_INSTALL_DIR "/usr/lib/systemd/user" CACHE PATH
+ "Systemd user-unit directory for the libvirtualdisplay KWin GPU bridge drop-in")
+ set(VIRTUALDISPLAY_KWIN_GPU_LIBRARY_NAME "libvirtualdisplay-kwin-gpu.so")
configure_file(
- "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/packaging/vibeshine-kwin-gpu.conf.in"
- "${CMAKE_CURRENT_BINARY_DIR}/vibeshine-kwin-gpu.conf" @ONLY)
+ "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/packaging/virtualdisplay-kwin-gpu.conf.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/virtualdisplay-kwin-gpu.conf" @ONLY)
configure_file(
- "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/packaging/vibeshine-login-kwin-gpu.conf.in"
- "${CMAKE_CURRENT_BINARY_DIR}/vibeshine-login-kwin-gpu.conf" @ONLY)
+ "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/packaging/virtualdisplay-login-kwin-gpu.conf.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/virtualdisplay-login-kwin-gpu.conf" @ONLY)
- install(TARGETS vibeshine_kwin_gpu
- LIBRARY DESTINATION "${VIBESHINE_KWIN_GPU_LIBRARY_INSTALL_DIR}"
+ install(TARGETS virtualdisplay_kwin_gpu
+ LIBRARY DESTINATION "${VIRTUALDISPLAY_KWIN_GPU_LIBRARY_INSTALL_DIR}"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE SETUID)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/vibeshine-kwin-gpu.conf"
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/virtualdisplay-kwin-gpu.conf"
DESTINATION
- "${VIBESHINE_KWIN_GPU_SYSTEMD_USER_INSTALL_DIR}/plasma-kwin_wayland.service.d")
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/vibeshine-login-kwin-gpu.conf"
- RENAME vibeshine-kwin-gpu.conf
+ "${VIRTUALDISPLAY_KWIN_GPU_SYSTEMD_USER_INSTALL_DIR}/plasma-kwin_wayland.service.d")
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/virtualdisplay-login-kwin-gpu.conf"
+ RENAME virtualdisplay-kwin-gpu.conf
DESTINATION
- "${VIBESHINE_KWIN_GPU_SYSTEMD_USER_INSTALL_DIR}/plasma-login-kwin_wayland.service.d")
+ "${VIRTUALDISPLAY_KWIN_GPU_SYSTEMD_USER_INSTALL_DIR}/plasma-login-kwin_wayland.service.d")
endif()
-option(BUILD_SUNSHINE_VIRTUAL_DISPLAY_DRIVER "Build the Windows UMDF/IddCx Sunshine virtual display driver" OFF)
+option(BUILD_VIRTUALDISPLAY_WINDOWS_DRIVER "Build the Windows UMDF/IddCx virtual display driver" OFF)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(_libvirtualdisplay_tool_default ON)
else()
@@ -123,11 +123,11 @@ unset(_libvirtualdisplay_tool_default)
# source of truth. It is pure C++ (no Win32), so it builds and runs in the normal/test
# build. `regen_driver_inf` rewrites the committed INF; the test suite runs it in --check
# mode (see tests/CMakeLists.txt) so the shipped INF can never drift from the C++ constants.
-if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR BUILD_SUNSHINE_VIRTUAL_DISPLAY_DRIVER)
- set(SUNSHINE_DRIVER_INF_TEMPLATE
- "${CMAKE_CURRENT_SOURCE_DIR}/windows_driver/SunshineVirtualDisplayDriver.inf.in")
- set(SUNSHINE_DRIVER_INF_COMMITTED
- "${CMAKE_CURRENT_SOURCE_DIR}/windows_driver/SunshineVirtualDisplayDriver.inf")
+if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR BUILD_VIRTUALDISPLAY_WINDOWS_DRIVER)
+ set(VDD_DRIVER_INF_TEMPLATE
+ "${CMAKE_CURRENT_SOURCE_DIR}/windows_driver/LizardByteVirtualDisplay.inf.in")
+ set(VDD_DRIVER_INF_COMMITTED
+ "${CMAKE_CURRENT_SOURCE_DIR}/windows_driver/LizardByteVirtualDisplay.inf")
add_executable(gen_driver_inf "${PROJECT_SOURCE_DIR}/tools/gen_driver_inf.cpp")
target_link_libraries(gen_driver_inf PRIVATE libvirtualdisplay::driver)
@@ -135,9 +135,9 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR BUILD_SUNSHINE_VIRTUAL_DISPLAY_DR
add_custom_target(regen_driver_inf
COMMAND gen_driver_inf
- "${SUNSHINE_DRIVER_INF_TEMPLATE}"
- "${SUNSHINE_DRIVER_INF_COMMITTED}"
- COMMENT "Regenerating SunshineVirtualDisplayDriver.inf from device_identity")
+ "${VDD_DRIVER_INF_TEMPLATE}"
+ "${VDD_DRIVER_INF_COMMITTED}"
+ COMMENT "Regenerating LizardByteVirtualDisplay.inf from device_identity")
set(_libvirtualdisplay_driver_version_source "${LIBVIRTUALDISPLAY_PACKAGE_VERSION}")
string(REGEX REPLACE "^v" "" _libvirtualdisplay_driver_version_source "${_libvirtualdisplay_driver_version_source}")
@@ -156,36 +156,36 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR BUILD_SUNSHINE_VIRTUAL_DISPLAY_DR
set(_libvirtualdisplay_driver_version "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}.${CMAKE_MATCH_5}")
endif()
set(LIBVIRTUALDISPLAY_DRIVER_VERSION "${_libvirtualdisplay_driver_version}" CACHE STRING
- "Four-part Windows DriverVer version for SunshineVirtualDisplayDriver.inf" FORCE)
+ "Four-part Windows DriverVer version for LizardByteVirtualDisplay.inf" FORCE)
set(LIBVIRTUALDISPLAY_DRIVER_DATE "" CACHE STRING
- "Windows DriverVer date for SunshineVirtualDisplayDriver.inf, formatted MM/DD/YYYY")
+ "Windows DriverVer date for LizardByteVirtualDisplay.inf, formatted MM/DD/YYYY")
if(NOT LIBVIRTUALDISPLAY_DRIVER_DATE)
string(TIMESTAMP LIBVIRTUALDISPLAY_DRIVER_DATE "%m/%d/%Y" UTC)
set(LIBVIRTUALDISPLAY_DRIVER_DATE "${LIBVIRTUALDISPLAY_DRIVER_DATE}" CACHE STRING
- "Windows DriverVer date for SunshineVirtualDisplayDriver.inf, formatted MM/DD/YYYY" FORCE)
+ "Windows DriverVer date for LizardByteVirtualDisplay.inf, formatted MM/DD/YYYY" FORCE)
endif()
if(NOT LIBVIRTUALDISPLAY_DRIVER_DATE MATCHES "^[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]$")
message(FATAL_ERROR
"LIBVIRTUALDISPLAY_DRIVER_DATE must be formatted MM/DD/YYYY, got '${LIBVIRTUALDISPLAY_DRIVER_DATE}'")
endif()
- set(SUNSHINE_DRIVER_INF_GENERATED "${CMAKE_CURRENT_BINARY_DIR}/windows_driver/SunshineVirtualDisplayDriver.inf")
- add_custom_command(OUTPUT "${SUNSHINE_DRIVER_INF_GENERATED}"
+ set(VDD_DRIVER_INF_GENERATED "${CMAKE_CURRENT_BINARY_DIR}/windows_driver/LizardByteVirtualDisplay.inf")
+ add_custom_command(OUTPUT "${VDD_DRIVER_INF_GENERATED}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/windows_driver"
COMMAND gen_driver_inf
--driverver-date "${LIBVIRTUALDISPLAY_DRIVER_DATE}"
--driverver-version "${LIBVIRTUALDISPLAY_DRIVER_VERSION}"
- "${SUNSHINE_DRIVER_INF_TEMPLATE}"
- "${SUNSHINE_DRIVER_INF_GENERATED}"
- DEPENDS gen_driver_inf "${SUNSHINE_DRIVER_INF_TEMPLATE}"
- COMMENT "Generating the versioned SunshineVirtualDisplayDriver.inf"
+ "${VDD_DRIVER_INF_TEMPLATE}"
+ "${VDD_DRIVER_INF_GENERATED}"
+ DEPENDS gen_driver_inf "${VDD_DRIVER_INF_TEMPLATE}"
+ COMMENT "Generating the versioned LizardByteVirtualDisplay.inf"
VERBATIM)
add_custom_target(gen_driver_package_inf
- DEPENDS "${SUNSHINE_DRIVER_INF_GENERATED}"
+ DEPENDS "${VDD_DRIVER_INF_GENERATED}"
COMMENT "Prepare the driver package INF")
endif()
-if(BUILD_SUNSHINE_VIRTUAL_DISPLAY_DRIVER)
+if(BUILD_VIRTUALDISPLAY_WINDOWS_DRIVER)
add_subdirectory(windows_driver)
endif()
@@ -213,7 +213,7 @@ if(WIN32 AND BUILD_VIRTUALDISPLAY_TOOLS)
list(APPEND _libvirtualdisplay_tool_targets virtualdisplay_broker)
# Alt-tab / teardown brute-force stress harness: creates its own temporary virtual
- # display, captures it like Sunshine (recreating the capture device on every mode
+ # display, captures it (recreating the capture device on every mode
# change), churns the mode + connect/disconnect, and watchdogs for hangs.
add_executable(alttab_stress "${PROJECT_SOURCE_DIR}/tools/alttab_stress.cpp")
target_link_libraries(alttab_stress PRIVATE libvirtualdisplay::driver advapi32 d3d11 dxgi)
@@ -222,18 +222,18 @@ if(WIN32 AND BUILD_VIRTUALDISPLAY_TOOLS)
endif()
if(WIN32 AND BUILD_VIRTUALDISPLAY_VULKAN_LAYER)
- add_library(vk_layer_sunshine_hdr SHARED vulkan_layer/vk_layer_sunshine_hdr.cpp)
- set_target_properties(vk_layer_sunshine_hdr PROPERTIES OUTPUT_NAME "VkLayer_sunshine_hdr" PREFIX "")
- target_link_libraries(vk_layer_sunshine_hdr PRIVATE user32)
- target_compile_features(vk_layer_sunshine_hdr PRIVATE cxx_std_20)
- add_custom_command(TARGET vk_layer_sunshine_hdr POST_BUILD
+ add_library(vk_layer_lizardbyte_hdr SHARED vulkan_layer/vk_layer_lizardbyte_hdr.cpp)
+ set_target_properties(vk_layer_lizardbyte_hdr PROPERTIES OUTPUT_NAME "VkLayer_lizardbyte_hdr" PREFIX "")
+ target_link_libraries(vk_layer_lizardbyte_hdr PRIVATE user32)
+ target_compile_features(vk_layer_lizardbyte_hdr PRIVATE cxx_std_20)
+ add_custom_command(TARGET vk_layer_lizardbyte_hdr POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${CMAKE_CURRENT_SOURCE_DIR}/vulkan_layer/VkLayer_sunshine_hdr.json"
- "$/VkLayer_sunshine_hdr.json"
+ "${CMAKE_CURRENT_SOURCE_DIR}/vulkan_layer/VkLayer_lizardbyte_hdr.json"
+ "$/VkLayer_lizardbyte_hdr.json"
COMMENT "Copying the Vulkan HDR layer manifest")
- install(TARGETS vk_layer_sunshine_hdr RUNTIME DESTINATION vulkan-layer)
- install(FILES vulkan_layer/VkLayer_sunshine_hdr.json DESTINATION vulkan-layer)
- list(APPEND _libvirtualdisplay_tool_targets vk_layer_sunshine_hdr)
+ install(TARGETS vk_layer_lizardbyte_hdr RUNTIME DESTINATION vulkan-layer)
+ install(FILES vulkan_layer/VkLayer_lizardbyte_hdr.json DESTINATION vulkan-layer)
+ list(APPEND _libvirtualdisplay_tool_targets vk_layer_lizardbyte_hdr)
endif()
if(_libvirtualdisplay_tool_targets)
diff --git a/src/driver/broker_commands.cpp b/src/driver/broker_commands.cpp
index 68cd8da..1856969 100644
--- a/src/driver/broker_commands.cpp
+++ b/src/driver/broker_commands.cpp
@@ -347,8 +347,8 @@ namespace virtual_display::driver {
profile.display_id = permanent_display_id(slot);
profile.container_id = container_guid_from_display_id(profile.display_id);
std::copy(
- std::begin(kSunshineDriverManufacturerId),
- std::end(kSunshineDriverManufacturerId),
+ std::begin(kVirtualDisplayManufacturerId),
+ std::end(kVirtualDisplayManufacturerId),
std::begin(profile.manufacturer_id)
);
profile.product_code = permanent_product_code(slot);
diff --git a/src/driver/control_protocol.cpp b/src/driver/control_protocol.cpp
index e9ba1e8..e58ff36 100644
--- a/src/driver/control_protocol.cpp
+++ b/src/driver/control_protocol.cpp
@@ -63,8 +63,7 @@ namespace virtual_display::driver {
}
if (trim_display_name(request.display_name).empty()) {
std::fill(std::begin(request.display_name), std::end(request.display_name), '\0');
- constexpr char kDefaultName[] = "Sunshine Display";
- std::copy_n(kDefaultName, sizeof(kDefaultName) - 1, request.display_name);
+ std::copy(kDefaultMonitorName.begin(), kDefaultMonitorName.end(), request.display_name);
return;
}
diff --git a/src/driver/display_identity.cpp b/src/driver/display_identity.cpp
index 0a98d09..9b987c7 100644
--- a/src/driver/display_identity.cpp
+++ b/src/driver/display_identity.cpp
@@ -41,7 +41,7 @@ namespace virtual_display::driver {
record.identity_display_id;
EdidOptions options {};
- options.manufacturer_id = kSunshineDriverManufacturerId;
+ options.manufacturer_id = kVirtualDisplayManufacturerId;
options.product_code = product_code_from_display_id(identity_display_id);
options.serial_number = serial_number_from_display_id(identity_display_id);
options.width = record.width;
diff --git a/src/driver/edid.cpp b/src/driver/edid.cpp
index 66c73b0..bc9156c 100644
--- a/src/driver/edid.cpp
+++ b/src/driver/edid.cpp
@@ -189,13 +189,17 @@ namespace virtual_display::driver {
data[offset + 3] = descriptor_type;
data[offset + 4] = std::byte {0x00};
- std::fill_n(data.begin() + static_cast(offset + 5), 13, std::byte {' '});
- const auto safe_text = sanitized_edid_text(text, 12);
+ constexpr std::size_t kTextFieldSize = 13;
+ static_assert(kDefaultMonitorName.size() <= kTextFieldSize);
+ std::fill_n(data.begin() + static_cast(offset + 5), kTextFieldSize, std::byte {' '});
+ const auto safe_text = sanitized_edid_text(text, kTextFieldSize);
const auto copy_size = safe_text.size();
if (copy_size != 0) {
std::memcpy(data.data() + offset + 5, safe_text.data(), copy_size);
}
- data[offset + 5 + copy_size] = std::byte {'\n'};
+ if (copy_size < kTextFieldSize) {
+ data[offset + 5 + copy_size] = std::byte {'\n'};
+ }
}
void write_edid_string_field(
diff --git a/src/driver/include/virtual_display/driver/cli_commands.h b/src/driver/include/virtual_display/driver/cli_commands.h
index 82c443b..72b3fd3 100644
--- a/src/driver/include/virtual_display/driver/cli_commands.h
+++ b/src/driver/include/virtual_display/driver/cli_commands.h
@@ -1,6 +1,7 @@
#pragma once
#include "virtual_display/driver/control_protocol.h"
+#include "virtual_display/driver/display_defaults.h"
#include
#include
@@ -16,7 +17,7 @@ namespace virtual_display::driver {
std::uint32_t physical_width_mm {kDefaultPhysicalWidthMillimeters};
std::uint32_t physical_height_mm {kDefaultPhysicalHeightMillimeters};
std::uint32_t refresh_rate_millihz {60'000};
- std::string name {"Sunshine Display"};
+ std::string name {kDefaultMonitorName}; ///< Monitor label set by `--name`.
};
struct ProfileOptions: PermanentOptions {
diff --git a/src/driver/include/virtual_display/driver/control_protocol.h b/src/driver/include/virtual_display/driver/control_protocol.h
index 58267ad..4ab14af 100644
--- a/src/driver/include/virtual_display/driver/control_protocol.h
+++ b/src/driver/include/virtual_display/driver/control_protocol.h
@@ -1,5 +1,7 @@
#pragma once
+#include "virtual_display/driver/display_defaults.h"
+
#include
#include
#include
@@ -19,10 +21,10 @@ namespace virtual_display::driver {
};
inline constexpr Guid kDeviceInterfaceGuid {
- 0x5f894d6c,
- 0x3a69,
- 0x48a2,
- {0x86, 0xef, 0xe4, 0xc6, 0x71, 0x93, 0x2d, 0x63}
+ 0x7d18b61f,
+ 0xbfaf,
+ 0x43cc,
+ {0xb1, 0xb5, 0x49, 0xd2, 0x26, 0x31, 0x45, 0x95}
};
inline constexpr Guid kApiNamespaceGuid {
@@ -294,7 +296,7 @@ namespace virtual_display::driver {
std::uint32_t physical_width_mm {kDefaultPhysicalWidthMillimeters};
std::uint32_t physical_height_mm {kDefaultPhysicalHeightMillimeters};
std::uint32_t refresh_rate_millihz {60'000};
- char display_name[kDisplayNameChars] {"Sunshine Display"};
+ char display_name[kDisplayNameChars] {"LizardByte VD"}; ///< Monitor label to advertise in EDID.
};
struct PermanentDisplayCountResult {
@@ -307,9 +309,13 @@ namespace virtual_display::driver {
std::uint32_t physical_width_mm {kDefaultPhysicalWidthMillimeters};
std::uint32_t physical_height_mm {kDefaultPhysicalHeightMillimeters};
std::uint32_t refresh_rate_millihz {60'000};
- char display_name[kDisplayNameChars] {"Sunshine Display"};
+ char display_name[kDisplayNameChars] {"LizardByte VD"}; ///< Current monitor label advertised in EDID.
};
+ // Raw protocol arrays require string literal initializers. Check both against the shared default.
+ static_assert(std::string_view {PermanentDisplayCountRequest {}.display_name} == kDefaultMonitorName);
+ static_assert(std::string_view {PermanentDisplayCountResult {}.display_name} == kDefaultMonitorName);
+
struct DisplayStateEntry {
std::uint32_t kind {};
std::uint32_t flags {};
diff --git a/src/driver/include/virtual_display/driver/device_identity.h b/src/driver/include/virtual_display/driver/device_identity.h
index bbfa673..ef1a481 100644
--- a/src/driver/include/virtual_display/driver/device_identity.h
+++ b/src/driver/include/virtual_display/driver/device_identity.h
@@ -6,13 +6,13 @@
#include
// Single source of truth for the security-critical values that the Windows driver
-// package (SunshineVirtualDisplayDriver.inf) and its tests must agree on. These were
+// package (LizardByteVirtualDisplay.inf) and its tests must agree on. These were
// previously authored only as literals inside the INF and re-pinned by unit tests that
// scraped the INF/README text at runtime. Centralizing them here lets the INF be
// generated from these functions and lets the tests assert behavior instead of strings.
namespace virtual_display::driver {
// Formats a GUID as the brace string Windows uses in INF/registry entries, e.g.
- // "{5f894d6c-3a69-48a2-86ef-e4c671932d63}" (lower-case, hyphenated). Derived from a
+ // "{7d18b61f-bfaf-43cc-b1b5-49d226314595}" (lower-case, hyphenated). Derived from a
// Guid value (kDeviceInterfaceGuid) so the INF and the runtime device interface can
// never disagree.
std::string format_inf_guid(const Guid &guid);
@@ -20,12 +20,12 @@ namespace virtual_display::driver {
// Canonical name of the elevated broker Windows service. The control device's access
// grant is derived from this name, so renaming the service is the ONLY edit needed to
// keep the INF security descriptor correct -- the SID below recomputes automatically.
- inline constexpr std::string_view kBrokerServiceName = "SunshineVirtualDisplayBroker";
+ inline constexpr std::string_view kBrokerServiceName = "LizardByteVirtualDisplayBroker";
// Wide spelling of the same name for the Win32 service / event-log APIs the tools call.
// The static_assert keeps the two forms from drifting: the narrow form drives the derived
// SID, the wide form names the actual running service they must agree on.
- inline constexpr std::wstring_view kBrokerServiceNameW = L"SunshineVirtualDisplayBroker";
+ inline constexpr std::wstring_view kBrokerServiceNameW = L"LizardByteVirtualDisplayBroker";
namespace detail {
constexpr bool same_ascii(const std::string_view narrow, const std::wstring_view wide) {
@@ -49,13 +49,13 @@ namespace virtual_display::driver {
// The per-service SID that Windows assigns to a service of the given name. Service SIDs
// are "S-1-5-80-" followed by the five little-endian 32-bit words of the SHA-1 digest of
// the upper-cased, UTF-16LE service name. This reproduces Windows' own derivation, so the
- // returned SID is exactly the principal a running SunshineVirtualDisplayBroker presents.
+ // returned SID is exactly the principal a running LizardByteVirtualDisplayBroker presents.
std::string derive_service_sid(std::string_view service_name);
// SDDL security descriptor applied to BOTH the control device interface and the device
// hardware key. Grants GENERIC_ALL to LocalSystem ("SY") and the broker service only, and
// is protected (no inherited ACEs), e.g.
- // "D:P(A;;GA;;;SY)(A;;GA;;;S-1-5-80-2333729190-1599198784-3320592948-2337414441-3098439965)".
+ // "D:P(A;;GA;;;SY)(A;;GA;;;S-1-5-80-3783560142-4148583110-2407323759-1088457827-1263307299)".
std::string control_interface_security_descriptor();
// The control protocol version as documented prose, e.g. "3.5.0", from the
diff --git a/src/driver/include/virtual_display/driver/display_defaults.h b/src/driver/include/virtual_display/driver/display_defaults.h
new file mode 100644
index 0000000..2e3586c
--- /dev/null
+++ b/src/driver/include/virtual_display/driver/display_defaults.h
@@ -0,0 +1,12 @@
+#pragma once
+
+#include
+
+namespace virtual_display::driver {
+ /**
+ * @brief Default monitor label advertised in EDID.
+ *
+ * The name fits in the 13-byte EDID display product name field.
+ */
+ inline constexpr std::string_view kDefaultMonitorName {"LizardByte VD"};
+} // namespace virtual_display::driver
diff --git a/src/driver/include/virtual_display/driver/display_identity.h b/src/driver/include/virtual_display/driver/display_identity.h
index 89afd6a..e989b8c 100644
--- a/src/driver/include/virtual_display/driver/display_identity.h
+++ b/src/driver/include/virtual_display/driver/display_identity.h
@@ -6,7 +6,7 @@
#include
namespace virtual_display::driver {
- inline constexpr std::array kSunshineDriverManufacturerId {'S', 'D', 'D'};
+ inline constexpr std::array kVirtualDisplayManufacturerId {'S', 'D', 'D'};
inline constexpr std::uint64_t kPermanentDisplayIdBase = 0x7000000000000000ull;
inline constexpr std::uint16_t kPermanentDisplayProductCodeBase = 0x4000;
inline constexpr std::uint16_t kTemporaryDisplayProductCodeBase = 0x5000;
diff --git a/src/driver/include/virtual_display/driver/edid.h b/src/driver/include/virtual_display/driver/edid.h
index 920a232..71aaff4 100644
--- a/src/driver/include/virtual_display/driver/edid.h
+++ b/src/driver/include/virtual_display/driver/edid.h
@@ -1,5 +1,7 @@
#pragma once
+#include "virtual_display/driver/display_defaults.h"
+
#include
#include
#include
@@ -22,7 +24,7 @@ namespace virtual_display::driver {
std::uint32_t physical_height_mm {340};
std::uint32_t refresh_rate_millihz {60'000};
std::uint32_t hdr_max_luminance_nits {1000};
- std::string_view monitor_name {"Sunshine Display"};
+ std::string_view monitor_name {kDefaultMonitorName}; ///< Monitor label advertised in the EDID name descriptor.
bool hdr_supported {true};
};
diff --git a/src/driver/include/virtual_display/driver/linux_control_client.h b/src/driver/include/virtual_display/driver/linux_control_client.h
index 0425173..f43bbe0 100644
--- a/src/driver/include/virtual_display/driver/linux_control_client.h
+++ b/src/driver/include/virtual_display/driver/linux_control_client.h
@@ -8,7 +8,7 @@
#include
namespace virtual_display::driver {
- inline constexpr std::string_view kDefaultLinuxControlSocketPath = "/run/vibeshine/vkms-control.sock";
+ inline constexpr std::string_view kDefaultLinuxControlSocketPath = "/run/virtualdisplay/vkms-control.sock";
enum class LinuxControlStatus {
Success,
diff --git a/src/driver/lease_store.cpp b/src/driver/lease_store.cpp
index e123ffe..4a5f182 100644
--- a/src/driver/lease_store.cpp
+++ b/src/driver/lease_store.cpp
@@ -45,8 +45,8 @@ namespace virtual_display::driver {
profile.display_id = permanent_display_id(index);
profile.container_id = container_guid_from_display_id(profile.display_id);
std::copy(
- std::begin(kSunshineDriverManufacturerId),
- std::end(kSunshineDriverManufacturerId),
+ std::begin(kVirtualDisplayManufacturerId),
+ std::end(kVirtualDisplayManufacturerId),
std::begin(profile.manufacturer_id)
);
profile.product_code = permanent_product_code(index);
diff --git a/src/driver/vulkan_layer/VkLayer_sunshine_hdr.json b/src/driver/vulkan_layer/VkLayer_lizardbyte_hdr.json
similarity index 70%
rename from src/driver/vulkan_layer/VkLayer_sunshine_hdr.json
rename to src/driver/vulkan_layer/VkLayer_lizardbyte_hdr.json
index 5178ff2..e4d3211 100644
--- a/src/driver/vulkan_layer/VkLayer_sunshine_hdr.json
+++ b/src/driver/vulkan_layer/VkLayer_lizardbyte_hdr.json
@@ -1,9 +1,9 @@
{
"file_format_version": "1.0.0",
"layer": {
- "name": "VK_LAYER_SUNSHINE_virtual_hdr",
+ "name": "VK_LAYER_LIZARDBYTE_virtual_hdr",
"type": "GLOBAL",
- "library_path": ".\\VkLayer_sunshine_hdr.dll",
+ "library_path": ".\\VkLayer_lizardbyte_hdr.dll",
"api_version": "1.3.290",
"implementation_version": "1",
"description": "Expose HDR surface formats on HDR-capable indirect (virtual) displays",
@@ -11,7 +11,7 @@
"vkGetInstanceProcAddr": "vkGetInstanceProcAddr"
},
"disable_environment": {
- "DISABLE_SUNSHINE_VIRTUAL_HDR": "1"
+ "DISABLE_LIBVIRTUALDISPLAY_HDR_LAYER": "1"
}
}
}
diff --git a/src/driver/vulkan_layer/vk_layer_sunshine_hdr.cpp b/src/driver/vulkan_layer/vk_layer_lizardbyte_hdr.cpp
similarity index 96%
rename from src/driver/vulkan_layer/vk_layer_sunshine_hdr.cpp
rename to src/driver/vulkan_layer/vk_layer_lizardbyte_hdr.cpp
index fe34502..cf00a65 100644
--- a/src/driver/vulkan_layer/vk_layer_sunshine_hdr.cpp
+++ b/src/driver/vulkan_layer/vk_layer_lizardbyte_hdr.cpp
@@ -1,4 +1,4 @@
-// VK_LAYER_SUNSHINE_virtual_hdr
+// VK_LAYER_LIZARDBYTE_virtual_hdr
//
// Implicit Vulkan layer that appends HDR surface formats
// (A2B10G10R10/HDR10_ST2084 and RGBA16F/EXTENDED_SRGB_LINEAR) to
@@ -13,12 +13,12 @@
// ICD present path honors these colorspaces on indirect displays anyway;
// verified by presenting PQ-encoded content through a forced HDR10 swapchain
// and reading back the composited FP16 scRGB desktop via Desktop Duplication
-// (1000 nit PQ white captured as 12.48 scRGB on a Sunshine virtual display,
+// (1000 nit PQ white captured as 12.48 scRGB on a LizardByte Virtual Display output,
// NVIDIA 596.49).
//
// Environment variables:
-// DISABLE_SUNSHINE_VIRTUAL_HDR=1 disable the layer (loader-level).
-// SUNSHINE_VHDR_FORCE=1 inject regardless of monitor HDR support.
+// DISABLE_LIBVIRTUALDISPLAY_HDR_LAYER=1 disable the layer (loader-level).
+// LIBVIRTUALDISPLAY_HDR_FORCE=1 inject regardless of monitor HDR support.
#include
#include
#include
@@ -144,10 +144,10 @@ namespace {
return true;
}
- bool sunshine_streaming_hdr_active() {
- HANDLE event = OpenEventW(SYNCHRONIZE, FALSE, L"Global\\SunshineVirtualHdrActive");
+ bool hdr_session_active() {
+ HANDLE event = OpenEventW(SYNCHRONIZE, FALSE, L"Global\\LizardByteVirtualHdrActive");
if (!event) {
- event = OpenEventW(SYNCHRONIZE, FALSE, L"Local\\SunshineVirtualHdrActive");
+ event = OpenEventW(SYNCHRONIZE, FALSE, L"Local\\LizardByteVirtualHdrActive");
}
if (!event) {
return false;
@@ -165,7 +165,7 @@ namespace {
}
// Read the live Win32 environment, including host changes made through SetEnvironmentVariable.
char force[8] {};
- if (GetEnvironmentVariableA("SUNSHINE_VHDR_FORCE", force, sizeof(force)) > 0 && force[0] == '1') {
+ if (GetEnvironmentVariableA("LIBVIRTUALDISPLAY_HDR_FORCE", force, sizeof(force)) > 0 && force[0] == '1') {
return true;
}
HMONITOR monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
@@ -245,7 +245,7 @@ namespace {
}
bool should_inject(VkSurfaceKHR surface) {
- if (!sunshine_streaming_hdr_active()) {
+ if (!hdr_session_active()) {
return false;
}
diff --git a/src/driver/windows_driver/CMakeLists.txt b/src/driver/windows_driver/CMakeLists.txt
index 76efd35..9f13bee 100644
--- a/src/driver/windows_driver/CMakeLists.txt
+++ b/src/driver/windows_driver/CMakeLists.txt
@@ -1,47 +1,47 @@
if(NOT WIN32 OR NOT MSVC)
- message(FATAL_ERROR "BUILD_SUNSHINE_VIRTUAL_DISPLAY_DRIVER requires a Windows MSVC/WDK build environment")
+ message(FATAL_ERROR "BUILD_VIRTUALDISPLAY_WINDOWS_DRIVER requires a Windows MSVC/WDK build environment")
endif()
-set(SUNSHINE_DRIVER_TARGET SunshineVirtualDisplayDriver)
-set(SUNSHINE_DRIVER_WDF_VERSION "2.25" CACHE STRING "UMDF version for the Sunshine virtual display driver" FORCE)
-set(SUNSHINE_DRIVER_IDDCX_VERSION "1.10" CACHE STRING
- "IddCx include/library version for the Sunshine virtual display driver" FORCE)
-set(SUNSHINE_DRIVER_PLATFORM "${CMAKE_VS_PLATFORM_NAME}")
-if(SUNSHINE_DRIVER_INF_GENERATED)
- set(SUNSHINE_DRIVER_INF "${SUNSHINE_DRIVER_INF_GENERATED}")
+set(VDD_DRIVER_TARGET LizardByteVirtualDisplay)
+set(VDD_DRIVER_WDF_VERSION "2.25" CACHE STRING "UMDF version for the Windows virtual display driver" FORCE)
+set(VDD_DRIVER_IDDCX_VERSION "1.10" CACHE STRING
+ "IddCx include/library version for the Windows virtual display driver" FORCE)
+set(VDD_DRIVER_PLATFORM "${CMAKE_VS_PLATFORM_NAME}")
+if(VDD_DRIVER_INF_GENERATED)
+ set(VDD_DRIVER_INF "${VDD_DRIVER_INF_GENERATED}")
else()
- set(SUNSHINE_DRIVER_INF "${CMAKE_CURRENT_SOURCE_DIR}/SunshineVirtualDisplayDriver.inf")
+ set(VDD_DRIVER_INF "${CMAKE_CURRENT_SOURCE_DIR}/LizardByteVirtualDisplay.inf")
endif()
-if(NOT SUNSHINE_DRIVER_PLATFORM)
+if(NOT VDD_DRIVER_PLATFORM)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(SUNSHINE_DRIVER_PLATFORM "x64")
+ set(VDD_DRIVER_PLATFORM "x64")
else()
- set(SUNSHINE_DRIVER_PLATFORM "x86")
+ set(VDD_DRIVER_PLATFORM "x86")
endif()
endif()
-if(SUNSHINE_DRIVER_PLATFORM MATCHES "^[Xx]64$|^[Aa][Mm][Dd]64$")
- set(SUNSHINE_DRIVER_WDK_ARCH "x64")
- set(SUNSHINE_DRIVER_INF2CAT_OS "10_X64")
+if(VDD_DRIVER_PLATFORM MATCHES "^[Xx]64$|^[Aa][Mm][Dd]64$")
+ set(VDD_DRIVER_WDK_ARCH "x64")
+ set(VDD_DRIVER_INF2CAT_OS "10_X64")
else()
- message(FATAL_ERROR "Sunshine virtual display driver packaging currently supports only x64/amd64; "
- "got ${SUNSHINE_DRIVER_PLATFORM}")
+ message(FATAL_ERROR "Windows virtual display driver packaging currently supports only x64/amd64; "
+ "got ${VDD_DRIVER_PLATFORM}")
endif()
-set(_sunshine_driver_default_wdk_root "C:/Program Files (x86)/Windows Kits/10")
+set(_vdd_driver_default_wdk_root "C:/Program Files (x86)/Windows Kits/10")
# Set result when the SDK under root contains the requested WDF and IddCx files for version.
-function(_sunshine_driver_sdk_is_usable result root version)
+function(_vdd_driver_sdk_is_usable result root version)
set(usable FALSE)
if(root AND version)
string(REGEX REPLACE "\\\\$" "" sdk_root "${root}")
string(REGEX REPLACE "\\\\$" "" sdk_version "${version}")
- set(wdf_lib "${sdk_root}/Lib/wdf/umdf/${SUNSHINE_DRIVER_WDK_ARCH}/${SUNSHINE_DRIVER_WDF_VERSION}")
- set(iddcx_lib "${sdk_root}/Lib/${sdk_version}/um/${SUNSHINE_DRIVER_WDK_ARCH}/iddcx")
- if(EXISTS "${sdk_root}/Include/wdf/umdf/${SUNSHINE_DRIVER_WDF_VERSION}" AND
+ set(wdf_lib "${sdk_root}/Lib/wdf/umdf/${VDD_DRIVER_WDK_ARCH}/${VDD_DRIVER_WDF_VERSION}")
+ set(iddcx_lib "${sdk_root}/Lib/${sdk_version}/um/${VDD_DRIVER_WDK_ARCH}/iddcx")
+ if(EXISTS "${sdk_root}/Include/wdf/umdf/${VDD_DRIVER_WDF_VERSION}" AND
EXISTS "${wdf_lib}/WdfDriverStubUm.lib" AND
- EXISTS "${iddcx_lib}/${SUNSHINE_DRIVER_IDDCX_VERSION}/IddCxStub.lib")
+ EXISTS "${iddcx_lib}/${VDD_DRIVER_IDDCX_VERSION}/IddCxStub.lib")
set(usable TRUE)
endif()
endif()
@@ -49,7 +49,7 @@ function(_sunshine_driver_sdk_is_usable result root version)
endfunction()
# Set result to the newest usable SDK version under root, or an empty string.
-function(_sunshine_driver_find_sdk_version result root)
+function(_vdd_driver_find_sdk_version result root)
set(resolved_version "")
if(root AND EXISTS "${root}/Lib")
file(GLOB sdk_dirs LIST_DIRECTORIES true "${root}/Lib/[0-9]*")
@@ -62,7 +62,7 @@ function(_sunshine_driver_find_sdk_version result root)
endforeach()
list(SORT sdk_versions COMPARE NATURAL ORDER DESCENDING)
foreach(sdk_version IN LISTS sdk_versions)
- _sunshine_driver_sdk_is_usable(usable "${root}" "${sdk_version}")
+ _vdd_driver_sdk_is_usable(usable "${root}" "${sdk_version}")
if(usable)
set(resolved_version "${sdk_version}")
break()
@@ -72,96 +72,96 @@ function(_sunshine_driver_find_sdk_version result root)
set(${result} "${resolved_version}" PARENT_SCOPE)
endfunction()
-set(_sunshine_driver_candidate_roots)
-if(SUNSHINE_DRIVER_WDK_ROOT)
- list(APPEND _sunshine_driver_candidate_roots "${SUNSHINE_DRIVER_WDK_ROOT}")
+set(_vdd_driver_candidate_roots)
+if(VDD_DRIVER_WDK_ROOT)
+ list(APPEND _vdd_driver_candidate_roots "${VDD_DRIVER_WDK_ROOT}")
endif()
if("$ENV{WindowsSdkDir}")
- list(APPEND _sunshine_driver_candidate_roots "$ENV{WindowsSdkDir}")
+ list(APPEND _vdd_driver_candidate_roots "$ENV{WindowsSdkDir}")
endif()
-list(APPEND _sunshine_driver_candidate_roots "${_sunshine_driver_default_wdk_root}")
-list(REMOVE_DUPLICATES _sunshine_driver_candidate_roots)
+list(APPEND _vdd_driver_candidate_roots "${_vdd_driver_default_wdk_root}")
+list(REMOVE_DUPLICATES _vdd_driver_candidate_roots)
-set(_sunshine_driver_preferred_sdk_version "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
-if(NOT _sunshine_driver_preferred_sdk_version)
- set(_sunshine_driver_preferred_sdk_version "$ENV{WindowsSDKVersion}")
+set(_vdd_driver_preferred_sdk_version "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
+if(NOT _vdd_driver_preferred_sdk_version)
+ set(_vdd_driver_preferred_sdk_version "$ENV{WindowsSDKVersion}")
endif()
-string(REGEX REPLACE "\\\\$" "" _sunshine_driver_preferred_sdk_version "${_sunshine_driver_preferred_sdk_version}")
+string(REGEX REPLACE "\\\\$" "" _vdd_driver_preferred_sdk_version "${_vdd_driver_preferred_sdk_version}")
-set(SUNSHINE_DRIVER_SDK_VERSION "")
-foreach(sunshine_driver_candidate_root IN LISTS _sunshine_driver_candidate_roots)
- cmake_path(ABSOLUTE_PATH sunshine_driver_candidate_root NORMALIZE OUTPUT_VARIABLE sunshine_driver_candidate_root)
- if(_sunshine_driver_preferred_sdk_version)
- _sunshine_driver_sdk_is_usable(_sunshine_driver_preferred_usable
- "${sunshine_driver_candidate_root}" "${_sunshine_driver_preferred_sdk_version}")
- if(_sunshine_driver_preferred_usable)
- set(SUNSHINE_DRIVER_WDK_ROOT "${sunshine_driver_candidate_root}" CACHE PATH
- "Windows Kits root used for the Sunshine virtual display driver" FORCE)
- set(SUNSHINE_DRIVER_SDK_VERSION "${_sunshine_driver_preferred_sdk_version}")
+set(VDD_DRIVER_SDK_VERSION "")
+foreach(vdd_driver_candidate_root IN LISTS _vdd_driver_candidate_roots)
+ cmake_path(ABSOLUTE_PATH vdd_driver_candidate_root NORMALIZE OUTPUT_VARIABLE vdd_driver_candidate_root)
+ if(_vdd_driver_preferred_sdk_version)
+ _vdd_driver_sdk_is_usable(_vdd_driver_preferred_usable
+ "${vdd_driver_candidate_root}" "${_vdd_driver_preferred_sdk_version}")
+ if(_vdd_driver_preferred_usable)
+ set(VDD_DRIVER_WDK_ROOT "${vdd_driver_candidate_root}" CACHE PATH
+ "Windows Kits root used for the Windows virtual display driver" FORCE)
+ set(VDD_DRIVER_SDK_VERSION "${_vdd_driver_preferred_sdk_version}")
break()
endif()
endif()
- _sunshine_driver_find_sdk_version(_sunshine_driver_resolved_sdk_version "${sunshine_driver_candidate_root}")
- if(_sunshine_driver_resolved_sdk_version)
- set(SUNSHINE_DRIVER_WDK_ROOT "${sunshine_driver_candidate_root}" CACHE PATH
- "Windows Kits root used for the Sunshine virtual display driver" FORCE)
- set(SUNSHINE_DRIVER_SDK_VERSION "${_sunshine_driver_resolved_sdk_version}")
+ _vdd_driver_find_sdk_version(_vdd_driver_resolved_sdk_version "${vdd_driver_candidate_root}")
+ if(_vdd_driver_resolved_sdk_version)
+ set(VDD_DRIVER_WDK_ROOT "${vdd_driver_candidate_root}" CACHE PATH
+ "Windows Kits root used for the Windows virtual display driver" FORCE)
+ set(VDD_DRIVER_SDK_VERSION "${_vdd_driver_resolved_sdk_version}")
break()
endif()
endforeach()
-if(NOT SUNSHINE_DRIVER_SDK_VERSION)
+if(NOT VDD_DRIVER_SDK_VERSION)
message(FATAL_ERROR "Unable to find a WDK/SDK version with required WDF and IddCx files "
- "for ${SUNSHINE_DRIVER_TARGET}")
+ "for ${VDD_DRIVER_TARGET}")
endif()
-if(NOT SUNSHINE_DRIVER_WDK_ROOT)
- message(FATAL_ERROR "SUNSHINE_DRIVER_WDK_ROOT is required to build ${SUNSHINE_DRIVER_TARGET}")
+if(NOT VDD_DRIVER_WDK_ROOT)
+ message(FATAL_ERROR "VDD_DRIVER_WDK_ROOT is required to build ${VDD_DRIVER_TARGET}")
endif()
-cmake_path(ABSOLUTE_PATH SUNSHINE_DRIVER_WDK_ROOT NORMALIZE OUTPUT_VARIABLE SUNSHINE_DRIVER_WDK_ROOT)
-set(_sunshine_driver_sdk_lib "${SUNSHINE_DRIVER_WDK_ROOT}/Lib/${SUNSHINE_DRIVER_SDK_VERSION}")
-set(_sunshine_driver_arch_lib "${_sunshine_driver_sdk_lib}/um/${SUNSHINE_DRIVER_WDK_ARCH}")
-set(_sunshine_driver_wdf_lib "${SUNSHINE_DRIVER_WDK_ROOT}/Lib/wdf/umdf/${SUNSHINE_DRIVER_WDK_ARCH}")
-set(_sunshine_driver_iddcx_lib "${_sunshine_driver_arch_lib}/iddcx/${SUNSHINE_DRIVER_IDDCX_VERSION}/IddCxStub.lib")
-if(NOT EXISTS "${_sunshine_driver_iddcx_lib}")
- message(FATAL_ERROR "Unable to find IddCxStub.lib under SUNSHINE_DRIVER_WDK_ROOT=${SUNSHINE_DRIVER_WDK_ROOT}")
+cmake_path(ABSOLUTE_PATH VDD_DRIVER_WDK_ROOT NORMALIZE OUTPUT_VARIABLE VDD_DRIVER_WDK_ROOT)
+set(_vdd_driver_sdk_lib "${VDD_DRIVER_WDK_ROOT}/Lib/${VDD_DRIVER_SDK_VERSION}")
+set(_vdd_driver_arch_lib "${_vdd_driver_sdk_lib}/um/${VDD_DRIVER_WDK_ARCH}")
+set(_vdd_driver_wdf_lib "${VDD_DRIVER_WDK_ROOT}/Lib/wdf/umdf/${VDD_DRIVER_WDK_ARCH}")
+set(_vdd_driver_iddcx_lib "${_vdd_driver_arch_lib}/iddcx/${VDD_DRIVER_IDDCX_VERSION}/IddCxStub.lib")
+if(NOT EXISTS "${_vdd_driver_iddcx_lib}")
+ message(FATAL_ERROR "Unable to find IddCxStub.lib under VDD_DRIVER_WDK_ROOT=${VDD_DRIVER_WDK_ROOT}")
endif()
-unset(_sunshine_driver_default_wdk_root)
-unset(_sunshine_driver_candidate_roots)
-unset(_sunshine_driver_preferred_sdk_version)
-unset(_sunshine_driver_preferred_usable)
-unset(_sunshine_driver_resolved_sdk_version)
-unset(sunshine_driver_candidate_root)
+unset(_vdd_driver_default_wdk_root)
+unset(_vdd_driver_candidate_roots)
+unset(_vdd_driver_preferred_sdk_version)
+unset(_vdd_driver_preferred_usable)
+unset(_vdd_driver_resolved_sdk_version)
+unset(vdd_driver_candidate_root)
-add_library(${SUNSHINE_DRIVER_TARGET} SHARED
+add_library(${VDD_DRIVER_TARGET} SHARED
driver_main.cpp
- "${SUNSHINE_DRIVER_INF}")
+ "${VDD_DRIVER_INF}")
if(TARGET gen_driver_package_inf)
- add_dependencies(${SUNSHINE_DRIVER_TARGET} gen_driver_package_inf)
+ add_dependencies(${VDD_DRIVER_TARGET} gen_driver_package_inf)
endif()
-find_program(SUNSHINE_DRIVER_TRACEWPP
+find_program(VDD_DRIVER_TRACEWPP
NAMES TraceWPP.exe tracewpp.exe
PATHS
- "${SUNSHINE_DRIVER_WDK_ROOT}/bin/${SUNSHINE_DRIVER_SDK_VERSION}/x64"
- "${SUNSHINE_DRIVER_WDK_ROOT}/bin/${SUNSHINE_DRIVER_SDK_VERSION}/x86"
+ "${VDD_DRIVER_WDK_ROOT}/bin/${VDD_DRIVER_SDK_VERSION}/x64"
+ "${VDD_DRIVER_WDK_ROOT}/bin/${VDD_DRIVER_SDK_VERSION}/x86"
NO_DEFAULT_PATH)
-if(NOT SUNSHINE_DRIVER_TRACEWPP)
- message(FATAL_ERROR "TraceWPP.exe is required to build ${SUNSHINE_DRIVER_TARGET} WPP/IFR tracing")
+if(NOT VDD_DRIVER_TRACEWPP)
+ message(FATAL_ERROR "TraceWPP.exe is required to build ${VDD_DRIVER_TARGET} WPP/IFR tracing")
endif()
-set(SUNSHINE_DRIVER_WPP_TMH "${CMAKE_CURRENT_BINARY_DIR}/driver_main.tmh")
-set(SUNSHINE_DRIVER_WPP_CONFIG "${SUNSHINE_DRIVER_WDK_ROOT}/bin/${SUNSHINE_DRIVER_SDK_VERSION}/WppConfig/Rev1")
-add_custom_command(OUTPUT "${SUNSHINE_DRIVER_WPP_TMH}"
- COMMAND "${SUNSHINE_DRIVER_TRACEWPP}"
+set(VDD_DRIVER_WPP_TMH "${CMAKE_CURRENT_BINARY_DIR}/driver_main.tmh")
+set(VDD_DRIVER_WPP_CONFIG "${VDD_DRIVER_WDK_ROOT}/bin/${VDD_DRIVER_SDK_VERSION}/WppConfig/Rev1")
+add_custom_command(OUTPUT "${VDD_DRIVER_WPP_TMH}"
+ COMMAND "${VDD_DRIVER_TRACEWPP}"
-um
-dll
-DWPP_MACRO_USE_KM_VERSION_FOR_UM=1
-DENABLE_WPP_RECORDER=1
- "-I${SUNSHINE_DRIVER_WPP_CONFIG}"
+ "-I${VDD_DRIVER_WPP_CONFIG}"
"-func:TraceEvents(LEVEL,FLAGS,MSG,...)"
"-oDir:${CMAKE_CURRENT_BINARY_DIR}"
driver_main.cpp
@@ -169,12 +169,12 @@ add_custom_command(OUTPUT "${SUNSHINE_DRIVER_WPP_TMH}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Generating WPP trace definitions for the Windows driver"
VERBATIM)
-add_custom_target(${SUNSHINE_DRIVER_TARGET}WppTrace
- DEPENDS "${SUNSHINE_DRIVER_WPP_TMH}"
+add_custom_target(${VDD_DRIVER_TARGET}WppTrace
+ DEPENDS "${VDD_DRIVER_WPP_TMH}"
COMMENT "Prepare the driver trace header")
-add_dependencies(${SUNSHINE_DRIVER_TARGET} ${SUNSHINE_DRIVER_TARGET}WppTrace)
+add_dependencies(${VDD_DRIVER_TARGET} ${VDD_DRIVER_TARGET}WppTrace)
-target_link_libraries(${SUNSHINE_DRIVER_TARGET}
+target_link_libraries(${VDD_DRIVER_TARGET}
PRIVATE
libvirtualdisplay::driver
advapi32
@@ -182,25 +182,25 @@ target_link_libraries(${SUNSHINE_DRIVER_TARGET}
d3d11
dxgi
wtsapi32
- "${_sunshine_driver_iddcx_lib}"
- "${_sunshine_driver_wdf_lib}/${SUNSHINE_DRIVER_WDF_VERSION}/WdfDriverStubUm.lib"
- "${_sunshine_driver_arch_lib}/wpprecorderum.lib"
- "${_sunshine_driver_arch_lib}/ntdll.lib")
-unset(_sunshine_driver_arch_lib)
-unset(_sunshine_driver_iddcx_lib)
-unset(_sunshine_driver_sdk_lib)
-unset(_sunshine_driver_wdf_lib)
+ "${_vdd_driver_iddcx_lib}"
+ "${_vdd_driver_wdf_lib}/${VDD_DRIVER_WDF_VERSION}/WdfDriverStubUm.lib"
+ "${_vdd_driver_arch_lib}/wpprecorderum.lib"
+ "${_vdd_driver_arch_lib}/ntdll.lib")
+unset(_vdd_driver_arch_lib)
+unset(_vdd_driver_iddcx_lib)
+unset(_vdd_driver_sdk_lib)
+unset(_vdd_driver_wdf_lib)
-target_include_directories(${SUNSHINE_DRIVER_TARGET}
+target_include_directories(${VDD_DRIVER_TARGET}
PRIVATE
"${CMAKE_CURRENT_BINARY_DIR}"
- "${SUNSHINE_DRIVER_WDK_ROOT}/Include/wdf/umdf/${SUNSHINE_DRIVER_WDF_VERSION}"
- "${SUNSHINE_DRIVER_WDK_ROOT}/Include/${SUNSHINE_DRIVER_SDK_VERSION}/um"
- "${SUNSHINE_DRIVER_WDK_ROOT}/Include/${SUNSHINE_DRIVER_SDK_VERSION}/shared"
- "${SUNSHINE_DRIVER_WDK_ROOT}/Include/${SUNSHINE_DRIVER_SDK_VERSION}/ucrt"
- "${SUNSHINE_DRIVER_WDK_ROOT}/Include/${SUNSHINE_DRIVER_SDK_VERSION}/um/iddcx/${SUNSHINE_DRIVER_IDDCX_VERSION}")
+ "${VDD_DRIVER_WDK_ROOT}/Include/wdf/umdf/${VDD_DRIVER_WDF_VERSION}"
+ "${VDD_DRIVER_WDK_ROOT}/Include/${VDD_DRIVER_SDK_VERSION}/um"
+ "${VDD_DRIVER_WDK_ROOT}/Include/${VDD_DRIVER_SDK_VERSION}/shared"
+ "${VDD_DRIVER_WDK_ROOT}/Include/${VDD_DRIVER_SDK_VERSION}/ucrt"
+ "${VDD_DRIVER_WDK_ROOT}/Include/${VDD_DRIVER_SDK_VERSION}/um/iddcx/${VDD_DRIVER_IDDCX_VERSION}")
-target_compile_definitions(${SUNSHINE_DRIVER_TARGET}
+target_compile_definitions(${VDD_DRIVER_TARGET}
PRIVATE
UNICODE
_UNICODE
@@ -216,53 +216,53 @@ target_compile_definitions(${SUNSHINE_DRIVER_TARGET}
WPP_MACRO_USE_KM_VERSION_FOR_UM=1
ENABLE_WPP_RECORDER=1)
-set_target_properties(${SUNSHINE_DRIVER_TARGET}
+set_target_properties(${VDD_DRIVER_TARGET}
PROPERTIES
PREFIX ""
- OUTPUT_NAME "SunshineVirtualDisplayDriver"
+ OUTPUT_NAME "LizardByteVirtualDisplay"
SUFFIX ".dll")
# Keep the package inputs as real build outputs. A POST_BUILD-only copy does not
# run when only the INF changes, which can leave pnputil installing a stale driver package.
-set(SUNSHINE_DRIVER_PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/$/driver-package")
-set(SUNSHINE_DRIVER_PACKAGED_INF "${SUNSHINE_DRIVER_PACKAGE_DIR}/SunshineVirtualDisplayDriver.inf")
-set(SUNSHINE_DRIVER_PACKAGED_DLL "${SUNSHINE_DRIVER_PACKAGE_DIR}/SunshineVirtualDisplayDriver.dll")
-add_custom_command(OUTPUT "${SUNSHINE_DRIVER_PACKAGED_INF}" "${SUNSHINE_DRIVER_PACKAGED_DLL}"
- COMMAND ${CMAKE_COMMAND} -E make_directory "${SUNSHINE_DRIVER_PACKAGE_DIR}"
+set(VDD_DRIVER_PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/$/driver-package")
+set(VDD_DRIVER_PACKAGED_INF "${VDD_DRIVER_PACKAGE_DIR}/LizardByteVirtualDisplay.inf")
+set(VDD_DRIVER_PACKAGED_DLL "${VDD_DRIVER_PACKAGE_DIR}/LizardByteVirtualDisplay.dll")
+add_custom_command(OUTPUT "${VDD_DRIVER_PACKAGED_INF}" "${VDD_DRIVER_PACKAGED_DLL}"
+ COMMAND ${CMAKE_COMMAND} -E make_directory "${VDD_DRIVER_PACKAGE_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${SUNSHINE_DRIVER_INF}"
- "${SUNSHINE_DRIVER_PACKAGED_INF}"
+ "${VDD_DRIVER_INF}"
+ "${VDD_DRIVER_PACKAGED_INF}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "$"
- "${SUNSHINE_DRIVER_PACKAGED_DLL}"
- DEPENDS ${SUNSHINE_DRIVER_TARGET} "${SUNSHINE_DRIVER_INF}"
+ "$"
+ "${VDD_DRIVER_PACKAGED_DLL}"
+ DEPENDS ${VDD_DRIVER_TARGET} "${VDD_DRIVER_INF}"
COMMENT "Copying the INF and DLL into the driver package"
VERBATIM)
-find_program(SUNSHINE_DRIVER_INF2CAT
+find_program(VDD_DRIVER_INF2CAT
NAMES Inf2Cat.exe
PATHS
- "${SUNSHINE_DRIVER_WDK_ROOT}/bin/${SUNSHINE_DRIVER_SDK_VERSION}/x86"
- "${SUNSHINE_DRIVER_WDK_ROOT}/bin/${SUNSHINE_DRIVER_SDK_VERSION}/x64"
+ "${VDD_DRIVER_WDK_ROOT}/bin/${VDD_DRIVER_SDK_VERSION}/x86"
+ "${VDD_DRIVER_WDK_ROOT}/bin/${VDD_DRIVER_SDK_VERSION}/x64"
NO_DEFAULT_PATH)
-if(NOT SUNSHINE_DRIVER_INF2CAT)
- message(FATAL_ERROR "Inf2Cat.exe is required to package ${SUNSHINE_DRIVER_TARGET}")
+if(NOT VDD_DRIVER_INF2CAT)
+ message(FATAL_ERROR "Inf2Cat.exe is required to package ${VDD_DRIVER_TARGET}")
endif()
-set(SUNSHINE_DRIVER_PACKAGED_CAT "${SUNSHINE_DRIVER_PACKAGE_DIR}/sunshinevirtualdisplaydriver.cat")
-add_custom_command(OUTPUT "${SUNSHINE_DRIVER_PACKAGED_CAT}"
- COMMAND "${SUNSHINE_DRIVER_INF2CAT}" "/driver:${SUNSHINE_DRIVER_PACKAGE_DIR}" /os:${SUNSHINE_DRIVER_INF2CAT_OS}
- DEPENDS "${SUNSHINE_DRIVER_PACKAGED_INF}" "${SUNSHINE_DRIVER_PACKAGED_DLL}"
+set(VDD_DRIVER_PACKAGED_CAT "${VDD_DRIVER_PACKAGE_DIR}/lizardbytevirtualdisplay.cat")
+add_custom_command(OUTPUT "${VDD_DRIVER_PACKAGED_CAT}"
+ COMMAND "${VDD_DRIVER_INF2CAT}" "/driver:${VDD_DRIVER_PACKAGE_DIR}" /os:${VDD_DRIVER_INF2CAT_OS}
+ DEPENDS "${VDD_DRIVER_PACKAGED_INF}" "${VDD_DRIVER_PACKAGED_DLL}"
COMMENT "Generating the Windows driver catalog"
VERBATIM)
-add_custom_target(${SUNSHINE_DRIVER_TARGET}PackageFiles ALL
- DEPENDS "${SUNSHINE_DRIVER_PACKAGED_CAT}"
+add_custom_target(${VDD_DRIVER_TARGET}PackageFiles ALL
+ DEPENDS "${VDD_DRIVER_PACKAGED_CAT}"
COMMENT "Build the Windows driver package files")
-install(TARGETS ${SUNSHINE_DRIVER_TARGET} RUNTIME DESTINATION driver)
-install(FILES "$" DESTINATION driver
+install(TARGETS ${VDD_DRIVER_TARGET} RUNTIME DESTINATION driver)
+install(FILES "$" DESTINATION driver
CONFIGURATIONS Debug RelWithDebInfo OPTIONAL)
-install(FILES "${SUNSHINE_DRIVER_PACKAGED_INF}" DESTINATION driver)
-install(FILES "${SUNSHINE_DRIVER_PACKAGED_CAT}" DESTINATION driver RENAME SunshineVirtualDisplayDriver.cat)
-install(FILES "${SUNSHINE_DRIVER_PACKAGE_DIR}/SunshineVirtualDisplayDriver.cer" DESTINATION driver OPTIONAL)
+install(FILES "${VDD_DRIVER_PACKAGED_INF}" DESTINATION driver)
+install(FILES "${VDD_DRIVER_PACKAGED_CAT}" DESTINATION driver RENAME LizardByteVirtualDisplay.cat)
+install(FILES "${VDD_DRIVER_PACKAGE_DIR}/LizardByteVirtualDisplay.cer" DESTINATION driver OPTIONAL)
diff --git a/src/driver/windows_driver/SunshineVirtualDisplayDriver.inf b/src/driver/windows_driver/LizardByteVirtualDisplay.inf
similarity index 56%
rename from src/driver/windows_driver/SunshineVirtualDisplayDriver.inf
rename to src/driver/windows_driver/LizardByteVirtualDisplay.inf
index 7558ea2..aaa5bf6 100644
--- a/src/driver/windows_driver/SunshineVirtualDisplayDriver.inf
+++ b/src/driver/windows_driver/LizardByteVirtualDisplay.inf
@@ -1,5 +1,5 @@
-; SunshineVirtualDisplayDriver.inf
-; Clean-room UMDF/IddCx virtual display driver for Sunshine.
+; LizardByteVirtualDisplay.inf
+; UMDF/IddCx driver for LizardByte Virtual Display.
[Version]
Signature="$WINDOWS NT$"
@@ -9,7 +9,7 @@ ClassGuid={4d36e968-e325-11ce-bfc1-08002be10318}
; publishes arrived monitors into the desktop display topology.
ClassVer=2.0
Provider=%ManufacturerName%
-CatalogFile=SunshineVirtualDisplayDriver.cat
+CatalogFile=LizardByteVirtualDisplay.cat
DriverVer=06/06/2026,1.3.0.0
PnpLockdown=1
@@ -17,13 +17,13 @@ PnpLockdown=1
%ManufacturerName%=Standard,NTamd64
[Standard.NTamd64]
-%DeviceName%=Device_Install, Root\SunshineVirtualDisplay
+%DeviceName%=Device_Install, Root\LizardByteVirtualDisplay
[SourceDisksNames]
1=%DiskName%,,,""
[SourceDisksFiles]
-SunshineVirtualDisplayDriver.dll=1
+LizardByteVirtualDisplay.dll=1
[DestinationDirs]
UMDriverCopy=12,UMDF
@@ -36,18 +36,18 @@ AddReg=Device_Install_Hw_AddReg
[Device_Install_Hw_AddReg]
HKR,,"UpperFilters",0x00010000,"IndirectKmd"
-HKR,"WUDF","DeviceGroupId",0x00000000,"SunshineVirtualDisplayGroup"
-HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;S-1-5-80-2333729190-1599198784-3320592948-2337414441-3098439965)"
+HKR,"WUDF","DeviceGroupId",0x00000000,"LizardByteVirtualDisplayGroup"
+HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;S-1-5-80-3783560142-4148583110-2407323759-1088457827-1263307299)"
HKR,,"ConfigVersion",0x00010001,1
[Device_Install.NT.Interfaces]
-AddInterface={5f894d6c-3a69-48a2-86ef-e4c671932d63},,ControlInterface
+AddInterface={7d18b61f-bfaf-43cc-b1b5-49d226314595},,ControlInterface
[ControlInterface]
AddReg=ControlInterface_AddReg
[ControlInterface_AddReg]
-HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;S-1-5-80-2333729190-1599198784-3320592948-2337414441-3098439965)"
+HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;S-1-5-80-3783560142-4148583110-2407323759-1088457827-1263307299)"
[Device_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall
@@ -60,20 +60,20 @@ ErrorControl=1
ServiceBinary=%12%\WUDFRd.sys
[Device_Install.NT.Wdf]
-UmdfService=SunshineVirtualDisplayDriver,SunshineVirtualDisplayDriver_Install
-UmdfServiceOrder=SunshineVirtualDisplayDriver
+UmdfService=LizardByteVirtualDisplay,LizardByteVirtualDisplay_Install
+UmdfServiceOrder=LizardByteVirtualDisplay
UmdfKernelModeClientPolicy=AllowKernelModeClients
-[SunshineVirtualDisplayDriver_Install]
+[LizardByteVirtualDisplay_Install]
UmdfLibraryVersion=2.25.0
-ServiceBinary=%12%\UMDF\SunshineVirtualDisplayDriver.dll
+ServiceBinary=%12%\UMDF\LizardByteVirtualDisplay.dll
UmdfExtensions=IddCx0102
[UMDriverCopy]
-SunshineVirtualDisplayDriver.dll
+LizardByteVirtualDisplay.dll
[Strings]
-ManufacturerName="Sunshine"
-DeviceName="Sunshine Virtual Display Driver"
-DiskName="Sunshine Virtual Display Driver Installation Disk"
+ManufacturerName="LizardByte"
+DeviceName="LizardByte Virtual Display"
+DiskName="LizardByte Virtual Display Installation Media"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
diff --git a/src/driver/windows_driver/SunshineVirtualDisplayDriver.inf.in b/src/driver/windows_driver/LizardByteVirtualDisplay.inf.in
similarity index 67%
rename from src/driver/windows_driver/SunshineVirtualDisplayDriver.inf.in
rename to src/driver/windows_driver/LizardByteVirtualDisplay.inf.in
index df74c49..15517cc 100644
--- a/src/driver/windows_driver/SunshineVirtualDisplayDriver.inf.in
+++ b/src/driver/windows_driver/LizardByteVirtualDisplay.inf.in
@@ -1,5 +1,5 @@
-; SunshineVirtualDisplayDriver.inf
-; Clean-room UMDF/IddCx virtual display driver for Sunshine.
+; LizardByteVirtualDisplay.inf
+; UMDF/IddCx driver for LizardByte Virtual Display.
[Version]
Signature="$WINDOWS NT$"
@@ -9,7 +9,7 @@ ClassGuid={4d36e968-e325-11ce-bfc1-08002be10318}
; publishes arrived monitors into the desktop display topology.
ClassVer=2.0
Provider=%ManufacturerName%
-CatalogFile=SunshineVirtualDisplayDriver.cat
+CatalogFile=LizardByteVirtualDisplay.cat
DriverVer=@VDD_DRIVER_VER_DATE@,@VDD_DRIVER_VER_VERSION@
PnpLockdown=1
@@ -17,13 +17,13 @@ PnpLockdown=1
%ManufacturerName%=Standard,NTamd64
[Standard.NTamd64]
-%DeviceName%=Device_Install, Root\SunshineVirtualDisplay
+%DeviceName%=Device_Install, Root\LizardByteVirtualDisplay
[SourceDisksNames]
1=%DiskName%,,,""
[SourceDisksFiles]
-SunshineVirtualDisplayDriver.dll=1
+LizardByteVirtualDisplay.dll=1
[DestinationDirs]
UMDriverCopy=12,UMDF
@@ -36,7 +36,7 @@ AddReg=Device_Install_Hw_AddReg
[Device_Install_Hw_AddReg]
HKR,,"UpperFilters",0x00010000,"IndirectKmd"
-HKR,"WUDF","DeviceGroupId",0x00000000,"SunshineVirtualDisplayGroup"
+HKR,"WUDF","DeviceGroupId",0x00000000,"LizardByteVirtualDisplayGroup"
HKR,,Security,,"@VDD_CONTROL_SECURITY_DESCRIPTOR@"
HKR,,"ConfigVersion",0x00010001,1
@@ -60,20 +60,20 @@ ErrorControl=1
ServiceBinary=%12%\WUDFRd.sys
[Device_Install.NT.Wdf]
-UmdfService=SunshineVirtualDisplayDriver,SunshineVirtualDisplayDriver_Install
-UmdfServiceOrder=SunshineVirtualDisplayDriver
+UmdfService=LizardByteVirtualDisplay,LizardByteVirtualDisplay_Install
+UmdfServiceOrder=LizardByteVirtualDisplay
UmdfKernelModeClientPolicy=AllowKernelModeClients
-[SunshineVirtualDisplayDriver_Install]
+[LizardByteVirtualDisplay_Install]
UmdfLibraryVersion=2.25.0
-ServiceBinary=%12%\UMDF\SunshineVirtualDisplayDriver.dll
+ServiceBinary=%12%\UMDF\LizardByteVirtualDisplay.dll
UmdfExtensions=IddCx0102
[UMDriverCopy]
-SunshineVirtualDisplayDriver.dll
+LizardByteVirtualDisplay.dll
[Strings]
-ManufacturerName="Sunshine"
-DeviceName="Sunshine Virtual Display Driver"
-DiskName="Sunshine Virtual Display Driver Installation Disk"
+ManufacturerName="LizardByte"
+DeviceName="LizardByte Virtual Display"
+DiskName="LizardByte Virtual Display Installation Media"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
diff --git a/src/driver/windows_driver/driver_main.cpp b/src/driver/windows_driver/driver_main.cpp
index deef22e..a9cc4fb 100644
--- a/src/driver/windows_driver/driver_main.cpp
+++ b/src/driver/windows_driver/driver_main.cpp
@@ -52,13 +52,13 @@ namespace vdd = virtual_display::driver;
TRACELOGGING_DEFINE_PROVIDER(
g_trace_provider,
- "Sunshine.VirtualDisplayDriver",
+ "LizardByte.VirtualDisplay",
(0x3d5d3bd9, 0x8500, 0x4523, 0x93, 0x34, 0x58, 0x3f, 0x4b, 0x5e, 0x6f, 0x80)
);
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID( \
- SunshineVirtualDisplayDriverWpp, \
+ LizardByteVirtualDisplayWpp, \
(b0dcb744, 045b, 463b, 9c2f, 6a3c897d3458), \
WPP_DEFINE_BIT(TRACE_DRIVER) \
WPP_DEFINE_BIT(TRACE_DEVICE) \
@@ -976,7 +976,7 @@ namespace {
const auto display_id = vdd::permanent_display_id(index);
vdd::EdidOptions options {};
- options.manufacturer_id = vdd::kSunshineDriverManufacturerId;
+ options.manufacturer_id = vdd::kVirtualDisplayManufacturerId;
options.product_code = vdd::permanent_product_code(index);
options.serial_number = vdd::serial_number_from_display_id(display_id);
options.width = settings.width;
@@ -1156,7 +1156,7 @@ namespace {
}
vdd::EdidOptions options {};
- options.manufacturer_id = vdd::read_manufacturer_id(descriptor.edid).value_or(vdd::kSunshineDriverManufacturerId);
+ options.manufacturer_id = vdd::read_manufacturer_id(descriptor.edid).value_or(vdd::kVirtualDisplayManufacturerId);
options.product_code = vdd::read_product_code(descriptor.edid);
options.serial_number = vdd::read_serial_number(descriptor.edid);
options.width = descriptor.width;
@@ -1165,7 +1165,9 @@ namespace {
options.physical_height_mm = descriptor.physical_height_mm;
options.refresh_rate_millihz = descriptor.refresh_rate_millihz;
const auto monitor_name = vdd::read_monitor_name(descriptor.edid);
- options.monitor_name = monitor_name.value_or("Sunshine Display");
+ if (monitor_name) {
+ options.monitor_name = *monitor_name;
+ }
options.hdr_supported = false;
auto downgraded = descriptor;
@@ -2024,7 +2026,7 @@ namespace {
// a D3D11 device on the render adapter (create_dxgi_device_for_luid ->
// D3D11CreateDevice) while that callback is in flight serializes against the OS
// display stack and deadlocks with concurrent D3D11CreateDevice calls coming from a
- // capture client on the same adapter (e.g. Sunshine's capture reinit when the
+ // capture client on the same adapter (e.g. capture reinitialization when the
// virtual display topology changes). That stalls D3D11CreateDevice in
// ZwWaitForAlertByThreadId, wedges capture reinit, and ultimately trips the host's
// session-teardown watchdog. The WDK IddCx sample likewise starts the worker and
@@ -2899,9 +2901,9 @@ namespace {
IDDCX_FEATURE_IMPLEMENTATION_SOFTWARE :
IDDCX_FEATURE_IMPLEMENTATION_NONE;
caps.EndPointDiagnostics.TransmissionType = IDDCX_TRANSMISSION_TYPE_WIRED_OTHER;
- caps.EndPointDiagnostics.pEndPointFriendlyName = const_cast(L"Sunshine Virtual Display Adapter");
- caps.EndPointDiagnostics.pEndPointManufacturerName = const_cast(L"Sunshine");
- caps.EndPointDiagnostics.pEndPointModelName = const_cast(L"SunshineVirtualDisplay");
+ caps.EndPointDiagnostics.pEndPointFriendlyName = const_cast(L"LizardByte Virtual Display");
+ caps.EndPointDiagnostics.pEndPointManufacturerName = const_cast(L"LizardByte");
+ caps.EndPointDiagnostics.pEndPointModelName = const_cast(L"LizardByteVirtualDisplay");
caps.EndPointDiagnostics.pHardwareVersion = &endpoint_version;
caps.EndPointDiagnostics.pFirmwareVersion = &endpoint_version;
@@ -3411,7 +3413,7 @@ namespace {
// Hardware cursor polling uses IddCxMonitorQueryHardwareCursor* on a worker tied to the
// raw IDDCX_MONITOR. Those calls cannot be cancelled safely during mode/topology churn, and
// a worker that outlives IddCxMonitorDeparture can use the departed monitor. Do not arm this
- // optional path; Sunshine renders/captures the cursor independently.
+ // optional path; the capture client renders and captures the cursor independently.
TraceLoggingWrite(g_trace_provider, "HardwareCursorDisabledForTopologySafety");
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_CURSOR, "HardwareCursorDisabledForTopologySafety");
return STATUS_SUCCESS;
@@ -4887,23 +4889,23 @@ namespace {
} // namespace
extern "C" DRIVER_INITIALIZE DriverEntry;
-EVT_WDF_DRIVER_UNLOAD SunshineEvtDriverUnload;
-EVT_WDF_DRIVER_DEVICE_ADD SunshineEvtDeviceAdd;
-EVT_WDF_DEVICE_D0_ENTRY SunshineEvtDeviceD0Entry;
-EVT_IDD_CX_DEVICE_IO_CONTROL SunshineEvtIddCxDeviceIoControl;
-EVT_IDD_CX_ADAPTER_INIT_FINISHED SunshineEvtAdapterInitFinished;
-EVT_IDD_CX_MONITOR_GET_DEFAULT_DESCRIPTION_MODES SunshineEvtGetDefaultDescriptionModes;
-EVT_IDD_CX_PARSE_MONITOR_DESCRIPTION SunshineEvtParseMonitorDescription;
-EVT_IDD_CX_MONITOR_QUERY_TARGET_MODES SunshineEvtQueryTargetModes;
-EVT_IDD_CX_ADAPTER_COMMIT_MODES SunshineEvtCommitModes;
-EVT_IDD_CX_PARSE_MONITOR_DESCRIPTION2 SunshineEvtParseMonitorDescription2;
-EVT_IDD_CX_ADAPTER_QUERY_TARGET_INFO SunshineEvtAdapterQueryTargetInfo;
-EVT_IDD_CX_ADAPTER_COMMIT_MODES2 SunshineEvtCommitModes2;
-EVT_IDD_CX_MONITOR_SET_DEFAULT_HDR_METADATA SunshineEvtSetDefaultHdrMetadata;
-EVT_IDD_CX_MONITOR_QUERY_TARGET_MODES2 SunshineEvtQueryTargetModes2;
-EVT_IDD_CX_MONITOR_SET_GAMMA_RAMP SunshineEvtSetGammaRamp;
-EVT_IDD_CX_MONITOR_ASSIGN_SWAPCHAIN SunshineEvtAssignSwapChain;
-EVT_IDD_CX_MONITOR_UNASSIGN_SWAPCHAIN SunshineEvtUnassignSwapChain;
+EVT_WDF_DRIVER_UNLOAD VirtualDisplayEvtDriverUnload;
+EVT_WDF_DRIVER_DEVICE_ADD VirtualDisplayEvtDeviceAdd;
+EVT_WDF_DEVICE_D0_ENTRY VirtualDisplayEvtDeviceD0Entry;
+EVT_IDD_CX_DEVICE_IO_CONTROL VirtualDisplayEvtIddCxDeviceIoControl;
+EVT_IDD_CX_ADAPTER_INIT_FINISHED VirtualDisplayEvtAdapterInitFinished;
+EVT_IDD_CX_MONITOR_GET_DEFAULT_DESCRIPTION_MODES VirtualDisplayEvtGetDefaultDescriptionModes;
+EVT_IDD_CX_PARSE_MONITOR_DESCRIPTION VirtualDisplayEvtParseMonitorDescription;
+EVT_IDD_CX_MONITOR_QUERY_TARGET_MODES VirtualDisplayEvtQueryTargetModes;
+EVT_IDD_CX_ADAPTER_COMMIT_MODES VirtualDisplayEvtCommitModes;
+EVT_IDD_CX_PARSE_MONITOR_DESCRIPTION2 VirtualDisplayEvtParseMonitorDescription2;
+EVT_IDD_CX_ADAPTER_QUERY_TARGET_INFO VirtualDisplayEvtAdapterQueryTargetInfo;
+EVT_IDD_CX_ADAPTER_COMMIT_MODES2 VirtualDisplayEvtCommitModes2;
+EVT_IDD_CX_MONITOR_SET_DEFAULT_HDR_METADATA VirtualDisplayEvtSetDefaultHdrMetadata;
+EVT_IDD_CX_MONITOR_QUERY_TARGET_MODES2 VirtualDisplayEvtQueryTargetModes2;
+EVT_IDD_CX_MONITOR_SET_GAMMA_RAMP VirtualDisplayEvtSetGammaRamp;
+EVT_IDD_CX_MONITOR_ASSIGN_SWAPCHAIN VirtualDisplayEvtAssignSwapChain;
+EVT_IDD_CX_MONITOR_UNASSIGN_SWAPCHAIN VirtualDisplayEvtUnassignSwapChain;
extern "C" NTSTATUS DriverEntry(PDRIVER_OBJECT driver_object, PUNICODE_STRING registry_path) {
WPP_INIT_TRACING(driver_object, registry_path);
@@ -4913,8 +4915,8 @@ extern "C" NTSTATUS DriverEntry(PDRIVER_OBJECT driver_object, PUNICODE_STRING re
TraceLoggingWrite(g_trace_provider, "DriverEntry");
WDF_DRIVER_CONFIG config;
- WDF_DRIVER_CONFIG_INIT(&config, SunshineEvtDeviceAdd);
- config.EvtDriverUnload = SunshineEvtDriverUnload;
+ WDF_DRIVER_CONFIG_INIT(&config, VirtualDisplayEvtDeviceAdd);
+ config.EvtDriverUnload = VirtualDisplayEvtDriverUnload;
const NTSTATUS status = WdfDriverCreate(
driver_object,
@@ -4935,42 +4937,42 @@ extern "C" NTSTATUS DriverEntry(PDRIVER_OBJECT driver_object, PUNICODE_STRING re
return status;
}
-void SunshineEvtDriverUnload(WDFDRIVER driver) {
+void VirtualDisplayEvtDriverUnload(WDFDRIVER driver) {
TraceLoggingWrite(g_trace_provider, "DriverUnload");
TraceLoggingUnregister(g_trace_provider);
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_DRIVER, "DriverUnload");
WPP_CLEANUP(WdfDriverWdmGetDriverObject(driver));
}
-NTSTATUS SunshineEvtDeviceAdd(WDFDRIVER driver, PWDFDEVICE_INIT device_init) {
+NTSTATUS VirtualDisplayEvtDeviceAdd(WDFDRIVER driver, PWDFDEVICE_INIT device_init) {
TraceLoggingWrite(g_trace_provider, "DeviceAdd");
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_DEVICE, "DeviceAdd");
WDF_PNPPOWER_EVENT_CALLBACKS pnp_callbacks;
WDF_PNPPOWER_EVENT_CALLBACKS_INIT(&pnp_callbacks);
- pnp_callbacks.EvtDeviceD0Entry = SunshineEvtDeviceD0Entry;
+ pnp_callbacks.EvtDeviceD0Entry = VirtualDisplayEvtDeviceD0Entry;
WdfDeviceInitSetPnpPowerEventCallbacks(device_init, &pnp_callbacks);
IDD_CX_CLIENT_CONFIG idd_config;
IDD_CX_CLIENT_CONFIG_INIT(&idd_config);
- idd_config.EvtIddCxDeviceIoControl = SunshineEvtIddCxDeviceIoControl;
- idd_config.EvtIddCxAdapterInitFinished = SunshineEvtAdapterInitFinished;
- idd_config.EvtIddCxMonitorGetDefaultDescriptionModes = SunshineEvtGetDefaultDescriptionModes;
- idd_config.EvtIddCxMonitorAssignSwapChain = SunshineEvtAssignSwapChain;
- idd_config.EvtIddCxMonitorUnassignSwapChain = SunshineEvtUnassignSwapChain;
+ idd_config.EvtIddCxDeviceIoControl = VirtualDisplayEvtIddCxDeviceIoControl;
+ idd_config.EvtIddCxAdapterInitFinished = VirtualDisplayEvtAdapterInitFinished;
+ idd_config.EvtIddCxMonitorGetDefaultDescriptionModes = VirtualDisplayEvtGetDefaultDescriptionModes;
+ idd_config.EvtIddCxMonitorAssignSwapChain = VirtualDisplayEvtAssignSwapChain;
+ idd_config.EvtIddCxMonitorUnassignSwapChain = VirtualDisplayEvtUnassignSwapChain;
if (IDD_IS_FIELD_AVAILABLE(IDD_CX_CLIENT_CONFIG, EvtIddCxMonitorSetGammaRamp)) {
- idd_config.EvtIddCxMonitorSetGammaRamp = SunshineEvtSetGammaRamp;
+ idd_config.EvtIddCxMonitorSetGammaRamp = VirtualDisplayEvtSetGammaRamp;
}
if (has_hdr_iddcx_ddi()) {
- idd_config.EvtIddCxParseMonitorDescription2 = SunshineEvtParseMonitorDescription2;
- idd_config.EvtIddCxAdapterQueryTargetInfo = SunshineEvtAdapterQueryTargetInfo;
- idd_config.EvtIddCxAdapterCommitModes2 = SunshineEvtCommitModes2;
- idd_config.EvtIddCxMonitorSetDefaultHdrMetaData = SunshineEvtSetDefaultHdrMetadata;
- idd_config.EvtIddCxMonitorQueryTargetModes2 = SunshineEvtQueryTargetModes2;
+ idd_config.EvtIddCxParseMonitorDescription2 = VirtualDisplayEvtParseMonitorDescription2;
+ idd_config.EvtIddCxAdapterQueryTargetInfo = VirtualDisplayEvtAdapterQueryTargetInfo;
+ idd_config.EvtIddCxAdapterCommitModes2 = VirtualDisplayEvtCommitModes2;
+ idd_config.EvtIddCxMonitorSetDefaultHdrMetaData = VirtualDisplayEvtSetDefaultHdrMetadata;
+ idd_config.EvtIddCxMonitorQueryTargetModes2 = VirtualDisplayEvtQueryTargetModes2;
} else {
- idd_config.EvtIddCxParseMonitorDescription = SunshineEvtParseMonitorDescription;
- idd_config.EvtIddCxMonitorQueryTargetModes = SunshineEvtQueryTargetModes;
- idd_config.EvtIddCxAdapterCommitModes = SunshineEvtCommitModes;
+ idd_config.EvtIddCxParseMonitorDescription = VirtualDisplayEvtParseMonitorDescription;
+ idd_config.EvtIddCxMonitorQueryTargetModes = VirtualDisplayEvtQueryTargetModes;
+ idd_config.EvtIddCxAdapterCommitModes = VirtualDisplayEvtCommitModes;
}
NTSTATUS status = IddCxDeviceInitConfig(device_init, &idd_config);
@@ -5020,7 +5022,7 @@ NTSTATUS SunshineEvtDeviceAdd(WDFDRIVER driver, PWDFDEVICE_INIT device_init) {
return STATUS_SUCCESS;
}
-NTSTATUS SunshineEvtDeviceD0Entry(WDFDEVICE device, WDF_POWER_DEVICE_STATE) {
+NTSTATUS VirtualDisplayEvtDeviceD0Entry(WDFDEVICE device, WDF_POWER_DEVICE_STATE) {
auto *context = GetDeviceContext(device);
if (!context || !context->state) {
return STATUS_DEVICE_NOT_READY;
@@ -5031,7 +5033,7 @@ NTSTATUS SunshineEvtDeviceD0Entry(WDFDEVICE device, WDF_POWER_DEVICE_STATE) {
return context->state->backend.initialize_adapter(device);
}
-NTSTATUS SunshineEvtAdapterInitFinished(
+NTSTATUS VirtualDisplayEvtAdapterInitFinished(
IDDCX_ADAPTER adapter,
const IDARG_IN_ADAPTER_INIT_FINISHED *args
) {
@@ -5043,14 +5045,14 @@ NTSTATUS SunshineEvtAdapterInitFinished(
return context->backend->adapter_init_finished(args);
}
-NTSTATUS SunshineEvtParseMonitorDescription(
+NTSTATUS VirtualDisplayEvtParseMonitorDescription(
const IDARG_IN_PARSEMONITORDESCRIPTION *input,
IDARG_OUT_PARSEMONITORDESCRIPTION *output
) {
return fill_monitor_modes(input, output);
}
-NTSTATUS SunshineEvtGetDefaultDescriptionModes(
+NTSTATUS VirtualDisplayEvtGetDefaultDescriptionModes(
IDDCX_MONITOR monitor,
const IDARG_IN_GETDEFAULTDESCRIPTIONMODES *input,
IDARG_OUT_GETDEFAULTDESCRIPTIONMODES *output
@@ -5064,7 +5066,7 @@ NTSTATUS SunshineEvtGetDefaultDescriptionModes(
return fill_default_monitor_modes(input, output);
}
-NTSTATUS SunshineEvtQueryTargetModes(
+NTSTATUS VirtualDisplayEvtQueryTargetModes(
IDDCX_MONITOR monitor,
const IDARG_IN_QUERYTARGETMODES *input,
IDARG_OUT_QUERYTARGETMODES *output
@@ -5081,7 +5083,7 @@ NTSTATUS SunshineEvtQueryTargetModes(
return fill_target_modes(input, output);
}
-NTSTATUS SunshineEvtCommitModes(IDDCX_ADAPTER adapter, const IDARG_IN_COMMITMODES *args) {
+NTSTATUS VirtualDisplayEvtCommitModes(IDDCX_ADAPTER adapter, const IDARG_IN_COMMITMODES *args) {
auto *context = GetAdapterContext(adapter);
if (!context || !context->backend) {
return STATUS_DEVICE_NOT_READY;
@@ -5090,14 +5092,14 @@ NTSTATUS SunshineEvtCommitModes(IDDCX_ADAPTER adapter, const IDARG_IN_COMMITMODE
return context->backend->commit_modes(args);
}
-NTSTATUS SunshineEvtParseMonitorDescription2(
+NTSTATUS VirtualDisplayEvtParseMonitorDescription2(
const IDARG_IN_PARSEMONITORDESCRIPTION2 *input,
IDARG_OUT_PARSEMONITORDESCRIPTION *output
) {
return fill_monitor_modes2(input, output);
}
-NTSTATUS SunshineEvtAdapterQueryTargetInfo(
+NTSTATUS VirtualDisplayEvtAdapterQueryTargetInfo(
IDDCX_ADAPTER,
IDARG_IN_QUERYTARGET_INFO *,
IDARG_OUT_QUERYTARGET_INFO *output
@@ -5114,7 +5116,7 @@ NTSTATUS SunshineEvtAdapterQueryTargetInfo(
return STATUS_SUCCESS;
}
-NTSTATUS SunshineEvtCommitModes2(IDDCX_ADAPTER adapter, const IDARG_IN_COMMITMODES2 *args) {
+NTSTATUS VirtualDisplayEvtCommitModes2(IDDCX_ADAPTER adapter, const IDARG_IN_COMMITMODES2 *args) {
auto *context = GetAdapterContext(adapter);
if (!context || !context->backend) {
return STATUS_DEVICE_NOT_READY;
@@ -5123,7 +5125,7 @@ NTSTATUS SunshineEvtCommitModes2(IDDCX_ADAPTER adapter, const IDARG_IN_COMMITMOD
return context->backend->commit_modes2(args);
}
-NTSTATUS SunshineEvtSetDefaultHdrMetadata(
+NTSTATUS VirtualDisplayEvtSetDefaultHdrMetadata(
IDDCX_MONITOR monitor,
const IDARG_IN_MONITOR_SET_DEFAULT_HDR_METADATA *args
) {
@@ -5139,7 +5141,7 @@ NTSTATUS SunshineEvtSetDefaultHdrMetadata(
return context->backend.load()->set_default_hdr_metadata(monitor, args);
}
-NTSTATUS SunshineEvtSetGammaRamp(
+NTSTATUS VirtualDisplayEvtSetGammaRamp(
IDDCX_MONITOR monitor,
const IDARG_IN_SET_GAMMARAMP *args
) {
@@ -5155,7 +5157,7 @@ NTSTATUS SunshineEvtSetGammaRamp(
return context->backend.load()->set_gamma_ramp(monitor, args);
}
-NTSTATUS SunshineEvtQueryTargetModes2(
+NTSTATUS VirtualDisplayEvtQueryTargetModes2(
IDDCX_MONITOR monitor,
const IDARG_IN_QUERYTARGETMODES2 *input,
IDARG_OUT_QUERYTARGETMODES *output
@@ -5172,7 +5174,7 @@ NTSTATUS SunshineEvtQueryTargetModes2(
return fill_target_modes2(input, output);
}
-NTSTATUS SunshineEvtAssignSwapChain(IDDCX_MONITOR monitor, const IDARG_IN_SETSWAPCHAIN *args) {
+NTSTATUS VirtualDisplayEvtAssignSwapChain(IDDCX_MONITOR monitor, const IDARG_IN_SETSWAPCHAIN *args) {
// IddCx bugchecks on any assign return other than SUCCESS / ABANDON_SWAPCHAIN.
// The null-backend case is reachable on a late callback after shutdown nulls
// MonitorContext::backend, so it must decline via ABANDON rather than a generic
@@ -5189,7 +5191,7 @@ NTSTATUS SunshineEvtAssignSwapChain(IDDCX_MONITOR monitor, const IDARG_IN_SETSWA
return context->backend.load()->assign_swapchain(monitor, args);
}
-NTSTATUS SunshineEvtUnassignSwapChain(IDDCX_MONITOR monitor) {
+NTSTATUS VirtualDisplayEvtUnassignSwapChain(IDDCX_MONITOR monitor) {
if (!monitor) {
return STATUS_INVALID_PARAMETER;
}
@@ -5202,7 +5204,7 @@ NTSTATUS SunshineEvtUnassignSwapChain(IDDCX_MONITOR monitor) {
return context->backend.load()->unassign_swapchain(monitor);
}
-void SunshineEvtIddCxDeviceIoControl(
+void VirtualDisplayEvtIddCxDeviceIoControl(
WDFDEVICE device,
WDFREQUEST request,
const std::size_t output_buffer_length,
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index d75dd0c..76a0b4a 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -11,7 +11,7 @@ file(GLOB_RECURSE TEST_SOURCES CONFIGURE_DEPENDS
add_executable(test_libvirtualdisplay ${TEST_SOURCES})
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_include_directories(test_libvirtualdisplay PRIVATE
- "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/vibeshine-drm")
+ "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/virtualdisplay-drm")
endif()
target_link_libraries(test_libvirtualdisplay
PRIVATE
@@ -29,8 +29,8 @@ gtest_discover_tests(test_libvirtualdisplay)
# sync instead of scraping its text from a unit test.
add_test(NAME driver_inf_in_sync
COMMAND gen_driver_inf --check
- "${PROJECT_SOURCE_DIR}/src/driver/windows_driver/SunshineVirtualDisplayDriver.inf.in"
- "${PROJECT_SOURCE_DIR}/src/driver/windows_driver/SunshineVirtualDisplayDriver.inf")
+ "${PROJECT_SOURCE_DIR}/src/driver/windows_driver/LizardByteVirtualDisplay.inf.in"
+ "${PROJECT_SOURCE_DIR}/src/driver/windows_driver/LizardByteVirtualDisplay.inf")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_executable(test_kwin_native_abi "${PROJECT_SOURCE_DIR}/tests/linux/test-kwin-native-abi.cpp")
@@ -46,15 +46,15 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_dependencies(test_libvirtualdisplay test_kwin_native_abi)
add_test(NAME linux_kwin_native_abi COMMAND test_kwin_native_abi
"$" "$")
- if(TARGET vibeshine_kwin_gpu)
+ if(TARGET virtualdisplay_kwin_gpu)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBVIRTUALDISPLAY_TEST_KWIN REQUIRED IMPORTED_TARGET libdrm gbm)
add_executable(test_kwin_gpu_routing "${PROJECT_SOURCE_DIR}/tests/linux/test-kwin-gpu-routing.cpp")
target_link_libraries(test_kwin_gpu_routing PRIVATE
PkgConfig::LIBVIRTUALDISPLAY_TEST_KWIN lizardbyte::common ${CMAKE_DL_LIBS})
add_test(NAME linux_kwin_gpu_routing COMMAND test_kwin_gpu_routing)
- get_target_property(_kwin_bridge_definitions vibeshine_kwin_gpu COMPILE_DEFINITIONS)
- if("${_kwin_bridge_definitions}" MATCHES "VIBESHINE_KWIN_NATIVE_ALLOCATOR=1")
+ get_target_property(_kwin_bridge_definitions virtualdisplay_kwin_gpu COMPILE_DEFINITIONS)
+ if("${_kwin_bridge_definitions}" MATCHES "VIRTUALDISPLAY_KWIN_NATIVE_ALLOCATOR=1")
find_package(Qt6 COMPONENTS Core REQUIRED)
find_package(Threads REQUIRED)
add_executable(test_kwin_gpu_routing_native "${PROJECT_SOURCE_DIR}/tests/linux/test-kwin-gpu-routing.cpp")
@@ -84,39 +84,39 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(LIBVIRTUALDISPLAY_BASH_EXECUTABLE)
add_test(NAME linux_vkms_setup
COMMAND "${LIBVIRTUALDISPLAY_BASH_EXECUTABLE}"
- "${PROJECT_SOURCE_DIR}/tests/linux/test-vibeshine-vkms.sh"
- "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/packaging/vibeshine-vkms")
+ "${PROJECT_SOURCE_DIR}/tests/linux/test-virtualdisplay-vkms.sh"
+ "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/packaging/virtualdisplay-vkms")
add_test(NAME linux_drm_install
COMMAND "${LIBVIRTUALDISPLAY_BASH_EXECUTABLE}"
- "${PROJECT_SOURCE_DIR}/tests/linux/test-vibeshine-drm-install.sh"
- "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/packaging/vibeshine-drm-install.in")
+ "${PROJECT_SOURCE_DIR}/tests/linux/test-virtualdisplay-drm-install.sh"
+ "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/packaging/virtualdisplay-drm-install.in")
add_test(NAME linux_drm_build_module
COMMAND "${LIBVIRTUALDISPLAY_BASH_EXECUTABLE}"
- "${PROJECT_SOURCE_DIR}/tests/linux/test-vibeshine-drm-build-module.sh"
- "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/vibeshine-drm/build-module"
- "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/vibeshine-drm/dkms.conf.in")
+ "${PROJECT_SOURCE_DIR}/tests/linux/test-virtualdisplay-drm-build-module.sh"
+ "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/virtualdisplay-drm/build-module"
+ "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/virtualdisplay-drm/dkms.conf.in")
endif()
find_program(LIBVIRTUALDISPLAY_PYTHON_EXECUTABLE NAMES python3)
if(LIBVIRTUALDISPLAY_PYTHON_EXECUTABLE)
# The CTest command invokes this helper by its target-file path. Ensure
# it is included when CI builds only test_libvirtualdisplay.
- if(TARGET vibeshine_vkms_peercred)
- add_dependencies(test_libvirtualdisplay vibeshine_vkms_peercred)
+ if(TARGET virtualdisplay_vkms_peercred)
+ add_dependencies(test_libvirtualdisplay virtualdisplay_vkms_peercred)
endif()
add_test(NAME linux_drm_native_allocation
COMMAND "${LIBVIRTUALDISPLAY_PYTHON_EXECUTABLE}"
"${PROJECT_SOURCE_DIR}/tests/linux/test-native-dumb-allocation.py"
- "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/vibeshine-drm")
+ "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/virtualdisplay-drm")
add_test(NAME linux_vkms_peercred
COMMAND "${LIBVIRTUALDISPLAY_PYTHON_EXECUTABLE}"
"${PROJECT_SOURCE_DIR}/tests/linux/test-vkms-peercred.py"
- "$")
+ "$")
add_test(NAME linux_drm_contract
COMMAND "${LIBVIRTUALDISPLAY_PYTHON_EXECUTABLE}"
- "${PROJECT_SOURCE_DIR}/tests/linux/test-vibeshine-drm-contract.py"
- "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/vibeshine-drm")
+ "${PROJECT_SOURCE_DIR}/tests/linux/test-virtualdisplay-drm-contract.py"
+ "${_LIBVIRTUALDISPLAY_LINUX_ROOT}/virtualdisplay-drm")
add_test(NAME linux_kwin_gpu_bridge_contract
COMMAND "${LIBVIRTUALDISPLAY_PYTHON_EXECUTABLE}"
"${PROJECT_SOURCE_DIR}/tests/linux/test-kwin-gpu-bridge-contract.py"
diff --git a/tests/linux/native-dumb-baseline-probe.c b/tests/linux/native-dumb-baseline-probe.c
index 364098f..0555fcf 100644
--- a/tests/linux/native-dumb-baseline-probe.c
+++ b/tests/linux/native-dumb-baseline-probe.c
@@ -4,8 +4,8 @@
*/
#include "vkms_drv.c"
-int vibeshine_baseline_dumb_create(struct drm_file *, struct drm_device *, struct drm_mode_create_dumb *);
+int virtualdisplay_baseline_dumb_create(struct drm_file *, struct drm_device *, struct drm_mode_create_dumb *);
-int vibeshine_baseline_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args) {
+int virtualdisplay_baseline_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args) {
return vkms_driver.dumb_create(file, dev, args);
}
diff --git a/tests/linux/test-frame-fd-transaction.py b/tests/linux/test-frame-fd-transaction.py
index 2f3d6d9..f124642 100644
--- a/tests/linux/test-frame-fd-transaction.py
+++ b/tests/linux/test-frame-fd-transaction.py
@@ -7,7 +7,7 @@
import tempfile
ROOT = Path(__file__).resolve().parents[2]
-DRIVER = Path(sys.argv[1]) if len(sys.argv) > 1 else ROOT / 'linux/vibeshine-drm'
+DRIVER = Path(sys.argv[1]) if len(sys.argv) > 1 else ROOT / 'linux/virtualdisplay-drm'
SOURCE = r'''
#include
#include
@@ -57,7 +57,7 @@
return 0;
}
'''
-with tempfile.TemporaryDirectory(prefix='vibeshine-frame-fds-') as name:
+with tempfile.TemporaryDirectory(prefix='virtualdisplay-frame-fds-') as name:
path = Path(name)
(path / 'linux').mkdir()
for header in ['fdtable.h', 'file.h']:
diff --git a/tests/linux/test-kwin-gpu-bridge-contract.py b/tests/linux/test-kwin-gpu-bridge-contract.py
index 2a0e098..e91daeb 100644
--- a/tests/linux/test-kwin-gpu-bridge-contract.py
+++ b/tests/linux/test-kwin-gpu-bridge-contract.py
@@ -28,8 +28,8 @@ def main() -> int:
linux_root = Path(sys.argv[1]).resolve()
interposer_path = linux_root / "kwin_gpu_interposer.cpp"
- dropin_path = linux_root / "packaging" / "vibeshine-kwin-gpu.conf.in"
- login_dropin_path = linux_root / "packaging" / "vibeshine-login-kwin-gpu.conf.in"
+ dropin_path = linux_root / "packaging" / "virtualdisplay-kwin-gpu.conf.in"
+ login_dropin_path = linux_root / "packaging" / "virtualdisplay-login-kwin-gpu.conf.in"
project_cmake_path = linux_root.parent / "CMakeLists.txt"
cmake_path = linux_root.parent / "src" / "driver" / "CMakeLists.txt"
@@ -43,17 +43,17 @@ def main() -> int:
'extern "C" gbm_device *gbm_create_device',
'extern "C" void gbm_device_destroy',
"DRM_BUS_FAUX",
- 'std::strcmp(device->businfo.faux->name, "vibeshine")',
+ 'std::strcmp(device->businfo.faux->name, "virtualdisplay")',
"deviceinfo.pci->vendor_id == 0x10de",
"matches > 1",
- "VIBESHINE_KWIN_RENDER_PCI",
- "vibeshine_kwin_gpu_interposer_abi",
+ "VIRTUALDISPLAY_KWIN_RENDER_PCI",
+ "virtualdisplay_kwin_gpu_interposer_abi",
"return 7",
"stop_kwin_preload_inheritance",
"running_inside_kwin",
"configure_allocator_routing(dlsym)",
"native_allocator_runtime_compatible",
- "VIBESHINE_KWIN_NATIVE_LIBRARY_NAME",
+ "VIRTUALDISPLAY_KWIN_NATIVE_LIBRARY_NAME",
"software_allocation = options.software",
"hooks_enabled.store((legacy_allocator && !native_allocator) || native_supported",
"_ZN4KWin26GbmGraphicsBufferAllocatorC1EP10gbm_devicem",
@@ -76,8 +76,8 @@ def main() -> int:
require("HEADLESS_HDR" not in interposer, "physical headless-HDR policy returned")
require_all(dropin, (
- "Environment=LD_PRELOAD=@VIBESHINE_KWIN_GPU_LIBRARY_NAME@",
- "Environment=VIBESHINE_KWIN_GPU_PRELOAD_ACTIVE=1",
+ "Environment=LD_PRELOAD=@VIRTUALDISPLAY_KWIN_GPU_LIBRARY_NAME@",
+ "Environment=VIRTUALDISPLAY_KWIN_GPU_PRELOAD_ACTIVE=1",
"Environment=KWIN_DISABLE_UDMABUF_IMPORT=1",
), dropin_path.name)
require("LD_PRELOAD=/" not in dropin and "LIBRARY_PATH@" not in dropin,
@@ -86,21 +86,21 @@ def main() -> int:
require("PATH=" not in dropin, "desktop drop-in intercepts KWin through PATH")
require_all(login_dropin, (
"UnsetEnvironment=LD_AUDIT",
- "Environment=LD_PRELOAD=@VIBESHINE_KWIN_GPU_LIBRARY_NAME@",
- "Environment=VIBESHINE_KWIN_GPU_PRELOAD_ACTIVE=1",
+ "Environment=LD_PRELOAD=@VIRTUALDISPLAY_KWIN_GPU_LIBRARY_NAME@",
+ "Environment=VIRTUALDISPLAY_KWIN_GPU_PRELOAD_ACTIVE=1",
"Environment=KWIN_DISABLE_UDMABUF_IMPORT=1",
), login_dropin_path.name)
require("ExecStart=" not in login_dropin, "login drop-in replaces the vendor KWin command")
- require("option(BUILD_VIBESHINE_KWIN_GPU_BRIDGE" in project_cmake
+ require("option(BUILD_VIRTUALDISPLAY_KWIN_GPU_BRIDGE" in project_cmake
and "if(_libvirtualdisplay_build_kwin_bridge)" in cmake,
"KWin bridge is not guarded by an explicit build option")
require("plasma-login-kwin_wayland.service.d" in cmake,
"KWin bridge is not installed for the Plasma login compositor")
- require("vibeshine_kwin_capability" not in cmake,
+ require("virtualdisplay_kwin_capability" not in cmake,
"obsolete KWin capability-stripping helper is still built")
require_all(cmake, (
- 'set(VIBESHINE_KWIN_GPU_LIBRARY_NAME "libvibeshine-kwin-gpu.so")',
- 'set(VIBESHINE_KWIN_GPU_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}"',
+ 'set(VIRTUALDISPLAY_KWIN_GPU_LIBRARY_NAME "libvirtualdisplay-kwin-gpu.so")',
+ 'set(VIRTUALDISPLAY_KWIN_GPU_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}"',
"WORLD_READ WORLD_EXECUTE SETUID)",
), cmake_path.name)
require("kwin_preload_launcher" not in cmake,
@@ -110,9 +110,9 @@ def main() -> int:
linux_root / "kwin_capability.c",
linux_root / "kwin_hdr_interposer.cpp",
linux_root / "kwin_preload_launcher.cpp",
- linux_root / "packaging" / "vibeshine-kwin-hdr.conf.in",
- linux_root / "packaging" / "vibeshine-nvidia-display",
- linux_root / "packaging" / "vibeshine-nvidia-display.service.in",
+ linux_root / "packaging" / "virtualdisplay-kwin-hdr.conf.in",
+ linux_root / "packaging" / "virtualdisplay-nvidia-display",
+ linux_root / "packaging" / "virtualdisplay-nvidia-display.service.in",
):
require(not obsolete.exists(), f"obsolete physical-display artifact remains: {obsolete.name}")
diff --git a/tests/linux/test-kwin-gpu-routing.cpp b/tests/linux/test-kwin-gpu-routing.cpp
index 0d8b5d7..821fe8f 100644
--- a/tests/linux/test-kwin-gpu-routing.cpp
+++ b/tests/linux/test-kwin-gpu-routing.cpp
@@ -78,7 +78,7 @@ namespace {
bool reject_render_type;
bool legacy_allocator_symbol;
bool native_allocator_symbol;
-#ifdef VIBESHINE_KWIN_NATIVE_ALLOCATOR
+#ifdef VIRTUALDISPLAY_KWIN_NATIVE_ALLOCATOR
std::function render_device_body;
void *native_render_device(const void *manager, drmDevicePtr device) {
@@ -156,7 +156,7 @@ namespace {
real_gbm_device_get_fd = +[](gbm_device *device) {
return device->fd;
};
-#ifdef VIBESHINE_KWIN_NATIVE_ALLOCATOR
+#ifdef VIRTUALDISPLAY_KWIN_NATIVE_ALLOCATOR
real_native_render_device = native_render_device;
real_native_allocate = native_allocate;
software_allocation = false;
@@ -172,7 +172,7 @@ namespace {
renumbered_device = nullptr;
reject_render_gbm = reject_render_type = false;
legacy_allocator_symbol = native_allocator_symbol = false;
- lizardbyte::common::unset_env("VIBESHINE_KWIN_RENDER_PCI");
+ lizardbyte::common::unset_env("VIRTUALDISPLAY_KWIN_RENDER_PCI");
}
void require_original_devices() {
@@ -228,7 +228,7 @@ extern "C" int drmGetNodeTypeFromFd(int fd) {
int main() {
try {
std::string env_value;
- device_fixture virtual_kms(DRM_BUS_FAUX, 0, 0, "vibeshine");
+ device_fixture virtual_kms(DRM_BUS_FAUX, 0, 0, "virtualdisplay");
device_fixture virtio(DRM_BUS_PCI, 0x1af4, 3);
device_fixture nvidia_one(DRM_BUS_PCI, 0x10de, 1);
device_fixture nvidia_two(DRM_BUS_PCI, 0x10de, 2);
@@ -251,15 +251,15 @@ int main() {
});
run("a preload marker cannot enable hooks in a wrapper or another process", [&] {
hooks_enabled = false;
- lizardbyte::common::set_env("VIBESHINE_KWIN_GPU_PRELOAD_ACTIVE", "1");
- lizardbyte::common::set_env("LD_PRELOAD", "libvibeshine-kwin-gpu.so");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_GPU_PRELOAD_ACTIVE", "1");
+ lizardbyte::common::set_env("LD_PRELOAD", "libvirtualdisplay-kwin-gpu.so");
stop_kwin_preload_inheritance();
require(!hooks_enabled && lizardbyte::common::get_env("LD_PRELOAD", env_value), "hook enabled outside actual KWin");
lizardbyte::common::unset_env("LD_PRELOAD");
- lizardbyte::common::unset_env("VIBESHINE_KWIN_GPU_PRELOAD_ACTIVE");
+ lizardbyte::common::unset_env("VIRTUALDISPLAY_KWIN_GPU_PRELOAD_ACTIVE");
});
run("Virtio console GBM keeps its original fd despite an explicit NVIDIA choice", [&] {
- lizardbyte::common::set_env("VIBESHINE_KWIN_RENDER_PCI", "0000:01:00.0");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_RENDER_PCI", "0000:01:00.0");
errno = EBUSY;
auto *device = gbm_create_device(virtio.fd);
require(device->fd == virtio.fd && enumerations == 0 && errno == EBUSY, "physical seat allocator was routed or changed errno");
@@ -275,11 +275,11 @@ int main() {
});
run("unmatched native KWin library retains its complete native allocation path", [&] {
native_allocator_symbol = true;
- lizardbyte::common::set_env("VIBESHINE_KWIN_GPU_PRELOAD_ACTIVE", "1");
- lizardbyte::common::set_env("LD_PRELOAD", "libvibeshine-kwin-gpu.so");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_GPU_PRELOAD_ACTIVE", "1");
+ lizardbyte::common::set_env("LD_PRELOAD", "libvirtualdisplay-kwin-gpu.so");
configure_allocator_routing(lookup_allocator, false);
require(!hooks_enabled, "native scanout allocator was routed to a render node");
- require(!lizardbyte::common::get_env("LD_PRELOAD", env_value) && !lizardbyte::common::get_env("VIBESHINE_KWIN_GPU_PRELOAD_ACTIVE", env_value), "native allocator path leaked preload into compositor children");
+ require(!lizardbyte::common::get_env("LD_PRELOAD", env_value) && !lizardbyte::common::get_env("VIRTUALDISPLAY_KWIN_GPU_PRELOAD_ACTIVE", env_value), "native allocator path leaked preload into compositor children");
require_fallback();
require(lookups == 0 && enumerations == 0, "native KMS allocation inspected other GPUs");
auto *physical = gbm_create_device(nvidia_one.fd);
@@ -303,12 +303,12 @@ int main() {
});
run("explicit PCI chooses one of two NVIDIA devices without changing seat metadata", [&] {
native_devices = {&nvidia_two, &virtio, &virtual_kms, &nvidia_one};
- lizardbyte::common::set_env("VIBESHINE_KWIN_RENDER_PCI", "0000:01:00.0");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_RENDER_PCI", "0000:01:00.0");
require_routed(gbm_create_device(virtual_kms.fd), nvidia_one);
});
run("the second NVIDIA can be chosen independently of enumeration order", [&] {
native_devices.push_back(&nvidia_two);
- lizardbyte::common::set_env("VIBESHINE_KWIN_RENDER_PCI", "0000:02:00.0");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_RENDER_PCI", "0000:02:00.0");
require_routed(gbm_create_device(virtual_kms.fd), nvidia_two);
});
run("multiple NVIDIA devices automatically use the lowest PCI address", [&] {
@@ -331,20 +331,20 @@ int main() {
});
run("empty override uses the stable automatic multi-GPU selection", [&] {
native_devices = {&nvidia_two, &virtual_kms, &virtio, &nvidia_one};
- lizardbyte::common::set_env("VIBESHINE_KWIN_RENDER_PCI", "");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_RENDER_PCI", "");
require_routed(gbm_create_device(virtual_kms.fd), nvidia_one);
});
run("invalid PCI override safely preserves original virtual and seat allocators", [&] {
- lizardbyte::common::set_env("VIBESHINE_KWIN_RENDER_PCI", "0000:01:00.0junk");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_RENDER_PCI", "0000:01:00.0junk");
require_fallback();
});
run("an unmatched explicit PCI override does not silently pick another GPU", [&] {
- lizardbyte::common::set_env("VIBESHINE_KWIN_RENDER_PCI", "0000:02:00.0");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_RENDER_PCI", "0000:02:00.0");
require_fallback();
});
run("an unmatched explicit override also refuses the automatic multi-GPU default", [&] {
native_devices.push_back(&nvidia_two);
- lizardbyte::common::set_env("VIBESHINE_KWIN_RENDER_PCI", "0000:03:00.0");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_RENDER_PCI", "0000:03:00.0");
require_fallback();
});
run("render-node renumbering is rejected after open", [&] {
@@ -378,7 +378,7 @@ int main() {
native_devices = {&virtual_kms, &virtio};
require_fallback();
});
-#ifdef VIBESHINE_KWIN_NATIVE_ALLOCATOR
+#ifdef VIRTUALDISPLAY_KWIN_NATIVE_ALLOCATOR
run("native compatibility selects NVIDIA only for the managed virtual output", [&] {
int manager, selected;
render_device_body = [&](const void *actual, drmDevicePtr device) -> void * {
@@ -386,7 +386,7 @@ int main() {
require(device == &nvidia_one.record, "virtual output did not query the real NVIDIA renderer");
return &selected;
};
- require(vibeshine_kwin_render_device(&manager, &virtual_kms.record) == &selected, "virtual output lost its NVIDIA render association");
+ require(virtualdisplay_kwin_render_device(&manager, &virtual_kms.record) == &selected, "virtual output lost its NVIDIA render association");
require_original_devices();
require(owned_render_fds.empty() && fcntl(last_node_fd, F_GETFD) == -1, "compatibility query leaked its temporary render fd");
for (auto *physical : {&virtio, &nvidia_one, &unrelated_faux}) {
@@ -395,12 +395,12 @@ int main() {
return &selected;
};
const int before = enumerations;
- require(vibeshine_kwin_render_device(&manager, &physical->record) == &selected && enumerations == before, "unrelated compatibility query inspected other GPUs");
+ require(virtualdisplay_kwin_render_device(&manager, &physical->record) == &selected && enumerations == before, "unrelated compatibility query inspected other GPUs");
}
});
run("native compatibility honors PCI choice and falls back when renderer is absent", [&] {
native_devices.push_back(&nvidia_two);
- lizardbyte::common::set_env("VIBESHINE_KWIN_RENDER_PCI", "0000:02:00.0");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_RENDER_PCI", "0000:02:00.0");
int original;
unsigned calls = 0;
render_device_body = [&](const void *, drmDevicePtr device) -> void * {
@@ -411,10 +411,10 @@ int main() {
require(device == &virtual_kms.record, "missing render device selected another GPU");
return &original;
};
- require(vibeshine_kwin_render_device(nullptr, &virtual_kms.record) == &original && calls == 2, "missing render device did not preserve native virtual compatibility");
- lizardbyte::common::set_env("VIBESHINE_KWIN_RENDER_PCI", "bad");
+ require(virtualdisplay_kwin_render_device(nullptr, &virtual_kms.record) == &original && calls == 2, "missing render device did not preserve native virtual compatibility");
+ lizardbyte::common::set_env("VIRTUALDISPLAY_KWIN_RENDER_PCI", "bad");
calls = 0;
- require(vibeshine_kwin_render_device(nullptr, &virtual_kms.record) == &original && calls == 1, "invalid PCI choice did not preserve native compatibility");
+ require(virtualdisplay_kwin_render_device(nullptr, &virtual_kms.record) == &original && calls == 1, "invalid PCI choice did not preserve native compatibility");
require_original_devices();
});
run("unmatched native ABI leaves render compatibility unchanged", [&] {
@@ -424,7 +424,7 @@ int main() {
require(device == &virtual_kms.record, "ABI fallback changed renderer lookup");
return &original;
};
- require(vibeshine_kwin_render_device(nullptr, &virtual_kms.record) == &original && enumerations == 0, "ABI fallback routed render compatibility");
+ require(virtualdisplay_kwin_render_device(nullptr, &virtual_kms.record) == &original && enumerations == 0, "ABI fallback routed render compatibility");
});
run("matching native allocator uses NVIDIA hardware and original KMS software allocation", [&] {
native_allocator_symbol = true;
@@ -438,10 +438,10 @@ int main() {
};
KWin::GraphicsBufferOptions options;
options.software = true;
- vibeshine_kwin_allocate(nullptr, options);
+ virtualdisplay_kwin_allocate(nullptr, options);
require(!software_allocation && nvidia_one.matches_fd(gbm_device_get_fd(device)), "software scope escaped into EGL rendering");
options.software = false;
- vibeshine_kwin_allocate(nullptr, options);
+ virtualdisplay_kwin_allocate(nullptr, options);
require_routed(device, nvidia_one);
});
run("native software scope leaves physical seat and unrelated threads unchanged", [&] {
@@ -459,7 +459,7 @@ int main() {
};
KWin::GraphicsBufferOptions options;
options.software = true;
- vibeshine_kwin_allocate(nullptr, options);
+ virtualdisplay_kwin_allocate(nullptr, options);
gbm_device_destroy(physical);
require_routed(device, nvidia_one);
});
@@ -470,7 +470,7 @@ int main() {
require(virtual_kms.matches_fd(gbm_device_get_fd(device)), "outer KMS scope missing");
KWin::GraphicsBufferOptions hardware;
hardware.software = false;
- vibeshine_kwin_allocate(nullptr, hardware);
+ virtualdisplay_kwin_allocate(nullptr, hardware);
require(virtual_kms.matches_fd(gbm_device_get_fd(device)), "nested allocation lost outer KMS scope");
} else {
require(nvidia_one.matches_fd(gbm_device_get_fd(device)), "nested hardware allocation used KMS fd");
@@ -479,7 +479,7 @@ int main() {
};
KWin::GraphicsBufferOptions options;
options.software = true;
- vibeshine_kwin_allocate(nullptr, options);
+ virtualdisplay_kwin_allocate(nullptr, options);
require(!software_allocation, "nested software scope leaked");
require_routed(device, nvidia_one);
});
@@ -490,14 +490,14 @@ int main() {
KWin::GraphicsBufferOptions options;
options.software = true;
try {
- vibeshine_kwin_allocate(nullptr, options);
+ virtualdisplay_kwin_allocate(nullptr, options);
require(false, "allocation unexpectedly succeeded");
} catch (const std::runtime_error &) {
require(!software_allocation, "failed allocation leaked software scope");
}
});
#endif
- require(vibeshine_kwin_gpu_interposer_abi() == 7, "unexpected bridge ABI");
+ require(virtualdisplay_kwin_gpu_interposer_abi() == 7, "unexpected bridge ABI");
return 0;
} catch (const std::exception &error) {
std::cerr << "FAIL: " << error.what() << '\n';
diff --git a/tests/linux/test-kwin-native-abi.cpp b/tests/linux/test-kwin-native-abi.cpp
index 89ef43b..9931cd0 100644
--- a/tests/linux/test-kwin-native-abi.cpp
+++ b/tests/linux/test-kwin-native-abi.cpp
@@ -9,7 +9,7 @@
#include
namespace {
- using vibeshine::kwin::native_abi_result;
+ using virtual_display::kwin::native_abi_result;
int allocator;
void *mapped_allocator;
@@ -65,13 +65,13 @@ namespace {
};
auto probe() {
- return vibeshine::kwin::probe_native_abi("allocator", "libkwin.so.6.8.0", lookup, address);
+ return virtual_display::kwin::probe_native_abi("allocator", "libkwin.so.6.8.0", lookup, address);
}
- std::string diagnostic(const vibeshine::kwin::native_abi_probe &result) {
+ std::string diagnostic(const virtual_display::kwin::native_abi_probe &result) {
FILE *file = tmpfile();
require(file != nullptr, "diagnostic capture failed");
- vibeshine::kwin::report_native_abi_failure(file, result, "libkwin.so.6.8.0");
+ virtual_display::kwin::report_native_abi_failure(file, result, "libkwin.so.6.8.0");
rewind(file);
std::string output;
char buffer[256];
@@ -132,7 +132,7 @@ int main(int argc, char **argv) {
unlink(files.link.c_str());
require(symlink(argv[2], files.link.c_str()) == 0, "mapped fixture retarget failed");
require(value() == 680, "retarget unexpectedly replaced mapped code");
- result = vibeshine::kwin::probe_native_abi("kwin_abi_fixture", "libkwin.so.6.8.0", lookup_mapped);
+ result = virtual_display::kwin::probe_native_abi("kwin_abi_fixture", "libkwin.so.6.8.0", lookup_mapped);
require(result.result == native_abi_result::different_library, "retarget must retain guard rejection");
const auto mapped_message = diagnostic(result);
require(mapped_message.find("resolved current pathname libkwin.so.6.8.1") != std::string::npos, "diagnostic must describe the current pathname target");
diff --git a/tests/linux/test-kwin-native-allocation.cpp b/tests/linux/test-kwin-native-allocation.cpp
index 2b74ff9..7b88026 100644
--- a/tests/linux/test-kwin-native-allocation.cpp
+++ b/tests/linux/test-kwin-native-allocation.cpp
@@ -38,7 +38,7 @@ int main(int argc, char **argv) {
const int actual = drmGetDevices2(0, devices.data(), count);
QString path;
for (int i = 0; i < actual; ++i) {
- if (is_vibeshine_display(devices[i]) && (devices[i]->available_nodes & (1 << DRM_NODE_PRIMARY))) {
+ if (is_virtualdisplay_display(devices[i]) && (devices[i]->available_nodes & (1 << DRM_NODE_PRIMARY))) {
path = QString::fromLocal8Bit(devices[i]->nodes[DRM_NODE_PRIMARY]);
}
}
@@ -70,7 +70,7 @@ int main(int argc, char **argv) {
std::cout << "KWin virtual-output hardware render selection: PASS\n";
const auto &fds = owned_render_fds.at(device->gbmDevice());
drmVersionPtr version = drmGetVersion(fds.kms);
- require(version && std::string_view(version->name, version->name_len) == "vibeshine_drm", "software fd does not refer to virtual KMS");
+ require(version && std::string_view(version->name, version->name_len) == "virtualdisplay_drm", "software fd does not refer to virtual KMS");
drmFreeVersion(version);
KWin::GraphicsBufferOptions opts;
opts.size = QSize(64, 64);
diff --git a/tests/linux/test-native-dumb-allocation.c b/tests/linux/test-native-dumb-allocation.c
index 2b91bef..41b5506 100644
--- a/tests/linux/test-native-dumb-allocation.c
+++ b/tests/linux/test-native-dumb-allocation.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
/* Link the production allocator .c unchanged; mock only kernel DRM APIs. */
-#include "vibeshine_drm_dumb.h"
+#include "virtualdisplay_drm_dumb.h"
#include
#include
@@ -20,12 +20,12 @@ static unsigned char *mapping;
static size_t mapped_size;
static int imported;
-static const struct drm_driver ops = {VIBESHINE_DRM_SHMEM_DRIVER_OPS};
+static const struct drm_driver ops = {VIRTUALDISPLAY_DRM_SHMEM_DRIVER_OPS};
-#ifdef VIBESHINE_TEST_BASELINE
+#ifdef VIRTUALDISPLAY_TEST_BASELINE
/* This bridge is compiled with the unmodified pre-fix vkms_drv.c. */
-extern int vibeshine_baseline_dumb_create(struct drm_file *, struct drm_device *, struct drm_mode_create_dumb *);
- #define allocate vibeshine_baseline_dumb_create
+extern int virtualdisplay_baseline_dumb_create(struct drm_file *, struct drm_device *, struct drm_mode_create_dumb *);
+ #define allocate virtualdisplay_baseline_dumb_create
#else
#define allocate ops.dumb_create
#endif
diff --git a/tests/linux/test-native-dumb-allocation.py b/tests/linux/test-native-dumb-allocation.py
index 5f9eafb..d858107 100755
--- a/tests/linux/test-native-dumb-allocation.py
+++ b/tests/linux/test-native-dumb-allocation.py
@@ -17,7 +17,7 @@ def main() -> int:
args = parser.parse_args()
tests = Path(__file__).resolve().parent
driver = args.driver_root.resolve()
- with tempfile.TemporaryDirectory(prefix="vibeshine-dumb-component-") as temporary:
+ with tempfile.TemporaryDirectory(prefix="virtualdisplay-dumb-component-") as temporary:
output = args.output_dir.resolve() if args.output_dir else Path(temporary)
output.mkdir(parents=True, exist_ok=True)
versions = ((7, 2),) if args.baseline_object else ((6, 16), (6, 17), (6, 18), (7, 2))
@@ -31,10 +31,10 @@ def main() -> int:
f"-DPAGE_SIZE={page_size}U",
f"-DLINUX_VERSION_CODE={(major << 16) + (minor << 8)}",
"-I", str(tests / "kernel-shim"), "-I", str(driver),
- str(driver / "vibeshine_drm_dumb.c"),
+ str(driver / "virtualdisplay_drm_dumb.c"),
str(tests / "test-native-dumb-allocation.c")]
if args.baseline_object:
- command += ["-DVIBESHINE_TEST_BASELINE", str(args.baseline_object.resolve())]
+ command += ["-DVIRTUALDISPLAY_TEST_BASELINE", str(args.baseline_object.resolve())]
command += ["-Wl,--gc-sections", "-o", str(binary)]
subprocess.run(command, check=True)
result = subprocess.run([str(binary)], capture_output=True, text=True)
diff --git a/tests/linux/test-native-dumb-regression.py b/tests/linux/test-native-dumb-regression.py
index 3273300..5601908 100755
--- a/tests/linux/test-native-dumb-regression.py
+++ b/tests/linux/test-native-dumb-regression.py
@@ -31,20 +31,20 @@ def main() -> int:
source = output / "source"
source.mkdir(parents=True, exist_ok=False)
archive = subprocess.check_output(
- ["git", "-C", str(repo), "archive", args.baseline_ref, "linux/vibeshine-drm"])
+ ["git", "-C", str(repo), "archive", args.baseline_ref, "linux/virtualdisplay-drm"])
with tarfile.open(fileobj=io.BytesIO(archive)) as tar:
tar.extractall(source, filter="data")
- driver = source / "linux/vibeshine-drm"
+ driver = source / "linux/virtualdisplay-drm"
original = driver / "vkms_drv.c"
expected_blob = subprocess.check_output(
- ["git", "-C", str(repo), "rev-parse", f"{args.baseline_ref}:linux/vibeshine-drm/vkms_drv.c"],
+ ["git", "-C", str(repo), "rev-parse", f"{args.baseline_ref}:linux/virtualdisplay-drm/vkms_drv.c"],
text=True).strip()
actual_blob = subprocess.check_output(["git", "hash-object", str(original)], text=True).strip()
if actual_blob != expected_blob:
raise RuntimeError("historical driver differs from its Git blob")
shutil.copyfile(tests / "native-dumb-baseline-probe.c", driver / "baseline-probe.c")
- (driver / "vibeshine_drm_version.h").write_text(
- '#define VIBESHINE_DRM_VERSION "baseline-component-test"\n', encoding="utf-8")
+ (driver / "virtualdisplay_drm_version.h").write_text(
+ '#define VIRTUALDISPLAY_DRM_VERSION "baseline-component-test"\n', encoding="utf-8")
(driver / "Makefile").write_text(
"obj-m += baseline-probe.o\n"
"CFLAGS_REMOVE_baseline-probe.o += -pg -mfentry -mrecord-mcount "
@@ -61,9 +61,9 @@ def main() -> int:
# ftrace patch-location metadata lets normal linker section GC remove code
# unreachable from the callback. No instruction section is modified.
subprocess.run(
- ["objcopy", "--strip-debug", "--keep-global-symbol=vibeshine_baseline_dumb_create",
+ ["objcopy", "--strip-debug", "--keep-global-symbol=virtualdisplay_baseline_dumb_create",
"--remove-section=__patchable_function_entries", str(compiled), str(userspace)], check=True)
- section = ".text.vibeshine_baseline_dumb_create"
+ section = ".text.virtualdisplay_baseline_dumb_create"
instruction_files = []
for name, obj in (("before", compiled), ("after", userspace)):
instructions = output / f"callback-{name}.bin"
@@ -74,7 +74,7 @@ def main() -> int:
disassembly = subprocess.check_output(["objdump", "-dr", f"--section={section}", str(userspace)], text=True)
(output / "callback-disassembly.txt").write_text(disassembly, encoding="utf-8")
runner = [sys.executable, str(tests / "test-native-dumb-allocation.py"),
- str(repo / "linux/vibeshine-drm")]
+ str(repo / "linux/virtualdisplay-drm")]
red = subprocess.run(runner + ["--baseline-object", str(userspace), "--output-dir", str(output / "red")],
capture_output=True, text=True)
(output / "red.log").write_text(red.stdout + red.stderr, encoding="utf-8")
@@ -99,7 +99,7 @@ def main() -> int:
"baseline_observed_pitch": 13760,
"corrected_observed_pitch": 13824,
"logical_resolution": [3440, 1440],
- "corrected_production_source": "linux/vibeshine-drm/vibeshine_drm_dumb.c",
+ "corrected_production_source": "linux/virtualdisplay-drm/virtualdisplay_drm_dumb.c",
"corrected_component_exit": green.returncode,
"amd_runtime_tested": False,
}
diff --git a/tests/linux/test-vibeshine-drm-build-module.sh b/tests/linux/test-virtualdisplay-drm-build-module.sh
similarity index 87%
rename from tests/linux/test-vibeshine-drm-build-module.sh
rename to tests/linux/test-virtualdisplay-drm-build-module.sh
index 50e7b48..ba07e2d 100755
--- a/tests/linux/test-vibeshine-drm-build-module.sh
+++ b/tests/linux/test-virtualdisplay-drm-build-module.sh
@@ -2,8 +2,8 @@
set -euo pipefail
-BUILD_HELPER_UNDER_TEST=${1:?usage: test-vibeshine-drm-build-module.sh /path/to/build-module /path/to/dkms.conf.in}
-DKMS_CONFIG_UNDER_TEST=${2:?usage: test-vibeshine-drm-build-module.sh /path/to/build-module /path/to/dkms.conf.in}
+BUILD_HELPER_UNDER_TEST=${1:?usage: test-virtualdisplay-drm-build-module.sh /path/to/build-module /path/to/dkms.conf.in}
+DKMS_CONFIG_UNDER_TEST=${2:?usage: test-virtualdisplay-drm-build-module.sh /path/to/build-module /path/to/dkms.conf.in}
TEST_ROOT=$(mktemp -d)
cleanup_test_root() {
@@ -23,10 +23,10 @@ TEST_MODULES="$TEST_ROOT/modules"
TEST_SOURCE="$TEST_ROOT/source"
CLANG_KERNEL="6.16.0-clang"
GCC_KERNEL="7.2.0-gcc"
-UNSUPPORTED_KERNEL="6.15.99-vibeshine"
+UNSUPPORTED_KERNEL="6.15.99-virtualdisplay"
MAKE_CALLS="$TEST_ROOT/make-calls"
mkdir -p -- "$TEST_SOURCE" "$TEST_MODULES/$CLANG_KERNEL/build" "$TEST_MODULES/$GCC_KERNEL/build"
-printf 'obj-m += vibeshine_drm.o\n' >"$TEST_SOURCE/Makefile"
+printf 'obj-m += virtualdisplay_drm.o\n' >"$TEST_SOURCE/Makefile"
printf 'all:\n' >"$TEST_MODULES/$CLANG_KERNEL/build/Makefile"
printf 'CONFIG_CC_IS_CLANG=y\n' >"$TEST_MODULES/$CLANG_KERNEL/build/.config"
printf 'all:\n' >"$TEST_MODULES/$GCC_KERNEL/build/Makefile"
@@ -73,4 +73,4 @@ if build_module "$UNSUPPORTED_KERNEL" "$TEST_SOURCE"; then
fi
[[ $(wc -l <"$MAKE_CALLS") -eq 4 ]] || fail "unsupported kernel invoked make"
-printf 'PASS: vibeshine-drm build-module shell tests\n'
+printf 'PASS: virtualdisplay-drm build-module shell tests\n'
diff --git a/tests/linux/test-vibeshine-drm-contract.py b/tests/linux/test-virtualdisplay-drm-contract.py
similarity index 87%
rename from tests/linux/test-vibeshine-drm-contract.py
rename to tests/linux/test-virtualdisplay-drm-contract.py
index 50b6d2d..58a716e 100755
--- a/tests/linux/test-vibeshine-drm-contract.py
+++ b/tests/linux/test-virtualdisplay-drm-contract.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-"""Validate the packaged Vibeshine DRM source and its deterministic HDR EDID."""
+"""Validate the packaged libvirtualdisplay DRM source and its deterministic HDR EDID."""
from __future__ import annotations
@@ -56,7 +56,7 @@ def validate_edid(edid: bytes) -> None:
require(sum(block) & 0xFF == 0, f"EDID block {index} checksum is invalid")
require(decode_manufacturer(edid) == "VBS", "EDID manufacturer is not VBS")
- require(b"Vibeshine HDR" in edid[:128], "EDID monitor name is not Vibeshine HDR")
+ require(edid[113:126] == b"LizardByte VD", "invalid EDID monitor name descriptor")
require(edid[126] == 1, "base EDID does not advertise exactly one extension block")
blocks = cta_data_blocks(edid[128:])
@@ -79,30 +79,32 @@ def validate_edid(edid: bytes) -> None:
def validate_uapi_layout(driver_root: Path) -> None:
source = r"""
#include
-#include "vibeshine_drm_uapi.h"
-
-_Static_assert(sizeof(struct vibeshine_drm_wait_present) == 48, "unexpected ABI size");
-_Static_assert(offsetof(struct vibeshine_drm_wait_present, sequence) == 8, "unexpected sequence offset");
-_Static_assert(offsetof(struct vibeshine_drm_wait_present, timestamp_ns) == 16, "unexpected timestamp offset");
-_Static_assert(offsetof(struct vibeshine_drm_wait_present, timeout_ms) == 24, "unexpected timeout offset");
-_Static_assert(offsetof(struct vibeshine_drm_wait_present, reserved) == 32, "unexpected reserved offset");
-_Static_assert(sizeof(struct vibeshine_drm_frame) == 152, "unexpected frame ABI size");
-_Static_assert(offsetof(struct vibeshine_drm_frame, sequence) == 8, "unexpected frame sequence offset");
-_Static_assert(offsetof(struct vibeshine_drm_frame, modifier) == 40, "unexpected modifier offset");
-_Static_assert(offsetof(struct vibeshine_drm_frame, dma_buf_fds) == 52, "unexpected fd offset");
-_Static_assert(offsetof(struct vibeshine_drm_frame, sync_file_fds) == 100, "unexpected fence offset");
-_Static_assert(offsetof(struct vibeshine_drm_frame, reserved) == 120, "unexpected frame reserved offset");
-_Static_assert(sizeof(struct vibeshine_drm_trace_event) == 16, "unexpected trace event size");
-_Static_assert(sizeof(struct vibeshine_drm_present_trace) == 1088, "unexpected trace ABI size");
-_Static_assert(offsetof(struct vibeshine_drm_present_trace, after_sequence) == 8, "unexpected trace cursor offset");
-_Static_assert(offsetof(struct vibeshine_drm_present_trace, newest_sequence) == 16, "unexpected trace newest offset");
-_Static_assert(offsetof(struct vibeshine_drm_present_trace, count) == 24, "unexpected trace count offset");
-_Static_assert(offsetof(struct vibeshine_drm_present_trace, events) == 32, "unexpected trace events offset");
-_Static_assert(offsetof(struct vibeshine_drm_present_trace, reserved) == 1056, "unexpected trace reserved offset");
+#include "virtualdisplay_drm_uapi.h"
+
+_Static_assert(sizeof(struct virtualdisplay_drm_wait_present) == 48, "unexpected ABI size");
+_Static_assert(offsetof(struct virtualdisplay_drm_wait_present, sequence) == 8, "unexpected sequence offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_wait_present, timestamp_ns) == 16, "unexpected timestamp offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_wait_present, timeout_ms) == 24, "unexpected timeout offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_wait_present, reserved) == 32, "unexpected reserved offset");
+_Static_assert(sizeof(struct virtualdisplay_drm_frame) == 152, "unexpected frame ABI size");
+_Static_assert(offsetof(struct virtualdisplay_drm_frame, sequence) == 8, "unexpected frame sequence offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_frame, modifier) == 40, "unexpected modifier offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_frame, dma_buf_fds) == 52, "unexpected fd offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_frame, sync_file_fds) == 100, "unexpected fence offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_frame, reserved) == 120, "unexpected frame reserved offset");
+_Static_assert(sizeof(struct virtualdisplay_drm_trace_event) == 16, "unexpected trace event size");
+_Static_assert(sizeof(struct virtualdisplay_drm_present_trace) == 1088, "unexpected trace ABI size");
+_Static_assert(offsetof(struct virtualdisplay_drm_present_trace, after_sequence) == 8,
+ "unexpected trace cursor offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_present_trace, newest_sequence) == 16,
+ "unexpected trace newest offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_present_trace, count) == 24, "unexpected trace count offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_present_trace, events) == 32, "unexpected trace events offset");
+_Static_assert(offsetof(struct virtualdisplay_drm_present_trace, reserved) == 1056, "unexpected trace reserved offset");
int main(void) { return 0; }
"""
- with tempfile.TemporaryDirectory(prefix="vibeshine-drm-uapi-") as temporary_dir:
+ with tempfile.TemporaryDirectory(prefix="virtualdisplay-drm-uapi-") as temporary_dir:
source_path = Path(temporary_dir) / "uapi-layout.c"
binary_path = Path(temporary_dir) / "uapi-layout"
source_path.write_text(source, encoding="utf-8")
@@ -117,27 +119,27 @@ def validate_uapi_layout(driver_root: Path) -> None:
def validate_requested_mode_policy(driver_root: Path) -> None:
source = r"""
#include
-#include "vibeshine_drm_mode.h"
+#include "virtualdisplay_drm_mode.h"
int main(void) {
- const struct vibeshine_drm_requested_mode requested = {3024, 1890, 90000};
- struct vibeshine_drm_requested_mode doubled = {0};
- assert(vibeshine_drm_requested_mode_valid(&requested));
- assert(vibeshine_drm_doubled_mode(&requested, &doubled));
+ const struct virtualdisplay_drm_requested_mode requested = {3024, 1890, 90000};
+ struct virtualdisplay_drm_requested_mode doubled = {0};
+ assert(virtualdisplay_drm_requested_mode_valid(&requested));
+ assert(virtualdisplay_drm_doubled_mode(&requested, &doubled));
assert(doubled.width == requested.width);
assert(doubled.height == requested.height);
assert(doubled.refresh_millihz == 180000);
- const struct vibeshine_drm_requested_mode limit = {1920, 1080, 500000};
- assert(vibeshine_drm_doubled_mode(&limit, &doubled));
+ const struct virtualdisplay_drm_requested_mode limit = {1920, 1080, 500000};
+ assert(virtualdisplay_drm_doubled_mode(&limit, &doubled));
assert(doubled.refresh_millihz == 1000000);
- const struct vibeshine_drm_requested_mode over_limit = {1920, 1080, 500001};
- assert(!vibeshine_drm_doubled_mode(&over_limit, &doubled));
+ const struct virtualdisplay_drm_requested_mode over_limit = {1920, 1080, 500001};
+ assert(!virtualdisplay_drm_doubled_mode(&over_limit, &doubled));
return 0;
}
"""
- with tempfile.TemporaryDirectory(prefix="vibeshine-drm-mode-") as temporary_dir:
+ with tempfile.TemporaryDirectory(prefix="virtualdisplay-drm-mode-") as temporary_dir:
source_path = Path(temporary_dir) / "requested-mode.c"
binary_path = Path(temporary_dir) / "requested-mode"
source_path.write_text(source, encoding="utf-8")
@@ -225,7 +227,7 @@ def validate_frame_export(driver_root: Path) -> None:
return 0;
}
"""
- with tempfile.TemporaryDirectory(prefix="vibeshine-drm-export-") as temporary_dir:
+ with tempfile.TemporaryDirectory(prefix="virtualdisplay-drm-export-") as temporary_dir:
source_path = Path(temporary_dir) / "frame-export.c"
binary_path = Path(temporary_dir) / "frame-export"
source_path.write_text(source, encoding="utf-8")
@@ -291,7 +293,7 @@ def validate_implicit_frame_layout(driver_root: Path) -> None:
return 0;
}
"""
- with tempfile.TemporaryDirectory(prefix="vibeshine-drm-layout-") as temporary_dir:
+ with tempfile.TemporaryDirectory(prefix="virtualdisplay-drm-layout-") as temporary_dir:
source_path = Path(temporary_dir) / "frame-layout.c"
binary_path = Path(temporary_dir) / "frame-layout"
source_path.write_text(source, encoding="utf-8")
@@ -379,7 +381,7 @@ def validate_scanout_negotiation(driver_root: Path) -> None:
return 0;
}
"""
- with tempfile.TemporaryDirectory(prefix="vibeshine-drm-scanout-") as temporary_dir:
+ with tempfile.TemporaryDirectory(prefix="virtualdisplay-drm-scanout-") as temporary_dir:
source_path = Path(temporary_dir) / "scanout-negotiation.c"
binary_path = Path(temporary_dir) / "scanout-negotiation"
source_path.write_text(source, encoding="utf-8")
@@ -398,7 +400,7 @@ def validate_vrr_schedule(driver_root: Path) -> None:
source = r"""
#include
#include
-#include "vibeshine_drm_vrr.h"
+#include "virtualdisplay_drm_vrr.h"
typedef uint64_t u64;
typedef uint64_t ktime_t;
struct drm_vblank_crtc { int framedur_ns; } vblank;
@@ -457,7 +459,7 @@ def validate_vrr_schedule(driver_root: Path) -> None:
return 0;
}
"""
- with tempfile.TemporaryDirectory(prefix="vibeshine-drm-vrr-schedule-") as temporary_dir:
+ with tempfile.TemporaryDirectory(prefix="virtualdisplay-drm-vrr-schedule-") as temporary_dir:
source_path = Path(temporary_dir) / "vrr-schedule.c"
binary_path = Path(temporary_dir) / "vrr-schedule"
source_path.write_text(source, encoding="utf-8")
@@ -668,7 +670,7 @@ def validate_vblank_timer_overlap(driver_root: Path) -> None:
return 0;
}
"""
- with tempfile.TemporaryDirectory(prefix="vibeshine-drm-timer-overlap-") as temporary_dir:
+ with tempfile.TemporaryDirectory(prefix="virtualdisplay-drm-timer-overlap-") as temporary_dir:
source_path = Path(temporary_dir) / "timer-overlap.c"
binary_path = Path(temporary_dir) / "timer-overlap"
source_path.write_text(source, encoding="utf-8")
@@ -719,7 +721,7 @@ def validate_reboot_notifier(driver_root: Path) -> None:
return 0;
}
"""
- with tempfile.TemporaryDirectory(prefix="vibeshine-drm-reboot-") as temporary_dir:
+ with tempfile.TemporaryDirectory(prefix="virtualdisplay-drm-reboot-") as temporary_dir:
source_path = Path(temporary_dir) / "reboot-notifier.c"
binary_path = Path(temporary_dir) / "reboot-notifier"
source_path.write_text(source, encoding="utf-8")
@@ -731,9 +733,9 @@ def validate_reboot_notifier(driver_root: Path) -> None:
def validate_source_contract(driver_root: Path) -> None:
- compat_path = driver_root / "vibeshine_drm_compat.h"
+ compat_path = driver_root / "virtualdisplay_drm_compat.h"
connector_path = driver_root / "vkms_connector.c"
- mode_header_path = driver_root / "vibeshine_drm_mode.h"
+ mode_header_path = driver_root / "virtualdisplay_drm_mode.h"
driver_header_path = driver_root / "vkms_drv.h"
plane_path = driver_root / "vkms_plane.c"
configfs_path = driver_root / "vkms_configfs.c"
@@ -751,40 +753,40 @@ def validate_source_contract(driver_root: Path) -> None:
drv = drv_path.read_text(encoding="utf-8")
# Supplemental wiring checks; allocator behavior is tested by compiling
- # vibeshine_drm_dumb.c directly in linux_drm_native_allocation.
- require_source(drv, '#include "vibeshine_drm_dumb.h"', drv_path.name)
- require_source(drv, "VIBESHINE_DRM_SHMEM_DRIVER_OPS,", drv_path.name)
+ # virtualdisplay_drm_dumb.c directly in linux_drm_native_allocation.
+ require_source(drv, '#include "virtualdisplay_drm_dumb.h"', drv_path.name)
+ require_source(drv, "VIRTUALDISPLAY_DRM_SHMEM_DRIVER_OPS,", drv_path.name)
require_source((driver_root / "Makefile").read_text(encoding="utf-8"),
- "vibeshine_drm_dumb.o", "Makefile")
+ "virtualdisplay_drm_dumb.o", "Makefile")
- require_source(drv, '#include "vibeshine_drm_version.h"', drv_path.name)
- require_source(drv, "MODULE_VERSION(VIBESHINE_DRM_VERSION)", drv_path.name)
+ require_source(drv, '#include "virtualdisplay_drm_version.h"', drv_path.name)
+ require_source(drv, "MODULE_VERSION(VIRTUALDISPLAY_DRM_VERSION)", drv_path.name)
require("MODULE_VERSION(\"" not in drv,
"kernel module version must come from the package build")
for needle in (
- "VIBESHINE_DRM_MIN_KERNEL_VERSION KERNEL_VERSION(6, 16, 0)",
- "VIBESHINE_DRM_HAS_COLOR_PIPELINE",
- "VIBESHINE_DRM_HAS_BACKGROUND_COLOR",
- "VIBESHINE_DRM_HAS_VBLANK_HELPER",
- "VIBESHINE_DRM_HAS_SHARPNESS_STRENGTH",
+ "VIRTUALDISPLAY_DRM_MIN_KERNEL_VERSION KERNEL_VERSION(6, 16, 0)",
+ "VIRTUALDISPLAY_DRM_HAS_COLOR_PIPELINE",
+ "VIRTUALDISPLAY_DRM_HAS_BACKGROUND_COLOR",
+ "VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER",
+ "VIRTUALDISPLAY_DRM_HAS_SHARPNESS_STRENGTH",
"#define kzalloc_obj(P, ...) kzalloc(sizeof(P), GFP_KERNEL)",
"#define kzalloc_objs(P, COUNT, ...) kcalloc((COUNT), sizeof(P), GFP_KERNEL)",
):
require_source(compat, needle, compat_path.name)
for needle in (
- "#if VIBESHINE_DRM_HAS_VBLANK_HELPER",
+ "#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER",
"static enum hrtimer_restart vkms_vblank_simulate",
"drm_calc_timestamping_constants(crtc, &crtc->mode)",
"drm_crtc_vblank_on(crtc)",
"drm_crtc_vblank_off(crtc)",
- "#if VIBESHINE_DRM_HAS_BACKGROUND_COLOR",
+ "#if VIRTUALDISPLAY_DRM_HAS_BACKGROUND_COLOR",
):
require_source(crtc, needle, crtc_path.name)
for needle in (
- "#include \"vibeshine_drm_compat.h\"",
+ "#include \"virtualdisplay_drm_compat.h\"",
"drm_connector_attach_vrr_capable_property(&connector->base)",
"drm_connector_set_vrr_capable_property(&connector->base, true)",
"drm_connector_attach_max_bpc_property(&connector->base, 8, 16)",
@@ -792,20 +794,20 @@ def validate_source_contract(driver_root: Path) -> None:
"DRM_MODE_COLORIMETRY_BT2020_RGB",
"DRM_MODE_COLORIMETRY_BT2020_YCC",
"drm_connector_attach_colorspace_property(&connector->base)",
- "vibeshine_drm_doubled_mode(&requested, &doubled)",
+ "virtualdisplay_drm_doubled_mode(&requested, &doubled)",
"entry->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED",
"entry->type = DRM_MODE_TYPE_DRIVER;",
):
require_source(connector, needle, connector_path.name)
for needle in (
- "VIBESHINE_DRM_MAX_REFRESH_MILLIHZ / 2",
+ "VIRTUALDISPLAY_DRM_MAX_REFRESH_MILLIHZ / 2",
"doubled->refresh_millihz *= 2",
- "vibeshine_drm_requested_mode_clock_khz",
+ "virtualdisplay_drm_requested_mode_clock_khz",
):
require_source(mode_header, needle, mode_header_path.name)
require(
re.search(
- r"#if VIBESHINE_DRM_HAS_VBLANK_HELPER\s+"
+ r"#if VIRTUALDISPLAY_DRM_HAS_VBLANK_HELPER\s+"
r"ret = drm_connector_attach_vrr_capable_property\(&connector->base\);.*?"
r"drm_connector_set_vrr_capable_property\(&connector->base, true\);\s+"
r"#endif",
@@ -847,7 +849,7 @@ def validate_source_contract(driver_root: Path) -> None:
)
require_source(driver_header, "bool frame_mapped", driver_header_path.name)
require_source(driver_header, "struct drm_framebuffer *present_fb", driver_header_path.name)
- require_source(driver_header, "struct vibeshine_drm_trace_event *present_trace", driver_header_path.name)
+ require_source(driver_header, "struct virtualdisplay_drm_trace_event *present_trace", driver_header_path.name)
require_source(driver_header, "atomic64_t synthetic_vblank_counter", driver_header_path.name)
require_source(driver_header, "struct hrtimer vrr_hrtimer", driver_header_path.name)
require_source(driver_header, "struct mutex shutdown_lock", driver_header_path.name)
@@ -893,8 +895,8 @@ def validate_source_contract(driver_root: Path) -> None:
require(failed_delivery < crtc.index("return false;", failed_delivery) < composer_read,
"rejected vblank delivery can still queue composer work")
for needle in (
- "DRM_IOCTL_DEF_DRV(VIBESHINE_GET_FRAME, drm_invalid_op, 0)",
- "DRM_IOCTL_DEF_DRV(VIBESHINE_GET_PRESENT_TRACE, vkms_get_present_trace_ioctl, 0)",
+ "DRM_IOCTL_DEF_DRV(VIRTUALDISPLAY_GET_FRAME, drm_invalid_op, 0)",
+ "DRM_IOCTL_DEF_DRV(VIRTUALDISPLAY_GET_PRESENT_TRACE, vkms_get_present_trace_ioctl, 0)",
"obj->import_attach->dmabuf",
"vkms_frame_reserve_fd(&export->descriptors,",
"drm_framebuffer_get(new_present_fb)",
@@ -910,7 +912,7 @@ def validate_source_contract(driver_root: Path) -> None:
require_source(drv, needle, drv_path.name)
require("vkms_wait_for_vrr_presentation_slot" not in drv and
"schedule_hrtimeout" not in drv and
- "vibeshine_drm_vrr_presentation_deadline_ns" not in drv,
+ "virtualdisplay_drm_vrr_presentation_deadline_ns" not in drv,
"commit publication adds a second refresh clock after flip completion")
tail_start = drv.index("static void vkms_atomic_commit_tail(")
tail_end = drv.index("static const struct drm_driver", tail_start)
@@ -961,10 +963,10 @@ def validate_source_contract(driver_root: Path) -> None:
require_source(configfs, "connector->config->connector->base.name", configfs_path.name)
require_source(configfs, "vkms_trigger_connector_hotplug", configfs_path.name)
- require(re.search(r'\.ci_name\s*=\s*"vibeshine-drm"', configfs) is not None,
- "configfs root is not named vibeshine-drm")
+ require(re.search(r'\.ci_name\s*=\s*"virtualdisplay-drm"', configfs) is not None,
+ "configfs root is not named virtualdisplay-drm")
require("connector_cfg->status = connector_status_disconnected" in config,
- "new Vibeshine DRM connectors do not default to disconnected")
+ "new libvirtualdisplay DRM connectors do not default to disconnected")
exported = []
for source_path in sorted(driver_root.rglob("*")):
@@ -983,13 +985,13 @@ def main() -> int:
driver_root = Path(sys.argv[1]).resolve()
generator = driver_root / "generate_hdr_edid.py"
- header = driver_root / "vibeshine_hdr_edid.h"
+ header = driver_root / "virtualdisplay_drm_hdr_edid.h"
require(generator.is_file(), f"missing EDID generator: {generator}")
require(header.is_file(), f"missing generated EDID header: {header}")
subprocess.run([sys.executable, str(generator), "--check", str(header)], check=True)
- with tempfile.TemporaryDirectory(prefix="vibeshine-drm-contract-") as temporary_dir:
- binary = Path(temporary_dir) / "vibeshine-hdr.bin"
+ with tempfile.TemporaryDirectory(prefix="virtualdisplay-drm-contract-") as temporary_dir:
+ binary = Path(temporary_dir) / "virtualdisplay-hdr.bin"
subprocess.run([sys.executable, str(generator), "--binary", str(binary)], check=True)
validate_edid(binary.read_bytes())
@@ -1009,7 +1011,7 @@ def main() -> int:
tail = tail[:tail.index("static const struct drm_driver")]
require(tail.index("vkms_capture_wait(") < tail.index("drm_atomic_helper_commit_modeset_disables("),
"commit tail must wait for capture before scanout replacement")
- capture = (driver_root / "vibeshine_drm_capture.h").read_text(encoding="utf-8")
+ capture = (driver_root / "virtualdisplay_drm_capture.h").read_text(encoding="utf-8")
require("state->readers && !nonblock" in capture,
"blocking capture admission must reject existing readers")
configfs = (driver_root / "vkms_configfs.c").read_text(encoding="utf-8")
@@ -1028,7 +1030,7 @@ def main() -> int:
shutdown_release_pattern = r"if \(vkms_shutdown_release\(vkmsdev\)\)\s*return -EBUSY;.*?devres_release_group"
require(re.search(shutdown_release_pattern, destroy, re.DOTALL) is not None,
"failed shutdown must preserve device resources")
- require("DRM_IOCTL_DEF_DRV(VIBESHINE_GET_FRAME_LEASED" in driver,
+ require("DRM_IOCTL_DEF_DRV(VIRTUALDISPLAY_GET_FRAME_LEASED" in driver,
"leased frame export is not registered")
wrapper = (driver_root / "vkms_capture.c").read_text(encoding="utf-8")
require(".mmap =" not in wrapper and ".vmap =" not in wrapper,
@@ -1057,7 +1059,7 @@ def main() -> int:
validate_scanout_negotiation(driver_root)
validate_vrr_schedule(driver_root)
validate_vblank_timer_overlap(driver_root)
- print("Vibeshine DRM source and HDR EDID contract: PASS")
+ print("libvirtualdisplay DRM source and HDR EDID contract: PASS")
return 0
@@ -1065,5 +1067,5 @@ def main() -> int:
try:
raise SystemExit(main())
except (ContractError, OSError, subprocess.CalledProcessError) as error:
- print(f"Vibeshine DRM source contract failed: {error}", file=sys.stderr)
+ print(f"libvirtualdisplay DRM source contract failed: {error}", file=sys.stderr)
raise SystemExit(1) from error
diff --git a/tests/linux/test-vibeshine-drm-install.sh b/tests/linux/test-virtualdisplay-drm-install.sh
similarity index 94%
rename from tests/linux/test-vibeshine-drm-install.sh
rename to tests/linux/test-virtualdisplay-drm-install.sh
index 8ca5dec..aa6959e 100755
--- a/tests/linux/test-vibeshine-drm-install.sh
+++ b/tests/linux/test-virtualdisplay-drm-install.sh
@@ -5,7 +5,7 @@
set -euo pipefail
-INSTALLER_UNDER_TEST=${1:?usage: test-vibeshine-drm-install.sh /path/to/vibeshine-drm-install}
+INSTALLER_UNDER_TEST=${1:?usage: test-virtualdisplay-drm-install.sh /path/to/virtualdisplay-drm-install}
TEST_SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
TEST_ROOT=$(mktemp -d)
@@ -36,7 +36,7 @@ assert_contains() {
fi
}
-TEST_SOURCE="$TEST_ROOT/vibeshine-drm-$MODULE_VERSION"
+TEST_SOURCE="$TEST_ROOT/virtualdisplay-drm-$MODULE_VERSION"
TEST_STATE="$TEST_ROOT/state"
TEST_MODULES="$TEST_ROOT/modules"
TEST_SYS_MODULE="$TEST_ROOT/sys-module"
@@ -49,14 +49,14 @@ TEST_MOK_VARIABLES="$TEST_ROOT/mok-variables"
TEST_LOCKDOWN_FILE="$TEST_ROOT/lockdown"
TEST_SIG_ENFORCE_FILE="$TEST_ROOT/sig-enforce"
TEST_DKMS_CONFIG="$TEST_ROOT/dkms-config"
-TEST_KERNEL="6.16.0-vibeshine"
+TEST_KERNEL="6.16.0-virtualdisplay"
mkdir -p -- "$TEST_SOURCE" "$TEST_MODULES/$TEST_KERNEL/build/scripts" "$TEST_SYS_MODULE" \
"$TEST_BUILD_TMP" "$TEST_EFI_FIRMWARE" "$TEST_EFI_VARS" "$TEST_DKMS_CONFIG/framework.conf.d"
-printf 'obj-m += vibeshine_drm.o\n' >"$TEST_SOURCE/Makefile"
-printf 'PACKAGE_NAME="vibeshine-drm"\n' >"$TEST_SOURCE/dkms.conf"
+printf 'obj-m += virtualdisplay_drm.o\n' >"$TEST_SOURCE/Makefile"
+printf 'PACKAGE_NAME="virtualdisplay-drm"\n' >"$TEST_SOURCE/dkms.conf"
printf '/* test source */\n' >"$TEST_SOURCE/vkms_drv.c"
printf 'all:\n' >"$TEST_MODULES/$TEST_KERNEL/build/Makefile"
-cp -- "$TEST_SCRIPT_DIR/../../linux/vibeshine-drm/build-module" "$TEST_SOURCE/build-module"
+cp -- "$TEST_SCRIPT_DIR/../../linux/virtualdisplay-drm/build-module" "$TEST_SOURCE/build-module"
chmod 0755 "$TEST_SOURCE/build-module"
cat >"$TEST_MODULES/$TEST_KERNEL/build/scripts/sign-file" <<'EOF'
#!/usr/bin/env bash
@@ -130,9 +130,9 @@ test_dkms_install() (
((SIGNATURE_MATCH == 1))
}
- mkdir -- "$TEST_ROOT/vibeshine-drm-0.9.0"
+ mkdir -- "$TEST_ROOT/virtualdisplay-drm-0.9.0"
install_module || fail "DKMS installation failed"
- [[ ! -e "$TEST_ROOT/vibeshine-drm-0.9.0" ]] || fail "obsolete source tree remains"
+ [[ ! -e "$TEST_ROOT/virtualdisplay-drm-0.9.0" ]] || fail "obsolete source tree remains"
assert_contains "$DKMS_CALLS" "remove -m $DKMS_NAME -v 0.9.0 --all"
install_module || fail "idempotent DKMS installation failed"
[[ $(grep -c '^install ' "$DKMS_CALLS") -eq 1 ]] || fail "DKMS installed more than once"
@@ -170,7 +170,8 @@ test_direct_install() (
printf 'modprobe %s\n' "$*" >>"$DIRECT_CALLS"
}
verify_module_signature_matches_certificate() {
- grep -F -- "signed:sha256" "$1" >/dev/null
+ local module=$1
+ grep -F -- "signed:sha256" "$module" >/dev/null
}
install_module || fail "direct installation failed"
@@ -194,7 +195,7 @@ test_direct_install() (
MODULE_SOURCE_ID=$(printf 'c%.0s' {1..64})
install_module || fail "same-version direct refresh failed"
[[ $(grep -c '^build-helper ' "$DIRECT_CALLS") -eq 4 ]] || fail "changed direct source was not rebuilt"
- if compgen -G "$BUILD_TMP_ROOT/vibeshine-drm-build.*" >/dev/null; then
+ if compgen -G "$BUILD_TMP_ROOT/virtualdisplay-drm-build.*" >/dev/null; then
fail "temporary direct-build directory was not cleaned"
fi
@@ -207,7 +208,7 @@ test_direct_install() (
)
test_unsupported_kernel_stops_before_side_effects() (
- UNSUPPORTED_KERNEL="6.15.99-vibeshine"
+ UNSUPPORTED_KERNEL="6.15.99-virtualdisplay"
UNSUPPORTED_LOG="$TEST_ROOT/unsupported-kernel.log"
UNSUPPORTED_MOK_KEY="$TEST_ROOT/unsupported-dkms/mok.key"
UNSUPPORTED_MOK_CERTIFICATE="$TEST_ROOT/unsupported-dkms/mok.pub"
@@ -232,7 +233,7 @@ test_unsupported_kernel_stops_before_side_effects() (
assert_contains "$UNSUPPORTED_LOG" "managed virtual displays require Linux 6.16 or newer"
assert_contains "$UNSUPPORTED_LOG" "the running kernel is ${UNSUPPORTED_KERNEL} and is unsupported"
assert_contains "$UNSUPPORTED_LOG" "install and boot a supported Linux kernel"
- assert_contains "$UNSUPPORTED_LOG" "Vibeshine was installed, but its virtual-display driver was not"
+ assert_contains "$UNSUPPORTED_LOG" "libvirtualdisplay was installed, but its DRM module was not"
[[ ! -e "$UNSUPPORTED_MOK_KEY" && ! -e "$UNSUPPORTED_MOK_CERTIFICATE" ]] ||
fail "unsupported kernel created signing files"
)
@@ -308,9 +309,9 @@ test_status_reports_kernel_requirements() (
test_obsolete_direct_cleanup() (
OLD_KERNEL="6.98.0-old"
- OLD_SOURCE="$TEST_ROOT/vibeshine-drm-0.8.0"
- UNMANAGED_SOURCE="$TEST_ROOT/vibeshine-drm-backup"
- OLD_DESTINATION="$TEST_MODULES/$OLD_KERNEL/updates/vibeshine/$MODULE_NAME.ko"
+ OLD_SOURCE="$TEST_ROOT/virtualdisplay-drm-0.8.0"
+ UNMANAGED_SOURCE="$TEST_ROOT/virtualdisplay-drm-backup"
+ OLD_DESTINATION="$TEST_MODULES/$OLD_KERNEL/updates/virtualdisplay/$MODULE_NAME.ko"
OLD_MARKER="$TEST_STATE/direct-0.8.0-$OLD_KERNEL"
mkdir -p -- "$OLD_SOURCE" "$UNMANAGED_SOURCE" "${OLD_DESTINATION%/*}" "$TEST_STATE"
printf 'old module\n' >"$OLD_DESTINATION"
@@ -343,11 +344,10 @@ test_dkms_failure_falls_back() (
status)
return 0
;;
- add)
+ *)
return 1
;;
esac
- return 1
}
run_build_helper() {
local build_workdir=$1
@@ -359,7 +359,8 @@ test_dkms_failure_falls_back() (
:
}
verify_module_signature_matches_certificate() {
- [[ -f "$1" ]] || return 1
+ local module=$1
+ [[ -f "$module" ]] || return 1
}
install_module || fail "direct fallback after DKMS failure failed"
@@ -411,7 +412,8 @@ test_dkms_signing_mismatch_falls_back() (
return 0
}
verify_module_signature_matches_certificate() {
- [[ -f "$1" ]]
+ local module=$1
+ [[ -f "$module" ]]
}
installed_module_matches_signing_certificate() {
return 0
@@ -561,7 +563,10 @@ test_enrollment_requires_current_shim_boot() (
mokutil() {
case ${1:-} in
--list-enrolled | --list-new) return 0 ;;
- --import) printf 'import %s\n' "$2" >>"$ENROLL_CALLS" ;;
+ --import)
+ local certificate=$2
+ printf 'import %s\n' "$certificate" >>"$ENROLL_CALLS"
+ ;;
--trust-mok) printf 'trust-mok\n' >>"$ENROLL_CALLS" ;;
--help) printf '%s\n' ' --trust-mok' ;;
*) return 1 ;;
@@ -693,4 +698,4 @@ test_package_install_auto_enrollment
test_package_enrollment_requires_terminal
test_loaded_module_freshness
-printf 'PASS: vibeshine-drm installer shell tests\n'
+printf 'PASS: virtualdisplay-drm installer shell tests\n'
diff --git a/tests/linux/test-vibeshine-vkms.sh b/tests/linux/test-virtualdisplay-vkms.sh
similarity index 83%
rename from tests/linux/test-vibeshine-vkms.sh
rename to tests/linux/test-virtualdisplay-vkms.sh
index 37f849c..dee8f5e 100755
--- a/tests/linux/test-vibeshine-vkms.sh
+++ b/tests/linux/test-virtualdisplay-vkms.sh
@@ -2,14 +2,18 @@
set -euo pipefail
-SCRIPT_UNDER_TEST=${1:?usage: test-vibeshine-vkms.sh /path/to/vibeshine-vkms}
+readonly CONNECT_VIRTUAL_2='connect Virtual-2'
+readonly DISCONNECT_VIRTUAL_2='disconnect Virtual-2'
+readonly INVALID_CONNECTOR='ERROR invalid connector'
+
+SCRIPT_UNDER_TEST=${1:?usage: test-virtualdisplay-vkms.sh /path/to/virtualdisplay-vkms}
PACKAGING_DIR=$(dirname -- "$SCRIPT_UNDER_TEST")
-SOCKET_UNIT="$PACKAGING_DIR/vibeshine-vkms-control.socket.in"
-CONNECTION_SERVICE="$PACKAGING_DIR/vibeshine-vkms-control@.service.in"
-SYSUSERS_FILE="$PACKAGING_DIR/vibeshine-vkms.sysusers"
-QUIESCE_HELPER="$PACKAGING_DIR/vibeshine-vkms-quiesce"
-SERVICE_UNIT="$PACKAGING_DIR/vibeshine-vkms.service.in"
-SETUP_SERVICE="$PACKAGING_DIR/vibeshine-drm-setup.service.in"
+SOCKET_UNIT="$PACKAGING_DIR/virtualdisplay-vkms-control.socket.in"
+CONNECTION_SERVICE="$PACKAGING_DIR/virtualdisplay-vkms-control@.service.in"
+SYSUSERS_FILE="$PACKAGING_DIR/virtualdisplay-vkms.sysusers"
+QUIESCE_HELPER="$PACKAGING_DIR/virtualdisplay-vkms-quiesce"
+SERVICE_UNIT="$PACKAGING_DIR/virtualdisplay-vkms.service.in"
+SETUP_SERVICE="$PACKAGING_DIR/virtualdisplay-drm-setup.service.in"
TEST_ROOT=$(mktemp -d)
cleanup_test_root() {
@@ -29,16 +33,16 @@ fail() {
[[ -f "$CONNECTION_SERVICE" ]] || fail "missing connection service: ${CONNECTION_SERVICE}"
[[ -f "$SYSUSERS_FILE" ]] || fail "missing sysusers file: ${SYSUSERS_FILE}"
[[ -x "$QUIESCE_HELPER" ]] || fail "missing quiesce helper: ${QUIESCE_HELPER}"
-grep -Fq '/vibeshine-vkms-quiesce' "$SERVICE_UNIT" || fail 'pool service must quiesce the driver after its shutdown-aware stop'
+grep -Fq '/virtualdisplay-vkms-quiesce' "$SERVICE_UNIT" || fail 'pool service must quiesce the driver after its shutdown-aware stop'
grep -Fq 'Before=systemd-user-sessions.service display-manager.service' "$SERVICE_UNIT" || \
fail 'pool service must remain active until all graphical user sessions have stopped'
-grep -Fxq 'RuntimeDirectory=vibeshine/vkms-leases' "$SERVICE_UNIT" || \
+grep -Fxq 'RuntimeDirectory=virtualdisplay/vkms-leases' "$SERVICE_UNIT" || \
fail 'pool service must provision the broker lease directory before accepting connections'
grep -Fxq 'RuntimeDirectoryMode=0700' "$SERVICE_UNIT" || \
fail 'broker lease directory must remain root-private'
-grep -Fxq 'g vibeshine-vkms - -' "$SYSUSERS_FILE" || fail 'sysusers file must provision the dedicated socket group'
+grep -Fxq 'g virtualdisplay-vkms - -' "$SYSUSERS_FILE" || fail 'sysusers file must provision the dedicated socket group'
grep -Fxq 'Accept=yes' "$SOCKET_UNIT" || fail 'control socket must use one service instance per connection'
-grep -Fxq 'SocketGroup=vibeshine-vkms' "$SOCKET_UNIT" || fail 'control socket must use its dedicated access group'
+grep -Fxq 'SocketGroup=virtualdisplay-vkms' "$SOCKET_UNIT" || fail 'control socket must use its dedicated access group'
grep -Fxq 'MaxConnections=16' "$SOCKET_UNIT" || fail 'control socket must cap concurrent root helpers'
grep -Fxq 'MaxConnectionsPerSource=4' "$SOCKET_UNIT" || fail 'control socket must cap each peer source'
grep -Fxq 'RuntimeMaxSec=5s' "$CONNECTION_SERVICE" || fail 'control helper must have a runtime deadline'
@@ -56,8 +60,8 @@ fi
if grep -Eq '^Service=' "$SOCKET_UNIT"; then
fail 'Accept=yes control socket must derive its matching @.service template'
fi
-grep -Fq '/vibeshine-vkms-peercred ' "$CONNECTION_SERVICE" || fail 'control service must obtain peer credentials before invoking the broker'
-if grep -Fxq 'ExecStart=@VIBESHINE_PRIVILEGED_LIBEXEC_INSTALL_DIR@/vibeshine-vkms control' "$CONNECTION_SERVICE"; then
+grep -Fq '/virtualdisplay-vkms-peercred ' "$CONNECTION_SERVICE" || fail 'control service must obtain peer credentials before invoking the broker'
+if grep -Fxq 'ExecStart=@VIRTUALDISPLAY_PRIVILEGED_LIBEXEC_INSTALL_DIR@/virtualdisplay-vkms control' "$CONNECTION_SERVICE"; then
fail 'control service must not invoke the root broker without peer credentials'
fi
@@ -82,7 +86,7 @@ assert_link_target() {
}
CONFIGFS_TEST_ROOT="$TEST_ROOT/configfs"
-mkdir -p -- "$CONFIGFS_TEST_ROOT/vibeshine-drm"
+mkdir -p -- "$CONFIGFS_TEST_ROOT/virtualdisplay-drm"
configure_paths "$CONFIGFS_TEST_ROOT"
configure_lease_paths "$TEST_ROOT/vkms-leases"
# The sourced helper functions consume this test-only switch.
@@ -109,7 +113,7 @@ assert_file_value "$LEASE_ROOT/Virtual-4.owner" "$OWNER_UID"
if response=$(printf 'connect Virtual-6\n' | control_connection "$OWNER_UID"); then
fail "legacy pool advertised an unprovisioned output"
fi
-[[ "$response" == "ERROR invalid connector" ]] || fail "unexpected legacy-capacity rejection: $response"
+[[ "$response" == "$INVALID_CONNECTOR" ]] || fail "unexpected legacy-capacity rejection: $response"
remove_pool || fail "safe legacy fixture removal failed"
[[ ! -e "$LEASE_ROOT/Virtual-4.owner" ]] || fail "legacy removal left an ownership lease"
@@ -140,7 +144,7 @@ configfs_is_mounted() {
OWNER_UID=11001
OTHER_UID=11002
LEASE_PATH="$LEASE_ROOT/Virtual-2.owner"
-response=$(printf 'connect Virtual-2\n' | control_connection "$OWNER_UID") || fail "connect request failed"
+response=$(printf '%s\n' "$CONNECT_VIRTUAL_2" | control_connection "$OWNER_UID") || fail "connect request failed"
[[ "$response" == "OK connected Virtual-2" ]] || fail "unexpected connect response: ${response}"
assert_file_value "$VKMS_DEVICE_DIR/connectors/Virtual-2/status" "$CONNECTOR_STATUS_CONNECTED"
assert_file_value "$LEASE_PATH" "$OWNER_UID"
@@ -155,11 +159,11 @@ response=$(printf 'status Virtual-2\n' | control_connection "$OTHER_UID") || fai
[[ "$response" == "STATUS connected Virtual-2" ]] || fail "unexpected status response: ${response}"
assert_file_value "$LEASE_PATH" "$OWNER_UID"
-if response=$(printf 'connect Virtual-2\n' | control_connection "$OTHER_UID"); then
+if response=$(printf '%s\n' "$CONNECT_VIRTUAL_2" | control_connection "$OTHER_UID"); then
fail "cross-uid connect request succeeded"
fi
[[ "$response" == "ERROR connector owned by another uid" ]] || fail "unexpected cross-uid connect response: ${response}"
-if response=$(printf 'disconnect Virtual-2\n' | control_connection "$OTHER_UID"); then
+if response=$(printf '%s\n' "$DISCONNECT_VIRTUAL_2" | control_connection "$OTHER_UID"); then
fail "cross-uid disconnect request succeeded"
fi
[[ "$response" == "ERROR connector owned by another uid" ]] || fail "unexpected cross-uid disconnect response: ${response}"
@@ -180,27 +184,27 @@ for group in planes crtcs encoders connectors; do
[[ $count -eq $VKMS_OUTPUT_COUNT ]] || fail "${group}: expected ${VKMS_OUTPUT_COUNT} items after restart, found ${count}"
done
-response=$(printf 'disconnect Virtual-2\n' | control_connection 0) || fail "root handoff disconnect failed"
+response=$(printf '%s\n' "$DISCONNECT_VIRTUAL_2" | control_connection 0) || fail "root handoff disconnect failed"
[[ "$response" == "OK disconnected Virtual-2" ]] || fail "unexpected root handoff response: ${response}"
assert_file_value "$VKMS_DEVICE_DIR/connectors/Virtual-2/status" "$CONNECTOR_STATUS_DISCONNECTED"
[[ ! -e "$LEASE_PATH" ]] || fail "root handoff left the prior ownership lease behind"
-response=$(printf 'connect Virtual-2\n' | control_connection "$OTHER_UID") || fail "new owner connect failed"
+response=$(printf '%s\n' "$CONNECT_VIRTUAL_2" | control_connection "$OTHER_UID") || fail "new owner connect failed"
assert_file_value "$LEASE_PATH" "$OTHER_UID"
-response=$(printf 'disconnect Virtual-2\n' | control_connection "$OTHER_UID") || fail "owner release failed"
+response=$(printf '%s\n' "$DISCONNECT_VIRTUAL_2" | control_connection "$OTHER_UID") || fail "owner release failed"
[[ "$response" == "OK disconnected Virtual-2" ]] || fail "unexpected owner release response: ${response}"
[[ ! -e "$LEASE_PATH" ]] || fail "owner release left its lease behind"
# Model an interrupted disconnect: configfs reached disconnected, but the
# owner file was not removed. The next connect may safely reclaim it because a
# disconnected output cannot still be controlled by the old session.
-response=$(printf 'connect Virtual-2\n' | control_connection "$OWNER_UID") || fail "stale lease setup failed"
+response=$(printf '%s\n' "$CONNECT_VIRTUAL_2" | control_connection "$OWNER_UID") || fail "stale lease setup failed"
printf '%s\n' "$CONNECTOR_STATUS_DISCONNECTED" >"$VKMS_DEVICE_DIR/connectors/Virtual-2/status"
assert_file_value "$LEASE_PATH" "$OWNER_UID"
-response=$(printf 'connect Virtual-2\n' | control_connection "$OTHER_UID") || fail "stale lease reclamation failed"
+response=$(printf '%s\n' "$CONNECT_VIRTUAL_2" | control_connection "$OTHER_UID") || fail "stale lease reclamation failed"
[[ "$response" == "OK connected Virtual-2" ]] || fail "unexpected stale lease response: ${response}"
assert_file_value "$LEASE_PATH" "$OTHER_UID"
-response=$(printf 'disconnect Virtual-2\n' | control_connection "$OTHER_UID") || fail "stale lease test cleanup failed"
+response=$(printf '%s\n' "$DISCONNECT_VIRTUAL_2" | control_connection "$OTHER_UID") || fail "stale lease test cleanup failed"
[[ ! -e "$LEASE_PATH" ]] || fail "stale lease test cleanup left an owner file"
response=$(printf 'status Virtual-2\n' | control_connection "$OWNER_UID") || fail "disconnected status request failed"
@@ -222,7 +226,7 @@ for unmapped_connector in Virtual-9 Virtual-10; do
if response=$(printf 'connect %s\n' "$unmapped_connector" | control_connection "$OWNER_UID"); then
fail "unmapped public connector unexpectedly resolved: $unmapped_connector"
fi
- [[ "$response" == "ERROR invalid connector" ]] || fail "unexpected unmapped connector response: ${response}"
+ [[ "$response" == "$INVALID_CONNECTOR" ]] || fail "unexpected unmapped connector response: ${response}"
done
for invalid_mode in \
@@ -273,7 +277,7 @@ for ((slot = 1; slot <= VKMS_OUTPUT_COUNT; ++slot)); do
fi
printf 'Virtual-%s\n' "$public_id" >"$VKMS_DEVICE_DIR/connectors/Virtual-${slot}/drm_name"
done
-response=$(printf 'connect Virtual-2\n' | control_connection "$OWNER_UID") || fail "offset public connector failed to map"
+response=$(printf '%s\n' "$CONNECT_VIRTUAL_2" | control_connection "$OWNER_UID") || fail "offset public connector failed to map"
[[ "$response" == "OK connected Virtual-2" ]] || fail "broker did not echo public DRM name"
assert_file_value "$VKMS_DEVICE_DIR/connectors/Virtual-1/status" "$CONNECTOR_STATUS_CONNECTED"
assert_file_value "$LEASE_ROOT/Virtual-1.owner" "$OWNER_UID"
@@ -283,17 +287,17 @@ response=$(printf 'mode Virtual-2 3024 1890 90000\n' | control_connection "$OWNE
assert_file_value "$VKMS_DEVICE_DIR/connectors/Virtual-1/requested_mode" "3024 1890 90000"
response=$(printf 'status Virtual-2\n' | control_connection "$OTHER_UID") || fail "offset public status request failed"
[[ "$response" == "STATUS connected Virtual-2" ]] || fail "status reply did not echo public DRM name"
-response=$(printf 'disconnect Virtual-2\n' | control_connection "$OWNER_UID") || fail "offset public release failed"
+response=$(printf '%s\n' "$DISCONNECT_VIRTUAL_2" | control_connection "$OWNER_UID") || fail "offset public release failed"
[[ "$response" == "OK disconnected Virtual-2" ]] || fail "disconnect reply did not echo public DRM name"
[[ ! -e "$LEASE_ROOT/Virtual-1.owner" ]] || fail "resolved logical-slot lease remained after disconnect"
if response=$(printf 'connect Virtual-1\n' | control_connection "$OWNER_UID"); then
fail "unmapped Virtual-1 fell back to a same-name logical slot"
fi
-[[ "$response" == "ERROR invalid connector" ]] || fail "unexpected unmapped Virtual-1 response"
+[[ "$response" == "$INVALID_CONNECTOR" ]] || fail "unexpected unmapped Virtual-1 response"
if response=$(printf 'connect Virtual-3\n' | control_connection "$OWNER_UID"); then
fail "noncontiguous mapping accepted an absent public DRM name"
fi
-[[ "$response" == "ERROR invalid connector" ]] || fail "unexpected noncontiguous mapping response"
+[[ "$response" == "$INVALID_CONNECTOR" ]] || fail "unexpected noncontiguous mapping response"
response=$(printf 'connect Virtual-10\n' | control_connection "$OWNER_UID") || fail "highest offset pool name did not map"
[[ "$response" == "OK connected Virtual-10" ]] || fail "highest offset response was not preserved"
assert_file_value "$VKMS_DEVICE_DIR/connectors/Virtual-8/status" "$CONNECTOR_STATUS_CONNECTED"
@@ -305,16 +309,16 @@ response=$(printf 'disconnect Virtual-10\n' | control_connection "$OWNER_UID") |
# Missing mapping data (including an older loaded driver) and duplicate DRM
# names must fail closed without touching any connector or lease.
mv -- "$VKMS_DEVICE_DIR/connectors/Virtual-8/drm_name" "$TEST_ROOT/Virtual-8.drm_name"
-if response=$(printf 'connect Virtual-2\n' | control_connection "$OWNER_UID"); then
+if response=$(printf '%s\n' "$CONNECT_VIRTUAL_2" | control_connection "$OWNER_UID"); then
fail "control continued with an incomplete DRM-name mapping"
fi
-[[ "$response" == "ERROR invalid connector" ]] || fail "unexpected missing-mapping response"
+[[ "$response" == "$INVALID_CONNECTOR" ]] || fail "unexpected missing-mapping response"
mv -- "$TEST_ROOT/Virtual-8.drm_name" "$VKMS_DEVICE_DIR/connectors/Virtual-8/drm_name"
printf 'Virtual-2\n' >"$VKMS_DEVICE_DIR/connectors/Virtual-2/drm_name"
-if response=$(printf 'connect Virtual-2\n' | control_connection "$OWNER_UID"); then
+if response=$(printf '%s\n' "$CONNECT_VIRTUAL_2" | control_connection "$OWNER_UID"); then
fail "control accepted a duplicate DRM-name mapping"
fi
-[[ "$response" == "ERROR invalid connector" ]] || fail "unexpected duplicate-mapping response"
+[[ "$response" == "$INVALID_CONNECTOR" ]] || fail "unexpected duplicate-mapping response"
assert_file_value "$VKMS_DEVICE_DIR/connectors/Virtual-1/status" "$CONNECTOR_STATUS_DISCONNECTED"
[[ ! -e "$LEASE_ROOT/Virtual-1.owner" ]] || fail "ambiguous mapping created a lease"
for ((slot = 1; slot <= VKMS_OUTPUT_COUNT; ++slot)); do
@@ -369,13 +373,13 @@ assert_file_value "$VKMS_DEVICE_DIR/enabled" 1
[[ -d "$VKMS_DEVICE_DIR/connectors/Virtual-1" ]] || fail "global shutdown removed the live DRM pool"
assert_file_value "$LEASE_ROOT/Virtual-4.owner" "$OWNER_UID"
-QUIESCE_TEST_PATH="$TEST_ROOT/sysfs/vibeshine/quiesce"
+QUIESCE_TEST_PATH="$TEST_ROOT/sysfs/virtualdisplay/quiesce"
mkdir -p -- "$(dirname -- "$QUIESCE_TEST_PATH")"
printf '0\n' >"$QUIESCE_TEST_PATH"
-VIBESHINE_SYSTEM_STATE=running VIBESHINE_VKMS_QUIESCE_PATH="$QUIESCE_TEST_PATH" \
+VIRTUALDISPLAY_SYSTEM_STATE=running VIRTUALDISPLAY_VKMS_QUIESCE_PATH="$QUIESCE_TEST_PATH" \
"$QUIESCE_HELPER" || fail "non-shutdown quiesce helper failed"
assert_file_value "$QUIESCE_TEST_PATH" 0
-VIBESHINE_SYSTEM_STATE=stopping VIBESHINE_VKMS_QUIESCE_PATH="$QUIESCE_TEST_PATH" \
+VIRTUALDISPLAY_SYSTEM_STATE=stopping VIRTUALDISPLAY_VKMS_QUIESCE_PATH="$QUIESCE_TEST_PATH" \
"$QUIESCE_HELPER" || fail "shutdown quiesce helper failed"
assert_file_value "$QUIESCE_TEST_PATH" 1
@@ -395,8 +399,8 @@ modprobe() {
return 1
}
if ensure_display_backend >/dev/null 2>&1; then
- fail "backend detection succeeded without vibeshine_drm"
+ fail "backend detection succeeded without virtualdisplay_drm"
fi
[[ ! -e "$VKMS_DEVICE_DIR" ]] || fail "managed pool appeared on module failure"
-printf 'PASS: vibeshine-vkms shell tests\n'
+printf 'PASS: virtualdisplay-vkms shell tests\n'
diff --git a/tests/linux/test-vkms-peercred.py b/tests/linux/test-vkms-peercred.py
index edeffe4..9ab8388 100644
--- a/tests/linux/test-vkms-peercred.py
+++ b/tests/linux/test-vkms-peercred.py
@@ -11,7 +11,7 @@ def fail(message: str) -> None:
if len(sys.argv) != 2:
- fail("usage: test-vkms-peercred.py /path/to/vibeshine-vkms-peercred")
+ fail("usage: test-vkms-peercred.py /path/to/virtualdisplay-vkms-peercred")
helper = os.path.abspath(sys.argv[1])
parent_socket, child_socket = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
@@ -44,4 +44,4 @@ def fail(message: str) -> None:
if result.returncode == 0:
fail("non-socket standard input was accepted")
-print("PASS: vibeshine-vkms SO_PEERCRED tests")
+print("PASS: virtualdisplay-vkms SO_PEERCRED tests")
diff --git a/tests/unit/driver/test_cli_contract.cpp b/tests/unit/driver/test_cli_contract.cpp
index ee79e70..6ac208b 100644
--- a/tests/unit/driver/test_cli_contract.cpp
+++ b/tests/unit/driver/test_cli_contract.cpp
@@ -168,7 +168,7 @@ TEST(VirtualDisplayCliContract, RoutesPublicDisplayCommandsThroughBrokerIpc) {
const auto permanent_off = vdd::cli_broker_route_for_args({"permanent", "off"});
EXPECT_EQ(permanent_off.action, vdd::CliBrokerRouteAction::RequireBrokerCommand);
- EXPECT_EQ(permanent_off.command, "permanent-set 0 1920 1080 600 340 60000 Sunshine Display");
+ EXPECT_EQ(permanent_off.command, "permanent-set 0 1920 1080 600 340 60000 LizardByte VD");
EXPECT_TRUE(permanent_off.print_payload);
const auto spawn = vdd::cli_broker_route_for_args({"spawn", "--width", "2560", "--height", "1440", "--name", "Desk Display"});
diff --git a/tests/unit/driver/test_control_client.cpp b/tests/unit/driver/test_control_client.cpp
index ed17fa0..5564ac0 100644
--- a/tests/unit/driver/test_control_client.cpp
+++ b/tests/unit/driver/test_control_client.cpp
@@ -270,7 +270,7 @@ TEST(VirtualDisplayDriverControlClient, PermanentDisplayOperationsReturnCounts)
request.physical_width_mm = 530;
request.physical_height_mm = 300;
request.refresh_rate_millihz = 60'000;
- std::memcpy(request.display_name, "Sunshine Display", 16);
+ std::memcpy(request.display_name, "LizardByte", sizeof("LizardByte") - 1);
const auto set_result = client.set_permanent_display_count(request);
const auto query_result = client.query_permanent_display_count();
diff --git a/tests/unit/driver/test_control_protocol.cpp b/tests/unit/driver/test_control_protocol.cpp
index 6748829..8288b6c 100644
--- a/tests/unit/driver/test_control_protocol.cpp
+++ b/tests/unit/driver/test_control_protocol.cpp
@@ -37,7 +37,7 @@ namespace {
request.physical_height_mm = 340;
request.refresh_rate_millihz = 120'000;
request.requested_timeout_ms = 30'000;
- std::memcpy(request.display_name, "Sunshine Display", 16);
+ std::memcpy(request.display_name, "LizardByte", sizeof("LizardByte") - 1);
return request;
}
@@ -120,7 +120,7 @@ TEST(VirtualDisplayDriverControlProtocol, WindowsGuidAdapterPreservesProtocolGui
TEST(VirtualDisplayDriverDeviceIdentity, FormatsControlInterfaceGuidAsInfBraceString) {
EXPECT_EQ(
vdd::format_inf_guid(vdd::kDeviceInterfaceGuid),
- "{5f894d6c-3a69-48a2-86ef-e4c671932d63}"
+ "{7d18b61f-bfaf-43cc-b1b5-49d226314595}"
);
// Field grouping: the clock-seq bytes (data4[0..1]) follow the third hyphen and the node
@@ -139,12 +139,12 @@ TEST(VirtualDisplayDriverDeviceIdentity, DerivesBrokerServiceSidFromServiceName)
// literal means a broker rename is caught here and the generated INF grant stays correct.
EXPECT_EQ(
vdd::derive_service_sid(vdd::kBrokerServiceName),
- "S-1-5-80-2333729190-1599198784-3320592948-2337414441-3098439965"
+ "S-1-5-80-3783560142-4148583110-2407323759-1088457827-1263307299"
);
// Windows derives service SIDs from the upper-cased name, so derivation is case-insensitive.
EXPECT_EQ(
- vdd::derive_service_sid("sunshinevirtualdisplaybroker"),
+ vdd::derive_service_sid("lizardbytevirtualdisplaybroker"),
vdd::derive_service_sid(vdd::kBrokerServiceName)
);
@@ -163,7 +163,7 @@ TEST(VirtualDisplayDriverDeviceIdentity, BuildsProtectedSystemAndBrokerOnlySecur
// verified against it by the driver_inf_in_sync ctest -- so the producer is asserted here.
EXPECT_EQ(
sddl,
- "D:P(A;;GA;;;SY)(A;;GA;;;S-1-5-80-2333729190-1599198784-3320592948-2337414441-3098439965)"
+ "D:P(A;;GA;;;SY)(A;;GA;;;S-1-5-80-3783560142-4148583110-2407323759-1088457827-1263307299)"
);
// Composed from named principals (not a frozen blob): a protected DACL granting GENERIC_ALL
@@ -190,7 +190,7 @@ TEST(VirtualDisplayDriverControlProtocol, ValidatesCreateRequest) {
EXPECT_EQ(validated.request.physical_width_mm, 600u);
EXPECT_EQ(validated.request.physical_height_mm, 340u);
EXPECT_EQ(validated.request.hdr_max_luminance_nits, vdd::kDefaultHdrMaxLuminanceNits);
- EXPECT_EQ(validated.display_name, "Sunshine Display");
+ EXPECT_EQ(validated.display_name, "LizardByte");
}
TEST(VirtualDisplayDriverControlProtocol, CanonicalizesDisplayNames) {
@@ -210,13 +210,13 @@ TEST(VirtualDisplayDriverControlProtocol, ValidatedCreateCopiesRebindDisplayName
ASSERT_EQ(vdd::validate_create_temporary_display(request, &validated), vdd::ValidationError::None);
const auto copied = validated;
- ASSERT_EQ(copied.display_name, "Sunshine Display");
+ ASSERT_EQ(copied.display_name, "LizardByte");
EXPECT_EQ(copied.display_name.data(), copied.request.display_name);
EXPECT_NE(copied.display_name.data(), validated.display_name.data());
auto assigned = vdd::ValidatedCreateTemporaryDisplay {};
assigned = validated;
- ASSERT_EQ(assigned.display_name, "Sunshine Display");
+ ASSERT_EQ(assigned.display_name, "LizardByte");
EXPECT_EQ(assigned.display_name.data(), assigned.request.display_name);
EXPECT_NE(assigned.display_name.data(), validated.display_name.data());
}
@@ -469,6 +469,17 @@ TEST(VirtualDisplayDriverControlProtocol, ValidatesPermanentDisplaySettings) {
EXPECT_EQ(vdd::validate_permanent_display_count(request, 4), vdd::ValidationError::InvalidDisplayName);
}
+TEST(VirtualDisplayDriverControlProtocol, DefaultsBlankPermanentDisplayName) {
+ vdd::PermanentDisplayCountRequest request {};
+ request.display_count = 1;
+ std::fill(std::begin(request.display_name), std::end(request.display_name), ' ');
+
+ vdd::set_default_permanent_display_settings(request);
+
+ EXPECT_EQ(vdd::trim_display_name(request.display_name), "LizardByte VD");
+ EXPECT_EQ(vdd::validate_permanent_display_count(request, 1), vdd::ValidationError::None);
+}
+
TEST(VirtualDisplayDriverControlProtocol, ValidatesDisplayManifest) {
auto manifest = valid_display_manifest();
diff --git a/tests/unit/driver/test_display_identity.cpp b/tests/unit/driver/test_display_identity.cpp
index aaa52ff..8f6a384 100644
--- a/tests/unit/driver/test_display_identity.cpp
+++ b/tests/unit/driver/test_display_identity.cpp
@@ -17,7 +17,7 @@ namespace {
120'000,
30'000,
8,
- "Sunshine HDR",
+ "HDR Display",
std::chrono::steady_clock::now()
};
}
@@ -65,7 +65,7 @@ TEST(VirtualDisplayDriverDisplayIdentity, BuildsHdrEdidOptionsFromDisplayRecord)
record.hdr_max_luminance_nits = 2000;
const auto options = vdd::edid_options_for_temporary_display(record);
- EXPECT_EQ(options.manufacturer_id, vdd::kSunshineDriverManufacturerId);
+ EXPECT_EQ(options.manufacturer_id, vdd::kVirtualDisplayManufacturerId);
EXPECT_EQ(options.product_code, vdd::product_code_from_display_id(record.display_id));
EXPECT_EQ(options.serial_number, vdd::serial_number_from_display_id(record.display_id));
EXPECT_EQ(options.width, record.width);
diff --git a/tests/unit/driver/test_driver_controller.cpp b/tests/unit/driver/test_driver_controller.cpp
index 34c80ff..0987b4e 100644
--- a/tests/unit/driver/test_driver_controller.cpp
+++ b/tests/unit/driver/test_driver_controller.cpp
@@ -134,7 +134,7 @@ namespace {
request.physical_height_mm = 330;
request.refresh_rate_millihz = 120'000;
request.requested_timeout_ms = 30'000;
- set_display_name(request.display_name, "Sunshine HDR");
+ set_display_name(request.display_name, "HDR Display");
return request;
}
@@ -747,7 +747,7 @@ TEST(VirtualDisplayDriverController, ReapExpiredDepartsWithTheSnapshotGeneration
}
TEST(VirtualDisplayDriverController, SecureReclaimKeepsGenerationFenceValidForDeparturesAndRecreation) {
- // Field flow (Vibepollo recovery): a host that lost sight of its display
+ // Host recovery: a host that lost sight of its display
// securely reclaims it under a fresh lease, decides the reclaimed display is
// not reusable, removes it, and recreates the same display_id. The departure
// issued after the reclaim must still carry the original record generation
@@ -797,7 +797,7 @@ TEST(VirtualDisplayDriverController, SecureReclaimKeepsGenerationFenceValidForDe
}
TEST(VirtualDisplayDriverController, PersistentDepartFailureLeavesOwnerAnEscapePathWithoutDriverRestart) {
- // Field wedge (vibeshine#253 family; Vibepollo 1.18.3-stable.4 reports):
+ // Lost display after reclaim:
// when the backend departure fails persistently (wedged IddCx teardown),
// every owner-facing path for the display_id fail-closes:
// - remove marks the record pending_departure and fails,
diff --git a/tests/unit/driver/test_edid.cpp b/tests/unit/driver/test_edid.cpp
index 1f65373..f36d544 100644
--- a/tests/unit/driver/test_edid.cpp
+++ b/tests/unit/driver/test_edid.cpp
@@ -17,7 +17,7 @@ namespace {
options.physical_width_mm = 590;
options.physical_height_mm = 330;
options.refresh_rate_millihz = 120'000;
- options.monitor_name = "Sunshine HDR";
+ options.monitor_name = "HDR Display";
options.hdr_supported = true;
return options;
}
@@ -145,12 +145,28 @@ TEST(VirtualDisplayDriverEdid, SdrPreservesOriginalRec709ChromaticityBytes) {
EXPECT_FALSE(vdd::has_bt2020_colorimetry(edid));
}
+TEST(VirtualDisplayDriverEdid, AdvertisesDefaultMonitorName) {
+ const auto edid = vdd::create_edid({});
+ EXPECT_EQ(vdd::read_monitor_name(edid), "LizardByte VD");
+ EXPECT_EQ(edid[108], std::byte {0});
+ EXPECT_TRUE(vdd::has_valid_edid_checksums(edid));
+}
+
+TEST(VirtualDisplayDriverEdid, TruncatesLongMonitorNamesToDescriptorLength) {
+ auto options = default_options();
+ options.monitor_name = "Conference Display";
+ const auto edid = vdd::create_edid(options);
+ EXPECT_EQ(vdd::read_monitor_name(edid), "Conference Di");
+}
+
TEST(VirtualDisplayDriverEdid, StopsMonitorNameAtDescriptorTerminator) {
- auto edid = vdd::create_edid(default_options());
+ auto options = default_options();
+ options.monitor_name = "Desk Display";
+ auto edid = vdd::create_edid(options);
edid[90 + 5 + 4] = std::byte {'\n'};
edid[90 + 5 + 5] = std::byte {'X'};
- EXPECT_EQ(vdd::read_monitor_name(edid), "Suns");
+ EXPECT_EQ(vdd::read_monitor_name(edid), "Desk");
}
TEST(VirtualDisplayDriverEdid, RejectsUnsafeMonitorNameCharacters) {
diff --git a/tests/unit/driver/test_ioctl_dispatcher.cpp b/tests/unit/driver/test_ioctl_dispatcher.cpp
index 3b07b14..9cac131 100644
--- a/tests/unit/driver/test_ioctl_dispatcher.cpp
+++ b/tests/unit/driver/test_ioctl_dispatcher.cpp
@@ -78,7 +78,7 @@ namespace {
request.physical_height_mm = 300;
request.refresh_rate_millihz = 60'000;
request.requested_timeout_ms = 30'000;
- set_display_name(request.display_name, "Sunshine");
+ set_display_name(request.display_name, "LizardByte");
return request;
}
diff --git a/tests/unit/driver/test_lease_store.cpp b/tests/unit/driver/test_lease_store.cpp
index edbb63d..ee92693 100644
--- a/tests/unit/driver/test_lease_store.cpp
+++ b/tests/unit/driver/test_lease_store.cpp
@@ -46,7 +46,7 @@ namespace {
request.hdr_max_luminance_nits = 2000;
request.refresh_rate_millihz = 60'000;
request.requested_timeout_ms = 30'000;
- set_display_name(request.display_name, "Sunshine Display");
+ set_display_name(request.display_name, "LizardByte");
return request;
}
@@ -91,7 +91,7 @@ TEST(VirtualDisplayDriverLeaseStore, CreatesTemporaryDisplayWithConnectorIndex)
EXPECT_EQ(record->physical_height_mm, 300u);
EXPECT_EQ(record->hdr_max_luminance_nits, 2000u);
EXPECT_EQ(record->refresh_rate_millihz, 60'000u);
- EXPECT_EQ(record->display_name, "Sunshine Display");
+ EXPECT_EQ(record->display_name, "LizardByte");
}
TEST(VirtualDisplayDriverLeaseStore, ReclaimsOwnedDisplayWithoutChangingIdentity) {
diff --git a/tests/unit/linux_drm_capture_test.cpp b/tests/unit/linux_drm_capture_test.cpp
index 1381686..032baca 100644
--- a/tests/unit/linux_drm_capture_test.cpp
+++ b/tests/unit/linux_drm_capture_test.cpp
@@ -3,36 +3,36 @@
#include
#include
#include
- #include
+ #include
TEST(LinuxCaptureLease, RetirementRejectsActiveReadersAndBlocksNewReaders) {
- vibeshine_capture_state state {};
- ASSERT_TRUE(vibeshine_capture_acquire(&state, false));
- EXPECT_FALSE(vibeshine_capture_retire(&state, false));
+ virtualdisplay_capture_state state {};
+ ASSERT_TRUE(virtualdisplay_capture_acquire(&state, false));
+ EXPECT_FALSE(virtualdisplay_capture_retire(&state, false));
EXPECT_EQ(state.retiring, 0u);
- EXPECT_TRUE(vibeshine_capture_release(&state));
- ASSERT_TRUE(vibeshine_capture_retire(&state, false));
- ASSERT_TRUE(vibeshine_capture_retire(&state, false));
- EXPECT_FALSE(vibeshine_capture_acquire(&state, false));
- EXPECT_TRUE(vibeshine_capture_publish(&state));
- EXPECT_FALSE(vibeshine_capture_acquire(&state, false));
- EXPECT_TRUE(vibeshine_capture_publish(&state));
- EXPECT_TRUE(vibeshine_capture_acquire(&state, false));
+ EXPECT_TRUE(virtualdisplay_capture_release(&state));
+ ASSERT_TRUE(virtualdisplay_capture_retire(&state, false));
+ ASSERT_TRUE(virtualdisplay_capture_retire(&state, false));
+ EXPECT_FALSE(virtualdisplay_capture_acquire(&state, false));
+ EXPECT_TRUE(virtualdisplay_capture_publish(&state));
+ EXPECT_FALSE(virtualdisplay_capture_acquire(&state, false));
+ EXPECT_TRUE(virtualdisplay_capture_publish(&state));
+ EXPECT_TRUE(virtualdisplay_capture_acquire(&state, false));
}
TEST(LinuxCaptureLease, AcquisitionAndRetirementShareOneLinearizationPoint) {
for (int iteration = 0; iteration < 1000; ++iteration) {
- vibeshine_capture_state state {};
+ virtualdisplay_capture_state state {};
std::mutex lock;
bool acquired = false;
bool retired = false;
std::thread reader([&] {
std::lock_guard guard(lock);
- acquired = vibeshine_capture_acquire(&state, false);
+ acquired = virtualdisplay_capture_acquire(&state, false);
});
std::thread committer([&] {
std::lock_guard guard(lock);
- retired = vibeshine_capture_retire(&state, false);
+ retired = virtualdisplay_capture_retire(&state, false);
});
reader.join();
committer.join();
@@ -40,52 +40,52 @@ TEST(LinuxCaptureLease, AcquisitionAndRetirementShareOneLinearizationPoint) {
EXPECT_EQ(state.retiring, retired ? 1u : 0u);
EXPECT_EQ(state.readers, acquired ? 1u : 0u);
if (acquired) {
- EXPECT_TRUE(vibeshine_capture_release(&state));
- EXPECT_TRUE(vibeshine_capture_retire(&state, false));
+ EXPECT_TRUE(virtualdisplay_capture_release(&state));
+ EXPECT_TRUE(virtualdisplay_capture_retire(&state, false));
}
- EXPECT_FALSE(vibeshine_capture_acquire(&state, false));
- EXPECT_TRUE(vibeshine_capture_publish(&state));
+ EXPECT_FALSE(virtualdisplay_capture_acquire(&state, false));
+ EXPECT_TRUE(virtualdisplay_capture_publish(&state));
}
}
TEST(LinuxCaptureLease, FailedAdmissionRollsBackAndAllowsRetry) {
- vibeshine_capture_state first {};
- vibeshine_capture_state second {};
- ASSERT_TRUE(vibeshine_capture_acquire(&second, false));
- ASSERT_TRUE(vibeshine_capture_retire(&first, false));
- EXPECT_FALSE(vibeshine_capture_retire(&second, false));
- ASSERT_TRUE(vibeshine_capture_publish(&first));
- EXPECT_TRUE(vibeshine_capture_acquire(&first, false));
- EXPECT_TRUE(vibeshine_capture_release(&first));
- EXPECT_TRUE(vibeshine_capture_release(&second));
- EXPECT_TRUE(vibeshine_capture_retire(&first, false));
- EXPECT_TRUE(vibeshine_capture_retire(&second, false));
- EXPECT_TRUE(vibeshine_capture_publish(&first));
- EXPECT_TRUE(vibeshine_capture_publish(&second));
+ virtualdisplay_capture_state first {};
+ virtualdisplay_capture_state second {};
+ ASSERT_TRUE(virtualdisplay_capture_acquire(&second, false));
+ ASSERT_TRUE(virtualdisplay_capture_retire(&first, false));
+ EXPECT_FALSE(virtualdisplay_capture_retire(&second, false));
+ ASSERT_TRUE(virtualdisplay_capture_publish(&first));
+ EXPECT_TRUE(virtualdisplay_capture_acquire(&first, false));
+ EXPECT_TRUE(virtualdisplay_capture_release(&first));
+ EXPECT_TRUE(virtualdisplay_capture_release(&second));
+ EXPECT_TRUE(virtualdisplay_capture_retire(&first, false));
+ EXPECT_TRUE(virtualdisplay_capture_retire(&second, false));
+ EXPECT_TRUE(virtualdisplay_capture_publish(&first));
+ EXPECT_TRUE(virtualdisplay_capture_publish(&second));
}
TEST(LinuxCaptureLease, AsyncRetirementAllowsExistingReadersButBlocksNewOnes) {
- vibeshine_capture_state state {};
- ASSERT_TRUE(vibeshine_capture_acquire(&state, false));
- ASSERT_TRUE(vibeshine_capture_retire(&state, true));
- EXPECT_FALSE(vibeshine_capture_acquire(&state, false));
- EXPECT_FALSE(vibeshine_capture_retire(&state, false));
- EXPECT_TRUE(vibeshine_capture_release(&state));
- EXPECT_TRUE(vibeshine_capture_publish(&state));
- EXPECT_TRUE(vibeshine_capture_acquire(&state, false));
+ virtualdisplay_capture_state state {};
+ ASSERT_TRUE(virtualdisplay_capture_acquire(&state, false));
+ ASSERT_TRUE(virtualdisplay_capture_retire(&state, true));
+ EXPECT_FALSE(virtualdisplay_capture_acquire(&state, false));
+ EXPECT_FALSE(virtualdisplay_capture_retire(&state, false));
+ EXPECT_TRUE(virtualdisplay_capture_release(&state));
+ EXPECT_TRUE(virtualdisplay_capture_publish(&state));
+ EXPECT_TRUE(virtualdisplay_capture_acquire(&state, false));
}
TEST(LinuxCaptureLease, ReadersAreBoundedAndStoppingRejectsNewWork) {
- vibeshine_capture_state state {};
- EXPECT_FALSE(vibeshine_capture_acquire(&state, true));
- for (unsigned i = 0; i < VIBESHINE_CAPTURE_MAX_READERS; ++i) {
- EXPECT_TRUE(vibeshine_capture_acquire(&state, false));
+ virtualdisplay_capture_state state {};
+ EXPECT_FALSE(virtualdisplay_capture_acquire(&state, true));
+ for (unsigned i = 0; i < VIRTUALDISPLAY_CAPTURE_MAX_READERS; ++i) {
+ EXPECT_TRUE(virtualdisplay_capture_acquire(&state, false));
}
- EXPECT_FALSE(vibeshine_capture_acquire(&state, false));
- for (unsigned i = 0; i < VIBESHINE_CAPTURE_MAX_READERS; ++i) {
- EXPECT_TRUE(vibeshine_capture_release(&state));
+ EXPECT_FALSE(virtualdisplay_capture_acquire(&state, false));
+ for (unsigned i = 0; i < VIRTUALDISPLAY_CAPTURE_MAX_READERS; ++i) {
+ EXPECT_TRUE(virtualdisplay_capture_release(&state));
}
- EXPECT_FALSE(vibeshine_capture_release(&state));
- EXPECT_FALSE(vibeshine_capture_publish(&state));
+ EXPECT_FALSE(virtualdisplay_capture_release(&state));
+ EXPECT_FALSE(virtualdisplay_capture_publish(&state));
}
#endif
diff --git a/tests/unit/linux_drm_change_test.cpp b/tests/unit/linux_drm_change_test.cpp
index 24345b7..bc63020 100644
--- a/tests/unit/linux_drm_change_test.cpp
+++ b/tests/unit/linux_drm_change_test.cpp
@@ -3,61 +3,61 @@
#ifdef __linux__
#include
- #include
- #include
- #include
+ #include
+ #include
+ #include
TEST(LinuxDrmPresentPolicy, ReturnsACompletedSequenceWithoutWaitingForQueueDrain) {
- vibeshine_drm_wait_present request {};
- request.abi_version = VIBESHINE_DRM_PRESENT_ABI_VERSION;
+ virtualdisplay_drm_wait_present request {};
+ request.abi_version = VIRTUALDISPLAY_DRM_PRESENT_ABI_VERSION;
request.sequence = 7;
request.timeout_ms = 16;
EXPECT_EQ(
- vibeshine_drm_present_decide_wait(&request, 8, VIBESHINE_DRM_PRESENT_MAX_WAITERS),
- VIBESHINE_DRM_PRESENT_RETURN_CURRENT
+ virtualdisplay_drm_present_decide_wait(&request, 8, VIRTUALDISPLAY_DRM_PRESENT_MAX_WAITERS),
+ VIRTUALDISPLAY_DRM_PRESENT_RETURN_CURRENT
);
EXPECT_EQ(
- vibeshine_drm_present_decide_wait(&request, 7, VIBESHINE_DRM_PRESENT_MAX_WAITERS - 1),
- VIBESHINE_DRM_PRESENT_REGISTER_WAITER
+ virtualdisplay_drm_present_decide_wait(&request, 7, VIRTUALDISPLAY_DRM_PRESENT_MAX_WAITERS - 1),
+ VIRTUALDISPLAY_DRM_PRESENT_REGISTER_WAITER
);
}
TEST(LinuxDrmChangePolicy, DistinguishesNoOpFromContentAndStateChanges) {
- vibeshine_drm_plane_snapshot old_state {};
+ virtualdisplay_drm_plane_snapshot old_state {};
old_state.present = true;
old_state.visible = true;
old_state.crtc = 1;
old_state.framebuffer = 2;
auto new_state = old_state;
- EXPECT_FALSE(vibeshine_drm_plane_changes_scanout(&old_state, &new_state));
+ EXPECT_FALSE(virtualdisplay_drm_plane_changes_scanout(&old_state, &new_state));
new_state.framebuffer = 3;
- EXPECT_TRUE(vibeshine_drm_plane_changes_scanout(&old_state, &new_state));
+ EXPECT_TRUE(virtualdisplay_drm_plane_changes_scanout(&old_state, &new_state));
new_state = old_state;
new_state.content_update = true;
- EXPECT_TRUE(vibeshine_drm_plane_changes_scanout(&old_state, &new_state));
+ EXPECT_TRUE(virtualdisplay_drm_plane_changes_scanout(&old_state, &new_state));
}
TEST(LinuxDrmVrrPolicy, EnforcesTheModePeriodAsMaximumRefreshRate) {
constexpr unsigned long long period_ns = 8'333'333;
- EXPECT_EQ(vibeshine_drm_vrr_presentation_deadline_ns(0, 100, period_ns), 100);
+ EXPECT_EQ(virtualdisplay_drm_vrr_presentation_deadline_ns(0, 100, period_ns), 100);
EXPECT_EQ(
- vibeshine_drm_vrr_presentation_deadline_ns(1'000'000'000, 1'007'000'000, period_ns),
+ virtualdisplay_drm_vrr_presentation_deadline_ns(1'000'000'000, 1'007'000'000, period_ns),
1'008'333'333
);
EXPECT_EQ(
- vibeshine_drm_vrr_presentation_deadline_ns(1'000'000'000, 1'010'000'000, period_ns),
+ virtualdisplay_drm_vrr_presentation_deadline_ns(1'000'000'000, 1'010'000'000, period_ns),
1'010'000'000
);
}
TEST(LinuxDrmVrrPolicy, DoesNotWrapADeadlineIntoThePast) {
EXPECT_EQ(
- vibeshine_drm_vrr_presentation_deadline_ns(~0ULL - 2, 100, 10),
+ virtualdisplay_drm_vrr_presentation_deadline_ns(~0ULL - 2, 100, 10),
~0ULL
);
}
diff --git a/tools/alttab_stress.cpp b/tools/alttab_stress.cpp
index d354b14..4a34113 100644
--- a/tools/alttab_stress.cpp
+++ b/tools/alttab_stress.cpp
@@ -1,7 +1,7 @@
// alttab_stress.cpp - Virtual-display alt-tab / teardown brute-force stress harness.
//
// Reproduces the virtual-display alt-tab deadlock/BSOD class by replicating, on a loop and
-// as intensively as possible, what a real Sunshine stream of a fullscreen GAME does when
+// as intensively as possible, what a capture session of a fullscreen game does when
// the user alt-tabs between the game (on the virtual display) and the desktop:
//
// connect -> create a temporary virtual display via the libvirtualdisplay control IOCTLs
@@ -10,7 +10,7 @@
// SetFullscreenState on/off rapidly. Entering/leaving exclusive fullscreen is
// exactly the alt-tab transition: the OS rotates the IddCx swapchain (assign/
// unassign + the driver worker's DXGI_ERROR_ACCESS_LOST -> teardown/device path).
-// capture -> DDA-duplicate the virtual display like Sunshine, RECREATING the capture D3D11
+// capture -> DDA-duplicate the virtual display, RECREATING the capture D3D11
// device on every ACCESS_LOST. That capture device destroy/create is the host-
// side D3DKMTDestroyHwQueue / D3D11CreateDevice that the dump showed wedged; we
// issue it concurrently with the game's fullscreen transition, which is the race.
@@ -255,7 +255,7 @@ namespace {
}
// --------------------------------------------------------------- capture --
- // Replicates Sunshine's DDA capture, recreating the device on ACCESS_LOST (the contending
+ // Exercises DDA capture, recreating the device on ACCESS_LOST (the contending
// D3D11CreateDevice / D3DKMTDestroyHwQueue during the mode change).
class CaptureWorker {
diff --git a/tools/dump_hang.ps1 b/tools/dump_hang.ps1
index 45b2520..486daca 100644
--- a/tools/dump_hang.ps1
+++ b/tools/dump_hang.ps1
@@ -1,5 +1,5 @@
-# dump_hang.ps1 - Capture full dumps of a wedged Sunshine stream and its virtual-display
-# driver host, the moment an alt-tab freezes the stream. Uses the built-in comsvcs MiniDump
+# dump_hang.ps1 - Capture a full dump of the virtual display driver host when it hangs.
+# Uses the built-in comsvcs MiniDump
# (no procdump required). RUN ELEVATED.
#
# powershell -ExecutionPolicy Bypass -File D:\sources\libvirtualdisplay\tools\dump_hang.ps1
@@ -24,17 +24,10 @@ function Save-ProcessDump([int]$ProcId, [string]$Tag) {
}
}
-# 1) The stream host.
-$hosts = Get-Process sunshine, vibeshine -ErrorAction SilentlyContinue
-if (-not $hosts) {
- Write-Information "WARNING: no sunshine/vibeshine process found." -InformationAction Continue
-}
-foreach ($p in $hosts) { Save-ProcessDump $p.Id $p.Name }
-
-# 2) The WUDFHost that hosts the virtual-display driver (find it by loaded module).
+# Find the WUDFHost that hosts the virtual display driver by its loaded module.
$found = $false
try {
- $rows = tasklist /m SunshineVirtualDisplayDriver.dll /fo csv 2>$null | ConvertFrom-Csv
+ $rows = tasklist /m LizardByteVirtualDisplay.dll /fo csv 2>$null | ConvertFrom-Csv
foreach ($r in $rows) {
if ($r.PID -match '^\d+$') {
Save-ProcessDump ([int]$r.PID) 'WUDFHost_vdd'
diff --git a/tools/gen_driver_inf.cpp b/tools/gen_driver_inf.cpp
index 28d30ca..4b063fd 100644
--- a/tools/gen_driver_inf.cpp
+++ b/tools/gen_driver_inf.cpp
@@ -1,4 +1,4 @@
-// Generates SunshineVirtualDisplayDriver.inf from its committed template by substituting
+// Generates LizardByteVirtualDisplay.inf from its committed template by substituting
// the security-critical values from the device_identity single source of truth plus
// package-specific DriverVer metadata. This keeps the shipped, signed INF in lock-step
// with the C++ constants without a runtime file-scraping unit test: a build/ctest step
diff --git a/tools/virtualdisplay.cpp b/tools/virtualdisplay.cpp
index f165d62..636a8be 100644
--- a/tools/virtualdisplay.cpp
+++ b/tools/virtualdisplay.cpp
@@ -46,9 +46,9 @@ namespace {
}
#ifdef _WIN32
- constexpr wchar_t kBrokerPipeName[] = L"\\\\.\\pipe\\SunshineVirtualDisplayBroker";
+ constexpr wchar_t kBrokerPipeName[] = L"\\\\.\\pipe\\LizardByteVirtualDisplayBroker";
constexpr const wchar_t *kBrokerServiceName = vdd::kBrokerServiceNameW.data();
- constexpr wchar_t kBrokerServiceDisplayName[] = L"Sunshine Virtual Display Broker";
+ constexpr wchar_t kBrokerServiceDisplayName[] = L"LizardByte Virtual Display Broker";
constexpr wchar_t kBrokerServiceSecurityDescriptor[] = L"D:P(A;;GA;;;SY)(A;;GA;;;BA)";
constexpr wchar_t kBrokerServiceRequiredPrivileges[] =
L"SeAssignPrimaryTokenPrivilege\0"
@@ -907,9 +907,9 @@ namespace {
const auto tool_dir = std::filesystem::path {executable}.parent_path();
const std::vector candidates {
- tool_dir.parent_path() / "driver" / "SunshineVirtualDisplayDriver.inf",
- tool_dir / "windows_driver" / "SunshineVirtualDisplayDriver.inf",
- tool_dir / "SunshineVirtualDisplayDriver.inf"
+ tool_dir.parent_path() / "driver" / "LizardByteVirtualDisplay.inf",
+ tool_dir / "windows_driver" / "LizardByteVirtualDisplay.inf",
+ tool_dir / "LizardByteVirtualDisplay.inf"
};
for (const auto &candidate : candidates) {
@@ -1013,7 +1013,7 @@ namespace {
continue;
}
- if (multi_sz_contains(buffer.data(), required_size, L"Root\\SunshineVirtualDisplay")) {
+ if (multi_sz_contains(buffer.data(), required_size, L"Root\\LizardByteVirtualDisplay")) {
native_error = ERROR_SUCCESS;
return true;
}
@@ -1047,7 +1047,7 @@ namespace {
device_info.cbSize = sizeof(device_info);
if (!SetupDiCreateDeviceInfoW(
devices.value,
- L"SunshineVirtualDisplay",
+ L"LizardByteVirtualDisplay",
&display_class_guid,
nullptr,
nullptr,
@@ -1058,7 +1058,7 @@ namespace {
return false;
}
- const wchar_t hardware_id[] = L"Root\\SunshineVirtualDisplay\0";
+ const wchar_t hardware_id[] = L"Root\\LizardByteVirtualDisplay\0";
if (!SetupDiSetDeviceRegistryPropertyW(
devices.value,
&device_info,
@@ -1104,7 +1104,7 @@ namespace {
BOOL reboot_required = FALSE;
if (!UpdateDriverForPlugAndPlayDevicesW(
nullptr,
- L"Root\\SunshineVirtualDisplay",
+ L"Root\\LizardByteVirtualDisplay",
inf_path->wstring().c_str(),
INSTALLFLAG_FORCE,
&reboot_required
@@ -1119,7 +1119,7 @@ namespace {
}
constexpr wchar_t kVulkanImplicitLayersKey[] = L"SOFTWARE\\Khronos\\Vulkan\\ImplicitLayers";
- constexpr wchar_t kVulkanLayerJsonFileName[] = L"VkLayer_sunshine_hdr.json";
+ constexpr wchar_t kVulkanLayerJsonFileName[] = L"VkLayer_lizardbyte_hdr.json";
std::optional resolve_vulkan_layer_json(const std::vector &args) {
for (std::size_t i = 1; i + 1 < args.size(); ++i) {
diff --git a/tools/virtualdisplay_broker.cpp b/tools/virtualdisplay_broker.cpp
index 521b303..22029a3 100644
--- a/tools/virtualdisplay_broker.cpp
+++ b/tools/virtualdisplay_broker.cpp
@@ -35,9 +35,9 @@ namespace vdd = virtual_display::driver;
namespace {
constexpr const wchar_t *kServiceName = vdd::kBrokerServiceNameW.data();
- constexpr wchar_t kPipeName[] = L"\\\\.\\pipe\\SunshineVirtualDisplayBroker";
+ constexpr wchar_t kPipeName[] = L"\\\\.\\pipe\\LizardByteVirtualDisplayBroker";
constexpr wchar_t kPipeSecurityDescriptor[] = L"D:P(A;;GA;;;SY)(A;;GA;;;BA)";
- constexpr wchar_t kBrokerStateSubkey[] = L"SOFTWARE\\Sunshine\\VirtualDisplayBroker";
+ constexpr wchar_t kBrokerStateSubkey[] = L"SOFTWARE\\LizardByte\\VirtualDisplayBroker";
constexpr wchar_t kBrokerDisplayManifestValue[] = L"DisplayManifest";
constexpr wchar_t kBrokerRegistrySecurityDescriptor[] = L"D:P(A;;GA;;;SY)(A;;GA;;;BA)";
constexpr wchar_t kSessionHelperExecutable[] = L"virtualdisplay_probe.exe";
diff --git a/tools/virtualdisplay_probe.cpp b/tools/virtualdisplay_probe.cpp
index 25293b7..8eebe2c 100644
--- a/tools/virtualdisplay_probe.cpp
+++ b/tools/virtualdisplay_probe.cpp
@@ -159,7 +159,7 @@ namespace {
request.height = height;
request.refresh_rate_millihz = vdd::refresh_millihz_from_hz(refresh_hz);
request.requested_timeout_ms = 10'000;
- std::strncpy(request.display_name, "Sunshine Probe", sizeof(request.display_name) - 1);
+ std::strncpy(request.display_name, "Probe Display", sizeof(request.display_name) - 1);
return request;
}
@@ -2432,7 +2432,7 @@ int main(const int argc, char **argv) {
first_request.lease_id = first_lease_id;
first_request.display_id = stable_display_id;
first_request.requested_timeout_ms = timeout_ms;
- std::strncpy(first_request.display_name, "Sunshine Retain", sizeof(first_request.display_name) - 1);
+ std::strncpy(first_request.display_name, "Retain Check", sizeof(first_request.display_name) - 1);
const auto first = client.create_temporary_display(first_request);
if (!first.ok()) {
@@ -2548,7 +2548,7 @@ int main(const int argc, char **argv) {
second_request.lease_id = second_lease_id;
second_request.display_id = stable_display_id;
second_request.requested_timeout_ms = timeout_ms;
- std::strncpy(second_request.display_name, "Sunshine Retain", sizeof(second_request.display_name) - 1);
+ std::strncpy(second_request.display_name, "Retain Check", sizeof(second_request.display_name) - 1);
const auto second = client.create_temporary_display(second_request);
if (!second.ok()) {