]> www.infradead.org Git - nvme.git/commitdiff
drm/amd/display: Skip unnecessary abm disable
authorSherry Wang <yao.wang1@amd.com>
Thu, 6 Jun 2024 08:51:43 +0000 (16:51 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 1 Jul 2024 20:06:53 +0000 (16:06 -0400)
[Why]
We try to disable abm immediately when it's being gradually
disabled, which causes backlight ramping being paused in the
middle

[How]
Don't disable abm immediately if abm has been or is being
disabled through set_abm_level path

Reviewed-by: Anthony Koo <anthony.koo@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Sherry Wang <yao.wang1@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c

index 3de65a9f0e6f2bda6fe146b7dcbc691e53301e48..1ea95f8d4cbccbb4195a5ede6c9e69d2d290e376 100644 (file)
@@ -183,6 +183,12 @@ void dcn21_set_abm_immediate_disable(struct pipe_ctx *pipe_ctx)
        struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl;
        struct dmcu *dmcu = pipe_ctx->stream->ctx->dc->res_pool->dmcu;
 
+       // make a short term w/a for an issue that backlight ramping unexpectedly paused in the middle,
+       // will decouple backlight from ABM and redefine DMUB interface, then this w/a could be removed
+       if (pipe_ctx->stream->abm_level == 0 || pipe_ctx->stream->abm_level == ABM_LEVEL_IMMEDIATE_DISABLE) {
+               return;
+       }
+
        if (dmcu) {
                dce110_set_abm_immediate_disable(pipe_ctx);
                return;