From 6411a35690453f22fdb524f2a1b4310b68c85737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Mon, 3 Aug 2026 14:41:21 +0200 Subject: [PATCH] drm/amd/display: Fix crash in hwss_set_output_transfer_func() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pipe_ctx->plane_res.hubp pointer is NULL on all DCE hardware, which causes a kernel NULL pointer dereference on all Vega and older GPUs. Let's add a simple NULL check. Fixes: 6bfca938471b ("drm/amd/display: Refactor DPP_SET_OUTPUT_TRANSFER_FUNC to drop pipe_ctx") Signed-off-by: Timur Kristóf Cc: Tomasz Siemek Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c index 76e3509f73c5..90d754d192f1 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c @@ -2312,7 +2312,8 @@ void hwss_set_output_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx) .xfm = pipe_ctx->plane_res.xfm, .dpp = pipe_ctx->plane_res.dpp, .mpc = dc->res_pool->mpc, - .mpcc_id = pipe_ctx->plane_res.hubp->inst, + .mpcc_id = pipe_ctx->plane_res.hubp ? + pipe_ctx->plane_res.hubp->inst : 0, .is_top_pipe = resource_is_pipe_type(pipe_ctx, OPP_HEAD), .stream = pipe_ctx->stream, }