drm/amd/display: fix assert condition
authorSamson Tam <Samson.Tam@amd.com>
Fri, 3 Mar 2023 22:30:25 +0000 (17:30 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 15 Mar 2023 22:45:26 +0000 (18:45 -0400)
[Why & How]
Reversed assert condition when checking that phy_pix_clk[] is not 0

Reviewed-by: Alvin Lee <Alvin.Lee2@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Samson Tam <Samson.Tam@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 adaf330716c2c4414cabb30baf78d6b4563b3c54..47fa51c1d3f45587ed66abefa373248579f8de6b 100644 (file)
@@ -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];