Commit 8e5cfe54 authored by Mustapha Ghaddar's avatar Mustapha Ghaddar Committed by Alex Deucher

drm/amd/display: upstream link_dp_dpia_bw.c

[WHY & HOW]
- make link_dp_dpia_bw.c available for linux.
- add the verify link peak bw
- clean up code and comment format.
Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
Acked-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: default avatarMustapha Ghaddar <mghaddar@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b7c67f72
...@@ -558,6 +558,18 @@ void dc_link_set_usb4_req_bw_req(struct dc_link *link, int req_bw); ...@@ -558,6 +558,18 @@ void dc_link_set_usb4_req_bw_req(struct dc_link *link, int req_bw);
*/ */
void dc_link_get_usb4_req_bw_resp(struct dc_link *link, uint8_t bw, uint8_t result); void dc_link_get_usb4_req_bw_resp(struct dc_link *link, uint8_t bw, uint8_t result);
/*
* Handle the USB4 BW Allocation related functionality here:
* Plug => Try to allocate max bw from timing parameters supported by the sink
* Unplug => de-allocate bw
*
* @link: pointer to the dc_link struct instance
* @peak_bw: Peak bw used by the link/sink
*
* return: allocated bw else return 0
*/
int dc_link_dp_dpia_handle_usb4_bandwidth_allocation_for_link(struct dc_link *link, int peak_bw);
/* TODO: this is not meant to be exposed to DM. Should switch to stream update /* TODO: this is not meant to be exposed to DM. Should switch to stream update
* interface i.e stream_update->dsc_config * interface i.e stream_update->dsc_config
*/ */
......
...@@ -44,33 +44,4 @@ enum bw_type { ...@@ -44,33 +44,4 @@ enum bw_type {
*/ */
bool set_dptx_usb4_bw_alloc_support(struct dc_link *link); bool set_dptx_usb4_bw_alloc_support(struct dc_link *link);
/*
* Return the response_ready flag from dc_link struct
*
* @link: pointer to the dc_link struct instance
*
* return: response_ready flag from dc_link struct
*/
bool get_cm_response_ready_flag(struct dc_link *link);
/*
* Get the Max Available BW or Max Estimated BW for each Host Router
*
* @link: pointer to the dc_link struct instance
* @type: ESTIMATD BW or MAX AVAILABLE BW
*
* return: response_ready flag from dc_link struct
*/
int get_host_router_total_bw(struct dc_link *link, uint8_t type);
/*
* Cleanup function for when the dpia is unplugged to reset struct
* and perform any required clean up
*
* @link: pointer to the dc_link struct instance
*
* return: none
*/
bool dpia_bw_alloc_unplug(struct dc_link *link);
#endif /* DC_INC_LINK_DP_DPIA_BW_H_ */ #endif /* DC_INC_LINK_DP_DPIA_BW_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment