Skip to content

Commit 46fe9cb

Browse files
Meenakshikumar Somasundaramalexdeucher
authored andcommitted
drm/amd/display: Allocate zero bw after bw alloc enable
[Why] During DP tunnel creation, CM preallocates BW and reduces estimated BW of other DPIA. CM release preallocation only when allocation is complete. Display mode validation logic validates timings based on bw available per host router. In multi display setup, this causes bw allocation failure when allocation greater than estimated bw. [How] Do zero alloc to make the CM to release preallocation and update estimated BW correctly for all DPIAs per host router. Reviewed-by: PeiChen Huang <[email protected]> Acked-by: Aurabindo Pillai <[email protected]> Signed-off-by: Meenakshikumar Somasundaram <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 892b41b commit 46fe9cb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static void set_usb4_req_bw_req(struct dc_link *link, int req_bw)
270270

271271
/* Error check whether requested and allocated are equal */
272272
req_bw = requested_bw * (Kbps_TO_Gbps / link->dpia_bw_alloc_config.bw_granularity);
273-
if (req_bw == link->dpia_bw_alloc_config.allocated_bw) {
273+
if (req_bw && (req_bw == link->dpia_bw_alloc_config.allocated_bw)) {
274274
DC_LOG_ERROR("%s: Request bw equals to allocated bw for link(%d)\n",
275275
__func__, link->link_index);
276276
}
@@ -341,6 +341,14 @@ bool link_dp_dpia_set_dptx_usb4_bw_alloc_support(struct dc_link *link)
341341
ret = true;
342342
init_usb4_bw_struct(link);
343343
link->dpia_bw_alloc_config.bw_alloc_enabled = true;
344+
345+
/*
346+
* During DP tunnel creation, CM preallocates BW and reduces estimated BW of other
347+
* DPIA. CM release preallocation only when allocation is complete. Do zero alloc
348+
* to make the CM to release preallocation and update estimated BW correctly for
349+
* all DPIAs per host router
350+
*/
351+
link_dp_dpia_allocate_usb4_bandwidth_for_stream(link, 0);
344352
}
345353
}
346354

0 commit comments

Comments
 (0)