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,

  1. Enumerate the IDs of the WFD devices with wfdEnumerateDevices() and select one of them.

  2. Create a WFD device with the ID selected from step 1 by calling wfdCreateDevice().

  3. Enumerate the IDs of the WFD ports with wfdEnumeratePorts() and select one of them.

  4. Create a WFD port with the ID selected from step 3 by calling wfdCreatePort().

  5. Query a list of wfdPortMode supported by the WFD port by calling wfdGetPortModes().

  6. 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*().

  1. Set the chosen wfdPortMode to the WFD port.

  2. Enumerate the IDs of the WFD pipelines with wfdEnumeratePipelines() and select one of them.

  3. Create a WFD pipeline with the ID selected from step 8 by calling wfdCreatePipeline().

  4. Commit the WFD pipeline with the WFD port by calling wfdBindPipelineToPort().

  5. Commit the state of the WFD port with wfdDeviceCommit() and the WFD_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.