]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/display: Disable idle reallow as part of command/gpint execution
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Wed, 24 Jan 2024 15:51:49 +0000 (10:51 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Feb 2024 17:26:22 +0000 (12:26 -0500)
[Why]
Workaroud for a race condition where DMCUB is in the process of
committing to IPS1 during the handshake causing us to miss the
transition into IPS2 and touch the INBOX1 RPTR causing a HW hang.

[How]
Disable the reallow to ensure that we have enough of a gap between entry
and exit and we're not seeing back-to-back wake_and_executes.

Reviewed-by: Ovidiu Bunea <ovidiu.bunea@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c

index 53919c0eb1e3db2d5bf85c01b4c3cf66656f93c4..10a5f53a56db9b94a6b9c36e353626f3f503717c 100644 (file)
@@ -987,6 +987,7 @@ struct dc_debug_options {
        bool psp_disabled_wa;
        unsigned int ips2_eval_delay_us;
        unsigned int ips2_entry_delay_us;
+       bool disable_dmub_reallow_idle;
        bool disable_timeout;
        bool disable_extblankadj;
        unsigned int static_screen_wait_frames;
index 838c43b74662a047ea228df4451155f80846a20e..a1477906fe4f8aa6a6624ed6795027e916f0c7a2 100644 (file)
@@ -1374,7 +1374,7 @@ bool dc_wake_and_execute_dmub_cmd_list(const struct dc_context *ctx, unsigned in
        else
                result = dm_execute_dmub_cmd(ctx, cmd, wait_type);
 
-       if (result && reallow_idle)
+       if (result && reallow_idle && !ctx->dc->debug.disable_dmub_reallow_idle)
                dc_dmub_srv_apply_idle_power_optimizations(ctx->dc, true);
 
        return result;
@@ -1423,7 +1423,7 @@ bool dc_wake_and_execute_gpint(const struct dc_context *ctx, enum dmub_gpint_com
 
        result = dc_dmub_execute_gpint(ctx, command_code, param, response, wait_type);
 
-       if (result && reallow_idle)
+       if (result && reallow_idle && !ctx->dc->debug.disable_dmub_reallow_idle)
                dc_dmub_srv_apply_idle_power_optimizations(ctx->dc, true);
 
        return result;
index d74e5c9e00aee9263415ed400b5599ebd10eac01..54249f35698766d81d6b67c70662e8b41b19263e 100644 (file)
@@ -783,6 +783,7 @@ static const struct dc_debug_options debug_defaults_drv = {
        .psp_disabled_wa = true,
        .ips2_eval_delay_us = 1650,
        .ips2_entry_delay_us = 800,
+       .disable_dmub_reallow_idle = true,
        .static_screen_wait_frames = 2,
 };