Display Driver SetMode#
Driver Setmode#
Starting with Drive OS 7.2.1.0, driver setmode is enabled by default and is performed by Display Server.
OpenWFD Modeset#
OpenWFD mode setting happens in the following way:
When a OpenWFD client first initializes the WFD library, OpenWFD queries NvKms for the current mode using NVKMS_IOCTL_GET_CURRENT_MODE
If current mode is not NULL,
OpenWFD exposes the sole active mode to clients and skips invoking the NvKms APIs for mode query and verification.
Any client request for modesets (via wfdSetPortMode) is ignored by the OpenWFD driver, but a message is logged to the kernel log, viewable with dmesg (not an error message).
This enables existing client apps to work as-is without any changes.
If current mode is NULL,
OpenWFD uses NvKms’ mode query and validation IOCTLs to build a list of available modes and then sets a preferred mode out of these modes (this is usually reported by NvKms).
At runtime, OpenWFD performs a modeset iff the WFD client invokes wfdSetPortMode followed by a wfdDeviceCommit. This is the legacy way of doing modesets and all current WFD apps are already following this approach.