OpenWFD NvSci Sample Application#
Overview#
This application demonstrates features of the OpenWFD (Open Windowing Foundation Display) driver with NVIDIA SciSync/SciBuf integration. It provides several sample tests with accompanying code examples that showcase different capabilities of the display subsystem and illustrate effective use of the OpenWFD driver.
Prerequisites#
Linux platforms: Display driver must be loaded, while DRM driver should not be loaded and no display clients (Xorg, GDM, etc.) should be running.
Available Samples#
NvSciBuf Sanity Sample: Displays a white square on the screen and demonstrates basic buffer creation and display
NvSciBuf Fade Sample: Shows a white square that fades in and out on the display, illustrating buffer manipulation
NvSciSync Sanity Sample: Displays a white square after a two-second delay (demonstrates synchronization mechanisms)
Non-blocking Commit Sample: Shows a white square after a two-second delay, showcasing asynchronous operations
Alpha Blending Sample: Flips between two buffers:
Green colored RGBA buffer on the left portion of the display
Red colored RGBA buffer on the right portion of the display
Demonstrates transparency attributes (WFD_TRANSPARENCY_GLOBAL_ALPHA and WFD_TRANSPARENCY_SOURCE_ALPHA)
Each sample includes code that demonstrates how to initialize the OpenWFD driver, create and manage display buffers, configure display properties, and handle synchronization between the application and display driver.
Display and Layer Selection#
The application supports multiple displays and layers:
Displays (
--displayor-d):-d 0: Uses the first display (default)-d 1: Uses the second display-d N: Uses the (N+1)th display if available
Layers (
--layeror-l):-l 0: Uses the first layer on the selected display (default)-l 1: Uses the second layer on the selected display-l N: Uses the (N+1)th layer if the display supports it
Each display can have multiple layers (also called planes or pipelines) that can be independently controlled. The number of available displays and layers per display depends on your hardware configuration and can be viewed using the --config option.
DP-MST Support#
The --dpmst option runs a special sample designed for DisplayPort Multi-Stream Transport (DP-MST) setups:
DP-MST: A DisplayPort feature that allows multiple independent displays to be driven over a single DisplayPort connection
When using
--dpmst, the application will:Create and initialize two separate buffer resources (one green, one blue)
Configure two WFD ports (displays) simultaneously
Flip content to both displays in a synchronized manner
This demonstrates the ability to drive multiple displays from a single GPU output
Requirements:
Hardware that supports DP-MST
Multiple displays connected via a DP-MST hub or daisy-chain configuration
At least two available display ports reported by the
--configoption
Example Usage:
./openwfd_nvsci_sample --dpmst
Frozen Frame Detection Support#
The --frozenframedetection option runs a sample designed to demonstrate the Frozen Frame Detection feature.
Frozen Frame Detection is not available on Linux platforms.
Command Line Options#
--help / -h : Print information about openwfd_nvsci_sample
--sample / -s : Specify the sample number to run (1-5)
Example: --sample 1
--res / -r : Set size of buffer (Default: ModeWidth x ModeHeight)
Example: --res 1920x1080
Note: Not all buffer sizes are supported
--config / -c : Print the display H/W configuration and exit
--mode / -m : Specify the display mode resolution to be used
Example: --mode 1920x1080@60
Default: Preferred mode as reported by Display
--display / -d : Specify the display to run the sample on (Default: 0)
Example: --display 1 (uses second display)
--layer / -l : Specify the layer to run the sample on (Default: 0)
Example: --layer 1 (uses second layer on selected display)
--dpmst : Run a sample which flips to multiple displays
Requires a DP-MST setup with at least two displays
--frozenframedetection: Run a sample which exercises Display's Frozen Frame Detection feature
Requires a setup with Frozen Frame Detection enabled
--splash : Displays a splash screen for a specified amount of time
--timeout / -t : Timeout for the splash screen in seconds
Valid only with --splash option (Default: 60)
--image / -i : Splash screen BMP image to be displayed
--frames / -f : Number of frames to be displayed
Usage Examples#
Run the first sample on the default display and layer:
./openwfd_nvsci_sample --sample 1Run the alpha blending sample on the second display (index 1) with custom resolution:
./openwfd_nvsci_sample --sample 5 --display 1 --res 1280x720Run a sample on the first display but using the second layer:
./openwfd_nvsci_sample --sample 2 --display 0 --layer 1Display hardware configuration to see available displays, layers, and modes:
./openwfd_nvsci_sample --configRun the DP-MST sample to display content on multiple displays:
./openwfd_nvsci_sample --dpmst
The application validates the configuration parameters to ensure they are compatible with the available display hardware before running the selected sample. If you specify an invalid display or layer index, the application will report an error.
The source code for these samples serves as practical examples for developers to integrate OpenWFD functionality into their own applications, demonstrating proper API usage patterns.