[PATCH 11/31] drm/amd/display: fix a divide by zero error

Jasdeep Dhillon jdhillon at amd.com
Thu Sep 22 00:18:01 UTC 2022


From: Aurabindo Pillai <aurabindo.pillai at amd.com>

[Why&How]

Incorrect variable was being checked for zero condition.

Reviewed-by: Alvin Lee <alvin.lee2 at amd.com>
Acked-by: Jasdeep Dhillon <jdhillon at amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai at amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
index 46ba6eee69ea..a2a70a1572b7 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
@@ -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)
-- 
2.25.1



More information about the amd-gfx mailing list