drm/amd/display: Fix watermark calculation
authorAlvin Lee <Alvin.Lee2@amd.com>
Wed, 29 Jun 2022 16:35:12 +0000 (12:35 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 Oct 2022 21:32:55 +0000 (17:32 -0400)
Watermark calculation was incorrect due to missing brackets.

Fixes: 85f4bc0c333c ("drm/amd/display: Add SubVP required code")
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.0
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c

index bbde635c56fc9fc94b7ffa4d22370fd75303eaec..0541e87e4f38954dd9728e8767b4b8a140174698 100644 (file)
@@ -781,7 +781,7 @@ void dc_dmub_setup_subvp_dmub_command(struct dc *dc,
                // Store the original watermark value for this SubVP config so we can lower it when the
                // MCLK switch starts
                wm_val_refclk = context->bw_ctx.bw.dcn.watermarks.a.cstate_pstate.pstate_change_ns *
-                               dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000 / 1000;
+                               (dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000) / 1000;
 
                cmd.fw_assisted_mclk_switch_v2.config_data.watermark_a_cache = wm_val_refclk < 0xFFFF ? wm_val_refclk : 0xFFFF;
        }