drm/amd/display: fix dcn315 pixel rate crb scaling check
authorDmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Wed, 10 May 2023 19:27:19 +0000 (15:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 14:42:43 +0000 (10:42 -0400)
fix dcn315 pixel rate crb scaling check error

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c

index c6bc2d6..95fd3d0 100644 (file)
@@ -1669,10 +1669,10 @@ static bool allow_pixel_rate_crb(struct dc *dc, struct dc_state *context)
                /*Don't apply if scaling*/
                if (res_ctx->pipe_ctx[i].stream->src.width != res_ctx->pipe_ctx[i].stream->dst.width ||
                                res_ctx->pipe_ctx[i].stream->src.height != res_ctx->pipe_ctx[i].stream->dst.height ||
-                               (res_ctx->pipe_ctx[i].top_pipe->plane_state && (res_ctx->pipe_ctx[i].top_pipe->plane_state->src_rect.width
-                                                                                                               != res_ctx->pipe_ctx[i].top_pipe->plane_state->dst_rect.width ||
-                                       res_ctx->pipe_ctx[i].top_pipe->plane_state->src_rect.height
-                                                                                                               != res_ctx->pipe_ctx[i].top_pipe->plane_state->dst_rect.height)))
+                               (res_ctx->pipe_ctx[i].plane_state && (res_ctx->pipe_ctx[i].plane_state->src_rect.width
+                                                                                                               != res_ctx->pipe_ctx[i].plane_state->dst_rect.width ||
+                                       res_ctx->pipe_ctx[i].plane_state->src_rect.height
+                                                                                                               != res_ctx->pipe_ctx[i].plane_state->dst_rect.height)))
                        return false;
                /*Don't apply if MPO to avoid transition issues*/
                if (res_ctx->pipe_ctx[i].top_pipe && res_ctx->pipe_ctx[i].top_pipe->plane_state != res_ctx->pipe_ctx[i].plane_state)