[PATCH 12/16] drm/amd/display: Add Function delaration in dc_link
Li, Roman
Roman.Li at amd.com
Thu Jan 26 15:00:06 UTC 2023
[AMD Official Use Only - General]
Please fix typo in commit title.
> -----Original Message-----
> From: Hung, Alex <Alex.Hung at amd.com>
> Sent: Wednesday, January 25, 2023 7:32 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Wentland, Harry <Harry.Wentland at amd.com>; Li, Sun peng (Leo)
> <Sunpeng.Li at amd.com>; Lakha, Bhawanpreet
> <Bhawanpreet.Lakha at amd.com>; Siqueira, Rodrigo
> <Rodrigo.Siqueira at amd.com>; Pillai, Aurabindo
> <Aurabindo.Pillai at amd.com>; Zhuo, Qingqing (Lillian)
> <Qingqing.Zhuo at amd.com>; Li, Roman <Roman.Li at amd.com>; Lin, Wayne
> <Wayne.Lin at amd.com>; Wang, Chao-kai (Stylon)
> <Stylon.Wang at amd.com>; Chiu, Solomon <Solomon.Chiu at amd.com>;
> Kotarac, Pavle <Pavle.Kotarac at amd.com>; Gutierrez, Agustin
> <Agustin.Gutierrez at amd.com>; Ghaddar, Mustapha
> <Mustapha.Ghaddar at amd.com>; Lei, Jun <Jun.Lei at amd.com>; Hung, Alex
> <Alex.Hung at amd.com>
> Subject: [PATCH 12/16] drm/amd/display: Add Function delaration in dc_link
>
> From: Mustapha Ghaddar <mghaddar at amd.com>
>
> [WHY]
> Housekeeping cleaning and adding declaration for function to be called from
> DM layer
>
> [HOW]
> Adding public functions to dc_link.h
>
> Reviewed-by: Jun Lei <Jun.Lei at amd.com>
> Acked-by: Alex Hung <alex.hung at amd.com>
> Signed-off-by: Mustapha Ghaddar <mghaddar at amd.com>
> ---
> drivers/gpu/drm/amd/display/dc/dc_link.h | 27 +++++++++++++++++++
> .../dc/link/protocols/link_dp_dpia_bw.h | 24 -----------------
> 2 files changed, 27 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dc_link.h
> b/drivers/gpu/drm/amd/display/dc/dc_link.h
> index 1927eacbfa71..85b57848f5cb 100644
> --- a/drivers/gpu/drm/amd/display/dc/dc_link.h
> +++ b/drivers/gpu/drm/amd/display/dc/dc_link.h
> @@ -627,4 +627,31 @@ struct fixed31_32
> calculate_sst_avg_time_slots_per_mtp(
> void setup_dp_hpo_stream(struct pipe_ctx *pipe_ctx, bool enable); void
> dp_source_sequence_trace(struct dc_link *link, uint8_t dp_test_mode);
>
> +/*
> + * USB4 DPIA BW ALLOCATION PUBLIC FUNCTIONS */
> +/*
> + * Send a request from DP-Tx requesting to allocate BW remotely after
> + * allocating it locally. This will get processed by CM and a CB
> +function
> + * will be called.
> + *
> + * @link: pointer to the dc_link struct instance
> + * @req_bw: The requested bw in Kbyte to allocated
> + *
> + * return: none
> + */
> +void dc_link_set_usb4_req_bw_req(struct dc_link *link, int req_bw);
> +
> +/*
> + * CB function for when the status of the Req above is complete. We
> +will
> + * find out the result of allocating on CM and update structs
> +accordingly
> + *
> + * @link: pointer to the dc_link struct instance
> + * @bw: Allocated or Estimated BW depending on the result
> + * @result: Response type
> + *
> + * return: none
> + */
> +void dc_link_get_usb4_req_bw_resp(struct dc_link *link, uint8_t bw,
> +uint8_t result);
> +
> #endif /* DC_LINK_H_ */
> diff --git
> a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.h
> b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.h
> index 58eb7b581093..832a6dd2c5fa 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.h
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.h
> @@ -44,30 +44,6 @@ enum bw_type {
> */
> bool set_dptx_usb4_bw_alloc_support(struct dc_link *link);
>
> -/*
> - * Send a request from DP-Tx requesting to allocate BW remotely after
> - * allocating it locally. This will get processed by CM and a CB function
> - * will be called.
> - *
> - * @link: pointer to the dc_link struct instance
> - * @req_bw: The requested bw in Kbyte to allocated
> - *
> - * return: none
> - */
> -void set_usb4_req_bw_req(struct dc_link *link, int req_bw);
> -
> -/*
> - * CB function for when the status of the Req above is complete. We will
> - * find out the result of allocating on CM and update structs accordingly
> - *
> - * @link: pointer to the dc_link struct instance
> - * @bw: Allocated or Estimated BW depending on the result
> - * @result: Response type
> - *
> - * return: none
> - */
> -void get_usb4_req_bw_resp(struct dc_link *link, uint8_t bw, uint8_t
> result);
> -
> /*
> * Return the response_ready flag from dc_link struct
> *
> --
> 2.39.1
More information about the amd-gfx
mailing list