Unverified Commit b3a89fa1 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13129 drm/amd/display: Add null check for pipe_ctx->plane_state in dcn20_program_pipe

parents c9f2e8f7 355d7e0e
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -1733,17 +1733,22 @@ static void dcn20_program_pipe(
		dc->res_pool->hubbub->funcs->program_det_size(
			dc->res_pool->hubbub, pipe_ctx->plane_res.hubp->inst, pipe_ctx->det_buffer_size_kb);

	if (pipe_ctx->update_flags.raw || pipe_ctx->plane_state->update_flags.raw || pipe_ctx->stream->update_flags.raw)
	if (pipe_ctx->update_flags.raw ||
	    (pipe_ctx->plane_state && pipe_ctx->plane_state->update_flags.raw) ||
	    pipe_ctx->stream->update_flags.raw)
		dcn20_update_dchubp_dpp(dc, pipe_ctx, context);

	if (pipe_ctx->update_flags.bits.enable
			|| pipe_ctx->plane_state->update_flags.bits.hdr_mult)
	if (pipe_ctx->update_flags.bits.enable ||
	    (pipe_ctx->plane_state && pipe_ctx->plane_state->update_flags.bits.hdr_mult))
		hws->funcs.set_hdr_multiplier(pipe_ctx);

	if (pipe_ctx->update_flags.bits.enable ||
	    pipe_ctx->plane_state->update_flags.bits.in_transfer_func_change ||
	    pipe_ctx->plane_state->update_flags.bits.gamma_change ||
	    pipe_ctx->plane_state->update_flags.bits.lut_3d)
	    (pipe_ctx->plane_state &&
	     pipe_ctx->plane_state->update_flags.bits.in_transfer_func_change) ||
	    (pipe_ctx->plane_state &&
	     pipe_ctx->plane_state->update_flags.bits.gamma_change) ||
	    (pipe_ctx->plane_state &&
	     pipe_ctx->plane_state->update_flags.bits.lut_3d))
		hws->funcs.set_input_transfer_func(dc, pipe_ctx, pipe_ctx->plane_state);

	/* dcn10_translate_regamma_to_hw_format takes 750us to finish
@@ -1753,7 +1758,8 @@ static void dcn20_program_pipe(
	if (pipe_ctx->update_flags.bits.enable ||
			pipe_ctx->update_flags.bits.plane_changed ||
			pipe_ctx->stream->update_flags.bits.out_tf ||
			pipe_ctx->plane_state->update_flags.bits.output_tf_change)
			(pipe_ctx->plane_state &&
			 pipe_ctx->plane_state->update_flags.bits.output_tf_change))
		hws->funcs.set_output_transfer_func(dc, pipe_ctx, pipe_ctx->stream);

	/* If the pipe has been enabled or has a different opp, we
@@ -1777,7 +1783,7 @@ static void dcn20_program_pipe(
	}

	/* Set ABM pipe after other pipe configurations done */
	if (pipe_ctx->plane_state->visible) {
	if ((pipe_ctx->plane_state && pipe_ctx->plane_state->visible)) {
		if (pipe_ctx->stream_res.abm) {
			dc->hwss.set_pipe(pipe_ctx);
			pipe_ctx->stream_res.abm->funcs->set_abm_level(pipe_ctx->stream_res.abm,