drm/amd/display: Fix null check for pipe_ctx->plane_state in hwss_setup_dpp
authorZicheng Qu <quzicheng@huawei.com>
Tue, 5 Nov 2024 14:01:37 +0000 (14:01 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Nov 2024 15:03:06 +0000 (10:03 -0500)
commit2bc96c95070571c6c824e0d4c7783bee25a37876
tree41ed2fb8b366ccaae47a14436d0fd64417a6be54
parent6a057072ddd127255350357dd880903e8fa23f36
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: 0baae6246307 ("drm/amd/display: Refactor fast update to use new HWSS build sequence")
Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Zicheng Qu <quzicheng@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c