Skip to content

Commit eb1b457

Browse files
Yongqiang Sunalexdeucher
authored andcommitted
drm/amd/display: DPP DTO isn't update properly.
[Why] before update dpp DTO, we check dppclks in context to determine it is changed or not, but dppclks in context will be updated anyways after flip is done, so compare dppclks in context will always get an equal result. [How] Add pipe dpp clks in dccg and compare values between dccg and context. Signed-off-by: Yongqiang Sun <[email protected]> Reviewed-by: Dmytro Laktyushkin <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 2f752e9 commit eb1b457

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,11 @@ void dcn20_update_clocks_update_dpp_dto(struct clk_mgr_internal *clk_mgr,
115115
dpp_inst = i;
116116
dppclk_khz = context->res_ctx.pipe_ctx[i].plane_res.bw.dppclk_khz;
117117

118-
prev_dppclk_khz = clk_mgr->base.ctx->dc->current_state->res_ctx.pipe_ctx[i].plane_res.bw.dppclk_khz;
118+
prev_dppclk_khz = clk_mgr->dccg->pipe_dppclk_khz[i];
119119

120-
if (safe_to_lower || prev_dppclk_khz < dppclk_khz) {
120+
if (safe_to_lower || prev_dppclk_khz < dppclk_khz)
121121
clk_mgr->dccg->funcs->update_dpp_dto(
122122
clk_mgr->dccg, dpp_inst, dppclk_khz);
123-
}
124123
}
125124
}
126125

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ void dccg2_update_dpp_dto(struct dccg *dccg, int dpp_inst, int req_dppclk)
7070
REG_UPDATE(DPPCLK_DTO_CTRL,
7171
DPPCLK_DTO_ENABLE[dpp_inst], 0);
7272
}
73+
74+
dccg->pipe_dppclk_khz[dpp_inst] = req_dppclk;
7375
}
7476

7577
void dccg2_get_dccg_ref_freq(struct dccg *dccg,

drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@
2727
#define __DAL_DCCG_H__
2828

2929
#include "dc_types.h"
30+
#include "hw_shared.h"
3031

3132
struct dccg {
3233
struct dc_context *ctx;
3334
const struct dccg_funcs *funcs;
34-
35+
int pipe_dppclk_khz[MAX_PIPES];
3536
int ref_dppclk;
3637
};
3738

0 commit comments

Comments
 (0)