drm/amd/display: fix a divide by zero error
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Tue, 13 Sep 2022 20:21:09 +0000 (16:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Sep 2022 13:41:46 +0000 (09:41 -0400)
[Why&How]

Incorrect variable was being checked for zero condition.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@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/dcn32/dcn32_resource_helpers.c

index 46ba6ee..a2a70a1 100644 (file)
@@ -278,7 +278,7 @@ void dcn32_determine_det_override(struct dc *dc,
                }
        }
 
-       if (context->stream_count > 0) {
+       if (stream_count > 0) {
                stream_segments = 18 / stream_count;
                for (i = 0; i < context->stream_count; i++) {
                        if (context->streams[i]->mall_stream_config.type == SUBVP_PHANTOM)