Commit e1864006 authored by Gabe Teeger's avatar Gabe Teeger Committed by Alex Deucher
Browse files

drm/amd/display: Add Null check for DPP resource



[what and why]
Check whether dpp resource pointer is null in advance and return early
if so.

Reviewed-by: default avatarCharlene Liu <charlene.liu@amd.com>
Reviewed-by: default avatarMartin Leung <martin.leung@amd.com>
Signed-off-by: default avatarGabe Teeger <gabe.teeger@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Acked-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b8e6aec1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -945,7 +945,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;