WDDM support for DisplayPort monitors over USB4

This article describes how a WDDM driver can support DisplayPort monitors connected over USB4 starting in Windows 11 (WDDM 3.0).

Requirements

The Windows graphics stack needs to know that a WDDM driver supports USB4 at start time. At start time, the system can verify whether a driver supports all the necessary requirements and fail driver start if it doesn't offer such support rather than find out at hot plug detect time.

The kernel-mode display driver (KMD) must meet the following requirements:

  1. It must be a WDDM 3.0 or above driver.
  2. It exposes an added adapter cap to indicate USB4 support.
  3. All static VidPn targets exposed by the driver need to be reported as power components.
  4. Each USB4 dynamic target connected to the same static target must be connected to the same host router; that is their DXGK_CONNECTION_USB4_INFO's USB4_Driver_ID members must have the same value. Currently, connecting a USB4 DisplayPort monitor to Display Only or Indirect Display WDDM drivers is not supported.

Added USB4 support driver cap

The SupportUsb4Targets cap was added to the DXGK_DISPLAY_DRIVERCAPS_EXTENSION structure that the system queries from the driver at start time. Only WDDM 3.0 and later drivers should set this value and only if the driver meets all the previously listed requirements.

Reporting USB4 monitor DisplayPort Configuration Data values

The DXGK_CONNECTION_CHANGE.MonitorConnect.MonitorConnectFlags field was added.

The OS calls KMD's DXGKDDI_QUERYCONNECTIONCHANGE function whenever a connector status change is detected. When a DisplayPort monitor has been connected to a specified VidPn target and is connected to a USB4 DP-IN adapter, the driver should:

  1. Set the DXGK_CONNECTION_CHANGE.MonitorConnectFlags.Usb4DisplayPortMonitor flag to indicate this monitor is a USB4-connected monitor.
  2. Complete the fields in DXGKARG_QUERYCONNECTIONCHANGE.pUsb4MonitorInfo.

All static VidPn targets being reported as PoFx components

To enable correct power management between the graphics and USB stacks, the driver must report all static VidPn targets as PoFx components through DxgkDdiQueryAdapterInfo when DXGKARG_QUERYADAPTERINFO.Type is DXGKQAITYPE_NUMPOWERCOMPONENTS or DXGKQAITYPE_POWERCOMPONENTINFO.

All dynamic targets created from same static VidPn target

USB4 monitors connected to dynamic VidPn targets are supported but all USB4 dynamic VidPn targets connected to a static VidPn target must have the same USB4_Driver_ID values, ie connected to the same USB4 host router.

System HLK test

The driver must pass the USB4 Systems Graphics Driver Support test added to the Hardware Lab Kit (HLK). This test verifies that on a laptop with USB4 all graphics drivers (iGPU and dGPU) support USB4 functionality if they expose any targets.