Skip to content

Commit 2bc96c9

Browse files
Zicheng Qualexdeucher
authored andcommitted
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: 0baae62 ("drm/amd/display: Refactor fast update to use new HWSS build sequence") Reviewed-by: Tom Chung <[email protected]> Signed-off-by: Zicheng Qu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6a05707 commit 2bc96c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,9 @@ void hwss_setup_dpp(union block_sequence_params *params)
898898
struct dpp *dpp = pipe_ctx->plane_res.dpp;
899899
struct dc_plane_state *plane_state = pipe_ctx->plane_state;
900900

901+
if (!plane_state)
902+
return;
903+
901904
if (dpp && dpp->funcs->dpp_setup) {
902905
// program the input csc
903906
dpp->funcs->dpp_setup(dpp,

0 commit comments

Comments
 (0)