Skip to content

Commit a3b7e65

Browse files
melissawenalexdeucher
authored andcommitted
drm/amd/display: Fix null check of pipe_ctx->plane_state for update_dchubp_dpp
Similar to commit 6a05707 ("drm/amd/display: Fix null check for pipe_ctx->plane_state in dcn20_program_pipe") that addresses a null pointer dereference on dcn20_update_dchubp_dpp. This is the same function hooked for update_dchubp_dpp in dcn401, with the same issue. Fix possible null pointer deference on dcn401_program_pipe too. Fixes: 63ab80d ("drm/amd/display: DML2.1 Post-Si Cleanup") Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit d8d47f7)
1 parent 2ddac70 commit a3b7e65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,9 +1980,9 @@ void dcn401_program_pipe(
19801980
dc->res_pool->hubbub, pipe_ctx->plane_res.hubp->inst, pipe_ctx->hubp_regs.det_size);
19811981
}
19821982

1983-
if (pipe_ctx->update_flags.raw ||
1984-
(pipe_ctx->plane_state && pipe_ctx->plane_state->update_flags.raw) ||
1985-
pipe_ctx->stream->update_flags.raw)
1983+
if (pipe_ctx->plane_state && (pipe_ctx->update_flags.raw ||
1984+
pipe_ctx->plane_state->update_flags.raw ||
1985+
pipe_ctx->stream->update_flags.raw))
19861986
dc->hwss.update_dchubp_dpp(dc, pipe_ctx, context);
19871987

19881988
if (pipe_ctx->plane_state && (pipe_ctx->update_flags.bits.enable ||

0 commit comments

Comments
 (0)