[PATCH] drm/amd/display: Fix incorrectly reading prev_dppclk
Bhawanpreet Lakha
Bhawanpreet.Lakha at amd.com
Tue May 10 18:34:31 UTC 2022
From: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.corp-partner.google.com>
[Why]
we save the prev_dppclk value using "dpp_inst" but when reading this
value we use the index "i". In a case where a pipe is fused off we can
end up reading the incorrect instance because i != dpp_inst in this
case.
[How]
read the prev_dppclk using dpp_inst instead of i
Signed-off-by: Bhawanpreet Lakha Bhawanpreet.Lakha at amd.com
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin at amd.com>
---
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
index 02943ca65807..cf1b5f354ae9 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
@@ -122,7 +122,7 @@ static void rn_update_clocks_update_dpp_dto(struct clk_mgr_internal *clk_mgr,
dpp_inst = clk_mgr->base.ctx->dc->res_pool->dpps[i]->inst;
dppclk_khz = context->res_ctx.pipe_ctx[i].plane_res.bw.dppclk_khz;
- prev_dppclk_khz = clk_mgr->dccg->pipe_dppclk_khz[i];
+ prev_dppclk_khz = clk_mgr->dccg->pipe_dppclk_khz[dpp_inst];
if (safe_to_lower || prev_dppclk_khz < dppclk_khz)
clk_mgr->dccg->funcs->update_dpp_dto(
--
2.25.1
More information about the amd-gfx
mailing list