Commit 2bc96c95 authored by Zicheng Qu's avatar Zicheng Qu Committed by Alex Deucher
Browse files

drm/amd/display: Fix null check for pipe_ctx->plane_state in hwss_setup_dpp



This commit addresses a null pointer dereference issue in
hwss_setup_dpp(). The issue could occur when pipe_ctx->plane_state is
null. The fix adds a check to ensure `pipe_ctx->plane_state` is not null
before accessing. This prevents a null pointer dereference.

Fixes: 0baae624 ("drm/amd/display: Refactor fast update to use new HWSS build sequence")
Reviewed-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Signed-off-by: default avatarZicheng Qu <quzicheng@huawei.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6a057072
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -898,6 +898,9 @@ void hwss_setup_dpp(union block_sequence_params *params)
	struct dpp *dpp = pipe_ctx->plane_res.dpp;
	struct dc_plane_state *plane_state = pipe_ctx->plane_state;

	if (!plane_state)
		return;

	if (dpp && dpp->funcs->dpp_setup) {
		// program the input csc
		dpp->funcs->dpp_setup(dpp,