[PATCH 17/19] drm/amd/display: fix assert condition

Qingqing Zhuo qingqing.zhuo at amd.com
Fri Mar 10 09:31:15 UTC 2023


From: Samson Tam <Samson.Tam at amd.com>

[Why & How]
Reversed assert condition when checking that phy_pix_clk[] is not 0

Reviewed-by: Alvin Lee <Alvin.Lee2 at amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo at amd.com>
Signed-off-by: Samson Tam <Samson.Tam 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 adaf330716c2..47fa51c1d3f4 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
@@ -322,7 +322,7 @@ void dcn32_determine_det_override(struct dc *dc,
 
 	/* Check for special case with two displays, one with much higher pixel rate */
 	if (stream_count == 2) {
-		ASSERT(!phy_pix_clk[0] || !phy_pix_clk[1]);
+		ASSERT((phy_pix_clk[0] > 0) && (phy_pix_clk[1] > 0));
 		if (phy_pix_clk[0] < phy_pix_clk[1]) {
 			lower_mode_stream_index = 0;
 			phy_pix_clk_mult = phy_pix_clk[1] / phy_pix_clk[0];
-- 
2.34.1



More information about the amd-gfx mailing list