From: Gabe Teeger <[email protected]>

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

Reviewed-by: Charlene Liu <[email protected]>
Reviewed-by: Martin Leung <[email protected]>
Signed-off-by: Gabe Teeger <[email protected]>
Cc: Mario Limonciello <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: [email protected]
Acked-by: Aurabindo Pillai <[email protected]>
---
 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 628b902a4cec..aa7b5db83644 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -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;
-- 
2.42.0

Reply via email to