Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Add function pointer for validate bw usb4

[WHY]
In order to follow the new protocol of calling link functions

[HOW]
Add the function pointer to the link_srv

Reviewed-by: Kshitij Bhardwaj <kshitij.bhardwaj1@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Mustapha Ghaddar <mghaddar@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Mustapha Ghaddar and committed by
Alex Deucher
a8b53760 b5006f87

+52 -8
+13
drivers/gpu/drm/amd/display/dc/dc.h
··· 2028 2028 int dc_link_dp_dpia_handle_usb4_bandwidth_allocation_for_link( 2029 2029 struct dc_link *link, int peak_bw); 2030 2030 2031 + /* 2032 + * Validate the BW of all the valid DPIA links to make sure it doesn't exceed 2033 + * available BW for each host router 2034 + * 2035 + * @dc: pointer to dc struct 2036 + * @stream: pointer to all possible streams 2037 + * @num_streams: number of valid DPIA streams 2038 + * 2039 + * return: TRUE if bw used by DPIAs doesn't exceed available BW else return FALSE 2040 + */ 2041 + bool dc_link_validate(struct dc *dc, const struct dc_stream_state *streams, 2042 + const unsigned int count); 2043 + 2031 2044 /* Sink Interfaces - A sink corresponds to a display output device */ 2032 2045 2033 2046 struct dc_container_id {
+3
drivers/gpu/drm/amd/display/dc/inc/link.h
··· 144 144 uint32_t (*dp_link_bandwidth_kbps)( 145 145 const struct dc_link *link, 146 146 const struct dc_link_settings *link_settings); 147 + bool (*validate_dpia_bandwidth)( 148 + const struct dc_stream_state *stream, 149 + const unsigned int num_streams); 147 150 148 151 149 152 /*************************** DPMS *************************************/