OpenWFD

This topic describes the Khronos Open Windowing Foundation - Display (OpenWFD) API that can be used to interact with the display hardware. OpenWFD does not require the presence of a native windowing system.

OpenWFD is a Khronos API that provides a low-level hardware abstraction interface for windowing systems, and applications can interact directly with the display by using the OpenWFD API. The specification of the OpenWFD API is available at Khronos’ registry at OpenWF Display 1.0 Specification (also referred to as the spec).

The display architecture on Jetson includes an OpenWFD driver (also referred to as the WFD driver) that supports a subset of the core OpenWFD APIs in the spec and additional NVIDIA specific extensions. Usage guidelines for the core OpenWFD APIs can be obtained from the spec, and deviations from the spec or additional details will be described in this section.

Supported OpenWFD APIs

The following table provides a list of the supported core OpenWFD APIs on the WFD driver:

Supported OpenWFD APIs

API

Support in the OpenWFD driver

wfdGetStrings

Supported

wfdIsExtensionSupported

Supported

wfdGetError

Supported

wfdEnumerateDevices

Supported

wfdCreateDevice

Supported

wfdDestroyDevice

Supported

wfdDeviceCommit

Supported

wfdGetDeviceAttribi

Supported

wfdSetDeviceAttribi

Supported

wfdCreateEvent

Not supported

wfdDestroyEvent

Not supported

wfdGetEventAttribi

Not supported

wfdDeviceEventAsync

Not supported

wfdDeviceEventWait

Not supported

wfdDeviceEventFilter

Not supported

wfdEnumeratePorts

Supported

wfdCreatePort

Supported

wfdDestroyPort

Supported

wfdGetPortModes

Supported

wfdGetPortModeAttrib{i/f}

Supported

wfdSetPortMode

Supported

wfdGetCurrentPortMode

Supported

wfdGetPortAttribi

Supported

wfdGetPortAttribf

Supported

wfdGetPortAttribiv

Supported

wfdGetPortAttribfv

Supported

wfdSetPortAttribi

Supported

wfdSetPortAttribf

Supported

wfdSetPortAttribiv

Supported

wfdSetPortAttribfv

Supported

wfdBindPipelineToPort

Supported

wfdGetDisplayDataFormats

Not supported

wfdGetDisplayData

Not supported

wfdEnumeratePipelines

Not supported

wfdCreatePipeline

Supported

wfdDestroyPipeline

Supported

wfdCreateSourceFromImage

Not supported

wfdCreateSourceFromStream

Not supported

wfdDestroySource

Supported

wfdCreateMaskFromImage

Not supported

wfdCreateMaskFromStream

Not supported

wfdDestroyMask

Not supported

wfdBindSourceToPipeline

Supported

wfdBindMaskToPipeline

Not supported

wfdGetPipelineAttribi

Supported

wfdGetPipelineAttribf

Supported

wfdGetPipelineAttribiv

Supported

wfdGetPipelineAttribfv

Supported

wfdSetPipelineAttribi

Supported

wfdSetPipelineAttribf

Supported

wfdSetPipelineAttribiv

Supported

wfdSetPipelineAttribfv

Supported

wfdGetPipelineTransparency

Supported

wfdSetPipelineTSColor

Not supported

wfdGetPipelineLayerOrder

Supported

The following OpenWFD attributes are not implemented:

  • WFD_PORT_POWER_MODE

  • WFD_PORT_PROTECTION_ENABLE

  • WFD_PORT_PARTIAL_REFRESH_ENABLE

  • WFD_PORT_GAMMA

  • WFD_PIPELINE_SHAREABLE

  • WFD_PIPELINE_SCALE_FILTER

The following OpenWFD attributes have limited support for querying:

WFD_PORT_BACKGROUND_COLOR - Cannot be queried via the wfdGetPortAttribi API. The wfdGetPortAttribiv and wfdGetPortAttribfv APIs can still be used for querying WFD_PORT_BACKGROUND_COLOR.

Supported OpenWFD Extensions

The following OpenWFD extensions are supported by the OpenWFD Driver:

  • WFD_NVX_create_source_from_nvscibuf

  • WFD_NVX_commit_non_blocking

  • WFD_NVX_nvscisync

  • WFD_NVX_port_mode_timings

For more information about these extensions, refer to the Jetson Linux API Reference Guide, which is included in the Jetson Linux documentation package.

OpenWFD Usage Guidelines

  • To enable the WFD_NVX_create_source_from_nvscibuf extension, before you include the wfd.h and wfdext.h headers, define the WFD_NVX_create_source_from_nvscibuf macro.

  • Define the WFD_WFDEXT_PROTOTYPES macro before you include the wfd.h and wfdext.h headers.

  • To clear the contents on a WFDPipeline (performing a null flip), call wfdBindSourceToPipeline with 0 for the WFDSource argument before you call wfdDeviceCommit on the WFDPipeline.

  • To commit to multiple WFDPipeline handles that are bound to the same WFDPort, we recommended that you call wfdDeviceCommit* with WFDCommitType set to WFD_COMMIT_ENTIRE_PORT.

  • When you use WFD_COMMIT_ENTIRE_PORT in a wfdDeviceCommit call, the WFDPipeline objects that are part of the commit must have a surface bound(normal flip) or have no surfaces bound (null flip). A mix of normal and a null flip in one WFD_COMMIT_ENTIRE_PORT wfdDeviceCommit call is not allowed due to a limitation on the Display driver.

  • To ensure that errors are caught, invoke the wfdGetError API after calls to the following OpenWFD APIs that take a WFDDevice handle as one of the inputs and return void:

    • wfdDeviceCommit

    • wfdDeviceCommitWithNvSciSyncFenceNVX

    • wfdDestroyPort

    • wfdSetPortMode

    • wfdGetPortAttrib{iv/fv}

    • wfdSetPortAttrib{i/v/iv/fv}

    • wfdBindPipelineToPort

    • wfdDestroyPipeline

    • wfdDestroySource

    • wfdBindSourceToPipeline

    • wfdGetPipelineAttrib{iv/fv}

    • wfdSetPipelineAttrib{i/v/iv/fv}