From 17117871bf0d6792f7aacec0f57cdc63fc01042a Mon Sep 17 00:00:00 2001 From: Gabe Teeger Date: Fri, 15 Sep 2023 18:18:48 -0400 Subject: [PATCH] drm/amd/display: Add Null check for DPP resource commit e186400685d8a9287388a8535e2399bc673bfe95 upstream. [what and why] Check whether dpp resource pointer is null in advance and return early if so. Reviewed-by: Charlene Liu Reviewed-by: Martin Leung Signed-off-by: Gabe Teeger Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index f7b51ac..8873acf 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -996,7 +996,7 @@ static void adjust_recout_for_visual_confirm(struct rect *recout, struct dc *dc = pipe_ctx->stream->ctx->dc; int dpp_offset, base_offset; - if (dc->debug.visual_confirm == VISUAL_CONFIRM_DISABLE) + if (dc->debug.visual_confirm == VISUAL_CONFIRM_DISABLE || !pipe_ctx->plane_res.dpp) return; dpp_offset = pipe_ctx->stream->timing.v_addressable / VISUAL_CONFIRM_DPP_OFFSET_DENO; -- 2.7.4