Setting Up the Display with OpenWFD and EGL Device#
OpenWFD (Open Windowing Foundation – Display) is a Khronos specification that provides a low-level hardware abstraction interface to use the display hardware. OpenWFD can be used with an EGL device to interact with the display hardware.
Selecting a WFD Device, WFD Port, and WFD Pipeline#
To select a WFD device, WFD port, and WFD pipeline,
Enumerate the IDs of the WFD devices with
wfdEnumerateDevices()
and select one of them.Create a WFD device with the ID selected from step 1 by calling
wfdCreateDevice()
.Enumerate the IDs of the WFD ports with
wfdEnumeratePorts()
and select one of them.Create a WFD port with the ID selected from step 3 by calling
wfdCreatePort()
.Query a list of wfdPortMode supported by the WFD port by calling
wfdGetPortModes()
.Choose the desired wfdPortMode.
You can query the properties of the desired wfdPortMode, such as WFD_PORT_MODE_WIDTH
and WFD_PORT_MODE_HEIGHT
, by using wfdGetPortModeAttrib*()
.
Set the chosen wfdPortMode to the WFD port.
Enumerate the IDs of the WFD pipelines with
wfdEnumeratePipelines()
and select one of them.Create a WFD pipeline with the ID selected from step 8 by calling
wfdCreatePipeline()
.Commit the WFD pipeline with the WFD port by calling
wfdBindPipelineToPort()
.Commit the state of the WFD port with
wfdDeviceCommit()
and theWFD_COMMIT_ENTIRE_PORT
commit type.
Note
To exit SC7 mode (suspend to RAM), perform a modeset
using wfdDeviceCommit()
on the same WFDPortMode used before entering SC7 mode.
More Information#
For details about APIs, see the OpenWFD Specification.
For a list of addenda specific to NVIDIA, see the OpenWFD section of NvDisplay.
For an example of using OpenWFD with an EGL device to interact with display, see the sample openwfd_egldevice.