Commit c979d8db authored by Dmytro Laktyushkin's avatar Dmytro Laktyushkin Committed by Alex Deucher
Browse files

drm/amd/display: Add signal type check for dcn401 get_phyd32clk_src



Trying to access link enc on a dpia link will cause a crash otherwise

Reviewed-by: default avatarCharlene Liu <charlene.liu@amd.com>
Signed-off-by: default avatarDmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Signed-off-by: default avatarChenyu Chen <chen-yu.chen@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0d2abc02
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -914,10 +914,10 @@ static void dcn401_enable_stream_calc(
			pipe_ctx->stream->link->cur_link_settings.lane_count;
	uint32_t active_total_with_borders;

	if (dc->link_srv->dp_is_128b_132b_signal(pipe_ctx))
	if (dc->link_srv->dp_is_128b_132b_signal(pipe_ctx)) {
		*dp_hpo_inst = pipe_ctx->stream_res.hpo_dp_stream_enc->inst;

		*phyd32clk = get_phyd32clk_src(pipe_ctx->stream->link);
	}

	if (dc_is_tmds_signal(pipe_ctx->stream->signal))
		dcn401_calculate_dccg_tmds_div_value(pipe_ctx, tmds_div);