mirror of
https://github.com/torvalds/linux.git
synced 2026-05-03 22:12:32 -04:00
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>
This commit is contained in:
committed by
Alex Deucher
parent
b5006f873b
commit
a8b537605e
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
#include "link_validation.h"
|
||||
#include "protocols/link_dp_capability.h"
|
||||
#include "protocols/link_dp_dpia_bw.h"
|
||||
#include "resource.h"
|
||||
|
||||
#define DC_LOGGER_INIT(logger)
|
||||
@@ -343,3 +344,20 @@ enum dc_status link_validate_mode_timing(
|
||||
|
||||
return DC_OK;
|
||||
}
|
||||
|
||||
bool link_validate_dpia_bandwidth(const struct dc_stream_state *stream, const unsigned int num_streams)
|
||||
{
|
||||
bool ret = true;
|
||||
int bw_needed[MAX_DPIA_NUM];
|
||||
struct dc_link *link[MAX_DPIA_NUM];
|
||||
|
||||
if (!num_streams || num_streams > MAX_DPIA_NUM)
|
||||
return ret;
|
||||
|
||||
for (uint8_t i = 0; i < num_streams; ++i) {
|
||||
|
||||
link[i] = stream[i].link;
|
||||
bw_needed[i] = dc_bandwidth_in_kbps_from_timing(&stream[i].timing);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user