drm/amd/display: Request usb4 bw for mst streams
authorPeichen Huang <peichen.huang@amd.com>
Thu, 14 Dec 2023 15:16:34 +0000 (23:16 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Jan 2024 20:43:54 +0000 (15:43 -0500)
commit5f3bce13266e6fe2f7a46f94d8bc94d5274e276b
tree028376f9554e1a69f983aae2d600e3c3be6e71fb
parenta465536ebff88fcc42e131a1b09bbe3df829117b
drm/amd/display: Request usb4 bw for mst streams

[WHY]
When usb4 bandwidth allocation mode is enabled, driver need to request
bandwidth from connection manager. For mst link,  the requested
bandwidth should be big enough for all remote streams.

[HOW]
- If mst link, the requested bandwidth should be the sum of all mst
  streams bandwidth added with dp MTPH overhead.
- Allocate/deallcate usb4 bandwidth when setting dpms on/off.
- When doing display mode validation, driver also need to consider total
  bandwidth of all mst streams for mst link.

Reviewed-by: Cruise Hung <cruise.hung@amd.com>
Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Peichen Huang <peichen.huang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_types.h
drivers/gpu/drm/amd/display/dc/link/link_dpms.c
drivers/gpu/drm/amd/display/dc/link/link_validation.c
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.h