From: Ian Chen <[email protected]> [HOW] Before enable smart power OLED, we need to call set pipe to let DMUB get correct ABM config.
Reviewed-by: Robin Chen <[email protected]> Signed-off-by: Ian Chen <[email protected]> Signed-off-by: Roman Li <[email protected]> --- drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 5b8b55c1dc68..8be9cbd43e18 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -6012,6 +6012,12 @@ bool dc_smart_power_oled_enable(const struct dc_link *link, bool enable, uint16_ if (pipe_ctx) otg_inst = pipe_ctx->stream_res.tg->inst; + // before enable smart power OLED, we need to call set pipe for DMUB to set ABM config + if (enable) { + if (dc->hwss.set_pipe && pipe_ctx) + dc->hwss.set_pipe(pipe_ctx); + } + // fill in cmd memset(&cmd, 0, sizeof(cmd)); -- 2.34.1
