[PATCH] drm/amd/display: Fix incorrectly reading prev_dppclk
Swarnakar, Praful
Praful.Swarnakar at amd.com
Tue May 10 19:36:56 UTC 2022
[AMD Official Use Only - General]
On 2022-05-11 00:08, Wentland, Harry wrote:
> From: Wentland, Harry <Harry.Wentland at amd.com>
>
> On 2022-05-10 14:34, Bhawanpreet Lakha wrote:
>> 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>
>
> Reviewed-by: Harry Wentland <harry.wentland at amd.com>
>
> Harry
Reviewed-by: Praful Swarnakar <praful.swarnakar at amd.com>
Also, verified on various affected systems to confirm fix.
Regards,
Praful Swarnakar
>> ---
>> 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(
More information about the amd-gfx
mailing list