Display State Manager

Drive Setmode

When driver setmode is enabled, display setup and modeset will happen during the resmgr init phase instead of deferring this to when the first display client comes up. So, enabling driver setmode can improve "power-on to first pixel visible on screen" latency. Driver setmode can be enabled only for the configuration, which uses DP Serializer, on other configurations enabling it will fail to load display driver.

An example Device Tree fragment is shown below. In this example, driver setmode is enabled.
\ { 
    display@13800000 { 
        nvidia,driver-setmode; 
    }; 
}; 

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) will be ignored by the OpenWFD driver, but a message will be logged in slog2info (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.