Commit 156374b2 authored by Cruise Hung's avatar Cruise Hung Committed by Alex Deucher
Browse files

drm/amd/display: Remove unused tunnel BW validation



[Why & How]
The tunnel BW validation code has changed to the new one.
Remove the unused code.
The DP tunneling overhead is not updated in SST.
Move updating DP tunneling overhead for both SST and MST.

Reviewed-by: default avatarMeenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>
Signed-off-by: default avatarCruise Hung <Cruise.Hung@amd.com>
Signed-off-by: default avatarRay Wu <ray.wu@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 158b9201
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -515,11 +515,6 @@ void dc_link_enable_hpd_filter(struct dc_link *link, bool enable)
	link->dc->link_srv->enable_hpd_filter(link, enable);
}

bool dc_link_dp_dpia_validate(struct dc *dc, const struct dc_stream_state *streams, const unsigned int count)
{
	return dc->link_srv->validate_dpia_bandwidth(streams, count);
}

enum dc_status dc_link_validate_dp_tunneling_bandwidth(const struct dc *dc, const struct dc_state *new_ctx)
{
	return dc->link_srv->validate_dp_tunnel_bandwidth(dc, new_ctx);
+0 −13
Original line number Diff line number Diff line
@@ -2416,19 +2416,6 @@ void dc_link_set_usb4_req_bw_req(struct dc_link *link, int req_bw);
void dc_link_dp_dpia_handle_usb4_bandwidth_allocation_for_link(
		struct dc_link *link, int peak_bw);

/*
 * Validate the BW of all the valid DPIA links to make sure it doesn't exceed
 * available BW for each host router
 *
 * @dc: pointer to dc struct
 * @stream: pointer to all possible streams
 * @count: number of valid DPIA streams
 *
 * return: TRUE if bw used by DPIAs doesn't exceed available BW else return FALSE
 */
bool dc_link_dp_dpia_validate(struct dc *dc, const struct dc_stream_state *streams,
		const unsigned int count);

/*
 * Calculates the DP tunneling bandwidth required for the stream timing
 * and aggregates the stream bandwidth for the respective DP tunneling link
+0 −3
Original line number Diff line number Diff line
@@ -144,9 +144,6 @@ struct link_service {
	uint32_t (*dp_link_bandwidth_kbps)(
		const struct dc_link *link,
		const struct dc_link_settings *link_settings);
	bool (*validate_dpia_bandwidth)(
			const struct dc_stream_state *stream,
			const unsigned int num_streams);
	enum dc_status (*validate_dp_tunnel_bandwidth)(
		const struct dc *dc,
		const struct dc_state *new_ctx);
+3 −2
Original line number Diff line number Diff line
@@ -2295,10 +2295,11 @@ static bool allocate_usb4_bandwidth_for_stream(struct dc_stream_state *stream, i
		}

		link->dpia_bw_alloc_config.remote_sink_req_bw[sink_index] = bw;
		link->dpia_bw_alloc_config.dp_overhead = link_dpia_get_dp_mst_overhead(link);
		req_bw += link->dpia_bw_alloc_config.dp_overhead;
	}

	link->dpia_bw_alloc_config.dp_overhead = link_dpia_get_dp_overhead(link);
	req_bw += link->dpia_bw_alloc_config.dp_overhead;

	link_dp_dpia_allocate_usb4_bandwidth_for_stream(link, req_bw);

	if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) {
+0 −1
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@ static void construct_link_service_validation(struct link_service *link_srv)
{
	link_srv->validate_mode_timing = link_validate_mode_timing;
	link_srv->dp_link_bandwidth_kbps = dp_link_bandwidth_kbps;
	link_srv->validate_dpia_bandwidth = link_validate_dpia_bandwidth;
	link_srv->validate_dp_tunnel_bandwidth = link_validate_dp_tunnel_bandwidth;
	link_srv->dp_required_hblank_size_bytes = dp_required_hblank_size_bytes;
}
Loading